ajeetdsouza / loxcraft

Language tooling for the Lox programming language.
https://ajeetdsouza.github.io/loxcraft/
MIT License
274 stars 11 forks source link

Add byte indexes to AST #8

Closed ajeetdsouza closed 2 years ago

ajeetdsouza commented 2 years ago

The parser should include byte indexes in the AST to allow go-to definitions as well as runtime error reporting. For example, Gluon does this with the Span type: https://github.com/gluon-lang/gluon/blob/master/vm/src/core/grammar.lalrpop