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

Add options '--strip' and '--normalize' #83

Merged
merged 1 commit into from
Sep 21, 2024
Merged

Add options '--strip' and '--normalize' #83

merged 1 commit into from
Sep 21, 2024

Conversation

mjambon
Copy link
Member

@mjambon mjambon commented Sep 20, 2024

This facilitates the comparison of two versions of the same grammar.

test plan:

$ make && make install
$ ocaml-tree-sitter to-js --normalize ~/tree-sitter-c-sharp/src/grammar.json

... and check that the JS output doesn't contain constructs that don't affect the types in CST.ml such as field(), alias(), prec(), etc.

I'm using this for the C# upgrade. There will be a PR in ocaml-tree-sitter-semgrep with an example.

Security

  • Change has no security implications (otherwise, ping the security team)

…parison

of two versions of the same grammar.
@mjambon mjambon requested a review from nmote September 20, 2024 20:57
@mjambon mjambon changed the title Add options '--strip' and '--normalize' options Add options '--strip' and '--normalize' Sep 20, 2024
Copy link
Contributor

@nmote nmote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable

@aryx aryx merged commit 9fe848c into main Sep 21, 2024
2 checks passed
@aryx aryx deleted the martin/diff branch September 21, 2024 12:19
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.

3 participants