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(grammar): adapt to upstream regex change #99

Merged
merged 1 commit into from
May 3, 2024

Conversation

clason
Copy link
Contributor

@clason clason commented Apr 28, 2024

Upstream switched to Rust regex in recent tree-sitter, so the common escape_sequence pattern /u{[\da-fA-F]+}/ now needs to escape the braces. This fixes :TSInstallFromGrammar.

@DavisVaughan
Copy link
Member

Can you please point me to the upstream PR for this change?

@clason
Copy link
Contributor Author

clason commented Apr 29, 2024

tree-sitter/tree-sitter#2838 (EDIT wrong link, sorry about that)

@clason
Copy link
Contributor Author

clason commented Apr 30, 2024

(you can also just verify this by installing a recent tree-sitter CLI (0.22.5 is latest) and doing tree-sitter generate in your repo)

@amaanq
Copy link
Contributor

amaanq commented May 1, 2024

this is required, else this grammar is unusable in the latest versions

@clason
Copy link
Contributor Author

clason commented May 1, 2024

Changelog is here: https://github.com/tree-sitter/tree-sitter/blob/master/CHANGELOG.md#0220--2024-03-10 (change was made in 0.22.0).

@clason
Copy link
Contributor Author

clason commented May 3, 2024

@DavisVaughan would be nice to get this in (or let me know what I should change) so we can unbreak tree-sitter generate (this is the last remaining parser in nvim-treesitter that still fails due to that).

@DavisVaughan DavisVaughan merged commit 3914005 into r-lib:main May 3, 2024
1 check passed
@clason clason deleted the fix/regex branch May 3, 2024 18:16
@clason
Copy link
Contributor Author

clason commented May 3, 2024

Thanks!

@DavisVaughan
Copy link
Member

Thanks @clason, and thanks for committing the minimal amount to get this change in rather than all the new files that come with tree-sitter 0.22+ 😆 (although we will get those updated soon too).

@clason
Copy link
Contributor Author

clason commented May 3, 2024

The day I discovered generate --no-bindings was a happy day for me :) (I don't even know what half of these files do...)

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.

None yet

3 participants