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: properly suffix elifdef #186

Merged
merged 4 commits into from
Jan 26, 2024
Merged

Conversation

brandonspark
Copy link
Contributor

This PR makes it so that preproc_elifdef is not unconditionally used in all preproc_if_<suffix> variants. For instance, preproc_if and preproc_if_in_field_declaration_list are in different contexts, and the former permits any block_item to appear within its preprocessor statements, whereas the latter only allows _field_declaration_list_item. Since the preproc_elifdef was not suffixed, however, this means preproc_if_in_field_declaration_list actually also permits block_items to appear in it.

@brandonspark brandonspark changed the title fix: narrow elifdef fix: properly suffix elifdef Jan 26, 2024
@amaanq
Copy link
Member

amaanq commented Jan 26, 2024

Nice catch, thanks! Just a side note, can you regenerate with tree-sitter built from 0.20.9 or HEAD? you can do so like so:
cargo install --git https://github.com/tree-sitter/tree-sitter

If you notice, your generated output rolls back some changes made in parser.h

@brandonspark
Copy link
Contributor Author

@amaanq done!

@amaanq
Copy link
Member

amaanq commented Jan 26, 2024

thanks!

@amaanq amaanq merged commit ecdd500 into tree-sitter:master Jan 26, 2024
4 of 5 checks passed
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