parser: rewrite to be able to parse any node type on demand

This commit is contained in:
2023-09-13 19:29:23 -07:00
parent b42ca92d9f
commit 2307fdc0ed
9 changed files with 729 additions and 525 deletions

View File

@ -12,7 +12,7 @@ class PorkParser : PsiParser {
val source = PsiBuilderTokenSource(builder)
val parser = Parser(source, psiBuilderMarkAttribution)
try {
parser.within { parser.readCompilationUnit() }
parser.parseCompilationUnit()
} catch (_: ExitParser) {}
return builder.treeBuilt
}