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

Check consumed parser tokens for validity #1263

Merged
merged 1 commit into from
Nov 6, 2023
Merged

Conversation

msujew
Copy link
Member

@msujew msujew commented Nov 4, 2023

Closes #1262

This is effectively a second (but better) attempt for #1135. This change validates any parser token before putting it in the CST and AST. Invalid tokens are simply ignored after consuming them from the token stack.

This prevents the issue of invalid CST ranges (and therefore issues in LSP and value assignments) completely.

@msujew msujew added the parser Parser related issue label Nov 4, 2023
@msujew
Copy link
Member Author

msujew commented Nov 4, 2023

cc @Yokozuna59 This should fix the EOF issue you were experiencing.

Copy link
Contributor

@spoenemann spoenemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@msujew msujew merged commit 9b17737 into main Nov 6, 2023
3 checks passed
@msujew msujew deleted the msujew/validate-cst branch November 6, 2023 09:30
@spoenemann spoenemann modified the milestones: v2.1.0, v3.0.0 Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parser Parser related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parsing EOF leads to invalid CST ranges
2 participants