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: remove unnecessary conflicts #110

Open
wants to merge 1 commit into
base: split_parser
Choose a base branch
from

Conversation

amaanq
Copy link
Member

@amaanq amaanq commented Jul 27, 2023

image

@amaanq
Copy link
Member Author

amaanq commented Jul 27, 2023

Ah...this grammar has conditional compilation - I forgot 🙈

Though I can't reproduce it locally using the npm scripts

@MDeiml
Copy link
Collaborator

MDeiml commented Jul 30, 2023

Yes, thanks for the effort though. Btw if you have any suggestion on how to do the conditional compilation better I'm all ears. But as it is tree-sitter doesn't seem to have good support for this.

@amaanq
Copy link
Member Author

amaanq commented Sep 17, 2023

Yes, thanks for the effort though. Btw if you have any suggestion on how to do the conditional compilation better I'm all ears. But as it is tree-sitter doesn't seem to have good support for this.

Your way is fine - though it is not the "prettiest", I wonder if we could add a features-flag to grammars like how Rust crates do it tree-sitter generate --features x and it'll check if x exists in the package.json['tree-sitter'][lang_idx][features] array

@MDeiml
Copy link
Collaborator

MDeiml commented Nov 5, 2023

FYI There's some discussion about this on multiple fronts like tree-sitter/tree-sitter-cpp#40 and nvim-treesitter/nvim-treesitter#3076 which came to similar results.

(Keeping this open since probably the conflicts should also be part of the conditonal compilation)

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