[Parser] Introduce ParserUnit::parse() function to avoid duplication of code

This commit is contained in:
Argyrios Kyrtzidis
2018-12-16 09:52:15 -08:00
parent 917b5003d9
commit 66be4a58b4
5 changed files with 16 additions and 20 deletions

View File

@@ -698,13 +698,7 @@ public:
}
void parse() {
auto &P = Parser->getParser();
bool Done = false;
while (!Done) {
P.parseTopLevel();
Done = P.Tok.is(tok::eof);
}
P.finalizeSyntaxTree();
Parser->parse();
}
SourceFile &getSourceFile() {