mirror of
https://github.com/GayPizzaSpecifications/pork.git
synced 2025-09-23 17:51:31 +00:00
parser: major refinement of error handling
This commit is contained in:
@ -12,7 +12,7 @@ class TokenizeCommand : CliktCommand(help = "Tokenize Compilation Unit", name =
|
||||
val tool = FileTool(PlatformFsProvider.resolve(path))
|
||||
val tokenStream = tool.tokenize()
|
||||
for (token in tokenStream.tokens) {
|
||||
println("${token.start} ${token.type.name} '${sanitize(token.text)}'")
|
||||
println("${token.sourceIndex.index} ${token.type.name} '${sanitize(token.text)}'")
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user