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

This commit is contained in:
alex committed 2023-09-13 19:40:29 -07:00
1 parent b42ca92d9f
commit 2307fdc0ed
9 files changed
+729 -525

No files matched your search

@@ -23,7 +23,7 @@ abstract class Tool {
Tokenizer(createCharSource()).tokenize()
fun parse(attribution: NodeAttribution = DiscardNodeAttribution): CompilationUnit =
Parser(TokenStreamSource(tokenize()), attribution).readCompilationUnit()
Parser(TokenStreamSource(tokenize()), attribution).parseCompilationUnit()
fun highlight(scheme: HighlightScheme): List<Highlight> =
Highlighter(scheme).highlight(tokenize())