mirror of
https://github.com/GayPizzaSpecifications/pork.git
synced 2025-08-03 13:11:32 +00:00
parser: rewrite to be able to parse any node type on demand
This commit is contained in:
@ -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())
|
||||
|
Reference in New Issue
Block a user