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

Fix impossible pattern in highlight queries #221

Merged
merged 1 commit into from
Sep 4, 2022

Conversation

alex-pinkus
Copy link
Owner

After the pattern refactor, the highlight query for for_statement was never updated, and now refers to a pattern that cannot happen (a simple_identifier directly under a for_statement). In addition to being wrong, this gets rejected by older versions of tree-sitter.

Fixes #219

After the pattern refactor, the highlight query for `for_statement` was
never updated, and now refers to a pattern that cannot happen (a
`simple_identifier` directly under a `for_statement`). In addition to
being wrong, this gets rejected by older versions of `tree-sitter`.

Fixes #219
@alex-pinkus
Copy link
Owner Author

Same issue was reported in emacs-tree-sitter/elisp-tree-sitter#240.

@alex-pinkus alex-pinkus merged commit 1bdfc0d into main Sep 4, 2022
@alex-pinkus alex-pinkus deleted the fix-impossible-query branch September 4, 2022 04:10
alex-pinkus added a commit that referenced this pull request Sep 5, 2022
In #221, we fixed a bug where older versions of tree-sitter failed to
parse highlight queries because they were impossible.

Since we know that some editors use an older version of tree-sitter, it
would be prudent to test against it in CI.
alex-pinkus added a commit that referenced this pull request Sep 5, 2022
In #221, we fixed a bug where older versions of tree-sitter failed to
parse highlight queries because they were impossible.

Since we know that some editors use an older version of tree-sitter, it
would be prudent to test against it in CI.
alex-pinkus added a commit that referenced this pull request Sep 5, 2022
In #221, we fixed a bug where older versions of tree-sitter failed to
parse highlight queries because they were impossible.

Since we know that some editors use an older version of tree-sitter, it
would be prudent to test against it in CI.
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.

Does not work on Emacs 28.1
1 participant