[SyntaxParse] Fix memory leak for explicit syntax actions

Add SyntaxParseActions::discardRecordedNode() as a workaround for memory
leak during syntax parsing migration.
This commit is contained in:
Rintaro Ishizaki
2019-08-27 17:20:51 -07:00
parent 80085e0d27
commit b9985dbe87
9 changed files with 43 additions and 6 deletions

View File

@@ -190,6 +190,10 @@ public:
return getNodeHandler()(&node);
}
void discardRecordedNode(OpaqueSyntaxNode node) override {
// FIXME: This method should not be called at all.
}
std::pair<size_t, OpaqueSyntaxNode>
lookupNode(size_t lexerOffset, SyntaxKind kind) override {
auto NodeLookup = getNodeLookup();