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

Track attr definition sites for duplicate attribute errors #81

Open
robrix opened this issue Aug 2, 2022 · 0 comments
Open

Track attr definition sites for duplicate attribute errors #81

robrix opened this issue Aug 2, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@robrix
Copy link
Contributor

robrix commented Aug 2, 2022

When I define an attribute that turns out to be a duplicate, it can be a substantial amount of effort to track out where the original assignment was, especially if other kinds of nodes use the same attribute names. It'd be nice if tree-sitter-graph were to keep track of where (in the rules file's source) attributes were created so they could be reported for debugging.

Hypothetically we could compute this statically given the grammar (or at least an overapproximation to it), but I think we'd be better off doing it dynamically at least for the time being. If it's too slow to do all the time, maybe we could turn it on with a flag.

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