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

Better syntax error reporting #221

Open
ZedThree opened this issue Dec 11, 2024 · 0 comments
Open

Better syntax error reporting #221

ZedThree opened this issue Dec 11, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@ZedThree
Copy link
Member

The tree-sitter error reporting is rather lacklustre, and we may currently flag an entire file as being a syntax error in some circumstances. Unfortunately some errors cascade and a single error can be reported in multiple subsequent places. For example, this file has 11 errors, including the whole file, because there are two variables containing $, which is non-standard: https://github.com/bmad-sim/bmad-ecosystem/blob/028ad6228336eae46adc5df4e781b33384a78313/util_programs/wake_plot/wake_plot.f90#L135-L142

We can distinguish between node.is_error(), .has_error(), .is_missing(), and .is_extra(). This might let us narrow things down.

@ZedThree ZedThree added the enhancement New feature or request label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant