You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the biggest downside to using a Tree-sitter parser in a compiler front-end is that, while we've done a lot of work on Tree-sitter's error recovery, we haven't yet built out functionality for error messages. So it isn't trivial to find out the exact token/position where the error initiated, and get a list of expected tokens, and things like that.
The proposed use-case in the linked discussion is being able to use the generated parser in the compiler front-end for a language. That being the scenario, continuing after the error is not necessary since code emission could stop at the first syntax error found.
What needs to be done
"Stop-at-first-error" mode
Error Context
The line and column where it started
List of constructs which are supposed to be in the error's position (semantic error)
List of tokens which were missing or were misplaced (grammatical error)
The text was updated successfully, but these errors were encountered:
From #831 (comment)
The proposed use-case in the linked discussion is being able to use the generated parser in the compiler front-end for a language. That being the scenario, continuing after the error is not necessary since code emission could stop at the first syntax error found.
What needs to be done
The text was updated successfully, but these errors were encountered: