mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Parser] Introduce ParserUnit::parse() function to avoid duplication of code
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user