mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Formalize some SourceFile parsing outputs
Currently when parsing a SourceFile, the parser gets handed pointers so that it can write the interface hash and collected tokens directly into the file. It can also call `setSyntaxRoot` at the end of parsing to set the syntax tree. In preparation for the removal of `performParseOnly`, this commit formalizes these values as outputs of `ParseSourceFileRequest`, ensuring that the file gets parsed when the interface hash, collected tokens, or syntax tree is queried.
This commit is contained in:
@@ -719,9 +719,7 @@ public:
|
||||
}
|
||||
|
||||
void parse() {
|
||||
auto root = Parser->parse();
|
||||
if (SynTreeCreator)
|
||||
SynTreeCreator->acceptSyntaxRoot(root, Parser->getSourceFile());
|
||||
Parser->parse();
|
||||
}
|
||||
|
||||
SourceFile &getSourceFile() {
|
||||
|
||||
Reference in New Issue
Block a user