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

bump tree-sitter to 0.23, hide newline tokens #146

Merged
merged 2 commits into from
Aug 26, 2024
Merged

bump tree-sitter to 0.23, hide newline tokens #146

merged 2 commits into from
Aug 26, 2024

Conversation

amaanq
Copy link
Member

@amaanq amaanq commented Aug 26, 2024

This now uses tree-sitter-language to export the grammar, instead of relying on a cyclic dependency of itself, which caused a whole slew of issues.

@amaanq amaanq changed the title bump tree-sitter to 0.23 bump tree-sitter to 0.23, hide newline tokens Aug 26, 2024
@amaanq amaanq merged commit 6fc3e1c into master Aug 26, 2024
4 checks passed
@smoelius
Copy link

This now uses tree-sitter-language to export the grammar, instead of relying on a cyclic dependency of itself, which caused a whole slew of issues.

Sorry for the naive question, but how would one adapt an expression like this?

    Query::new(&tree_sitter_go::language(), source).unwrap()

@smoelius
Copy link

Sorry, I think I figured it out. I need to call <Language as From<LanguageFn>>::from: https://docs.rs/tree-sitter/0.23.0/tree_sitter/struct.Language.html#impl-From%3CLanguageFn%3E-for-Language

@amaanq
Copy link
Member Author

amaanq commented Sep 1, 2024

Yeah, something like Query::new(&tree_sitter_go::LANGUAGE.into(), source).unwrap() should work.

@amaanq amaanq deleted the 0.23 branch September 2, 2024 08:57
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.

2 participants