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

Support dot-prefixed predicates and MISSING keyword #46

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ribru17
Copy link
Contributor

@ribru17 ribru17 commented Nov 20, 2024

Restricts identifiers to not start with "." and also allows predicates to be denoted with "." as well as "#", as specified by query.c.

See https://github.com/tree-sitter/tree-sitter/blob/9c8055765849eee39f69a8eda7d2a5aede2b2e60/lib/src/query.c#L2308 and https://github.com/emacs-tree-sitter/tree-sitter-langs/blob/b955ffbe26b3a7e931f116720efa7dee9de35174/queries/hcl/highlights.terraform-mode.scm#L13


Since tree-sitter/tree-sitter#3887, query files
support a MISSING keyword to match against missing nodes. This updates
the grammar to allow for such a syntax.

@ribru17 ribru17 changed the title feat: predicates can begin with "." Support dot-prefixed predicates and MISSING keyword Dec 14, 2024
Copy link
Member

@amaanq amaanq left a comment

Choose a reason for hiding this comment

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

looks fine, but maybe it could be renamed to missing_node for consistency

Since tree-sitter/tree-sitter#3887, query files
support a MISSING keyword to match against missing nodes. This updates
the grammar to allow for such a syntax.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants