mirror of
https://github.com/GayPizzaSpecifications/pork.git
synced 2025-08-03 13:11:32 +00:00
parser: major refinement of error handling
This commit is contained in:
@ -13,6 +13,7 @@ dependencies {
|
||||
application {
|
||||
applicationName = "pork"
|
||||
mainClass.set("gay.pizza.pork.tool.MainKt")
|
||||
applicationDefaultJvmArgs += "-XstartOnFirstThread"
|
||||
}
|
||||
|
||||
for (task in arrayOf(tasks.shadowDistTar, tasks.shadowDistZip, tasks.shadowJar)) {
|
||||
|
@ -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