Closed KeesBleijenberg closed 1 year ago
The tutorial is not clear to me. It is about displaying error messages, not getting the value of the col and row. I can get the offset of an error. But how do I calculate the col and row from the offset?
I think you are looking for attachSourcePos. You can run your parser with runParser' to get PosState s (it will be inside State s e).
attachSourcePos
runParser'
PosState s
State s e
Thank you. This solved the problem.
The tutorial is not clear to me. It is about displaying error messages, not getting the value of the col and row. I can get the offset of an error. But how do I calculate the col and row from the offset?