Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting line information from other terminals. #46

Open
alberth opened this issue Feb 11, 2020 · 0 comments
Open

Getting line information from other terminals. #46

alberth opened this issue Feb 11, 2020 · 0 comments

Comments

@alberth
Copy link

alberth commented Feb 11, 2020

In the scanner, all tokens get position information. In the parser however you can only get line information from a single token, namely the first one. This makes it impossible to report position for error related to other tokens.

As a trival example, consider a rule like FUNCTION code END. The END can be just as wrong as FUNCTION, and it doesn't need to be on the same line, especially if code is not short.

In the current implementation, I would have to change value of every token in the scanner to include position information, which is silly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant