h0tk3y / better-parse

A nice parser combinator library for Kotlin
Apache License 2.0
421 stars 42 forks source link

Question: how to get line/column numbers? #68

Closed TheZipCreator closed 1 year ago

TheZipCreator commented 1 year ago

I'm making an interpreter with this library right now, and I need a way to get line/column numbers of tokens (so that I can print out where an error is were one to occur). how would I achieve this?

TheZipCreator commented 1 year ago

oh, I'm stupid. TokenMatch has row and column numbers which I can use