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

Tree-sitter: Make movements consistent with Lisp #83

Open
countvajhula opened this issue Feb 28, 2023 · 0 comments
Open

Tree-sitter: Make movements consistent with Lisp #83

countvajhula opened this issue Feb 28, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@countvajhula
Copy link
Collaborator

In the tree sitter node navigation commands, "named" visits too few nodes, while "all of them" visits too many. I'd say we're looking for the behavior that "all" has, except that it shouldn't visit punctuation like , and closing delimiters like ].

(a) Does tree-sitter provide some metadata on the node that we could use to tell that it's "empty", e.g. punctuation or a closing delimiter? If it does, then we could use the "all" behavior while avoiding such "empty" nodes.

(b) Another (less desirable) possibility is to have an exclusion list that skips over these at the symex level.

(c) A third possibility is to do nothing and leave it as "named" nodes, especially if we agree it would be preferable to option (b) above (e.g. would (b) require maintaining separate exclusion lists for different languages?).

Additional context: see this comment and the responses.

@countvajhula countvajhula converted this from a draft issue Feb 28, 2023
@countvajhula countvajhula added the bug Something isn't working label Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

1 participant