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:
@@ -189,6 +189,12 @@ private:
|
||||
return getNodeHandler()(&node);
|
||||
}
|
||||
|
||||
Optional<SourceFileSyntax> realizeSyntaxRoot(OpaqueSyntaxNode root,
|
||||
const SourceFile &SF) override {
|
||||
// We don't support realizing syntax nodes from the C layout.
|
||||
return None;
|
||||
}
|
||||
|
||||
void discardRecordedNode(OpaqueSyntaxNode node) override {
|
||||
// FIXME: This method should not be called at all.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user