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

Manually inline _locally_permitted_modifiers #130

Merged
merged 1 commit into from
Mar 9, 2022

Conversation

alex-pinkus
Copy link
Owner

@alex-pinkus alex-pinkus commented Mar 9, 2022

See semgrep/ocaml-tree-sitter-semgrep#286

When generating a simplified grammar, the ocaml-tree-sitter code generator forces all hidden nodes to be visible. It appears that hidden nodes automatically get marked as inline, and that without that auto-inlining, the _locally_permitted_modifiers rule causes a conflict.

Rather than making the semgrep folks work around their conflict, we just check the inline declaration into the grammar itself so that it sticks around in the simplified grammar.

See semgrep/ocaml-tree-sitter-semgrep#286

When generating a simplified grammar, the `ocaml-tree-sitter` code
generator forces all hidden nodes to be visible. It appears that hidden
nodes automatically get marked as `inline`, and that without that
auto-inlining, the `_locally_permitted_modifiers` rule causes a
conflict.

Rather than making the semgrep folks work around their conflict, we just
check the `inline` declaration into the grammar itself so that it sticks
around in the simplified grammar.
@alex-pinkus alex-pinkus merged commit ede22f6 into main Mar 9, 2022
@alex-pinkus alex-pinkus deleted the manually-inline-local-modifiers branch March 9, 2022 06:13
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.

1 participant