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

Create subcommands for 'ocaml-tree-sitter-gen-c' and ''ocaml-tree-sitter-gen-ocaml' #182

Open
mjambon opened this issue Apr 12, 2021 · 1 comment
Labels
enhancement New feature or request priority:low not on the roadmap for now

Comments

@mjambon
Copy link
Member

mjambon commented Apr 12, 2021

As suggested here, let's make ocaml-tree-sitter the main command for everything, including:

  • what ocaml-tree-sitter currently does: generate ocaml code from grammar.json
  • simplify-grammar
  • gen-ocaml, a bash script
  • gen-c, a bash script
  • possibly a combination of the above that does everything

Tasks include:

  • finding good names for the subcommands
  • locating the external executables to be called (the bash scripts): should we rely on $PATH to locate them or something else?
  • adding subcommands to the cmdliner interface. See cmdliner cheatsheet for how to add subcommands.

Compatibility with the previous ocaml-tree-sitter command line is not important, since as far as I know, the only user is semgrep and all that code exists in the ocaml-tree-sitter repo (the semgrep build does not call ocaml-tree-sitter).

@mjambon mjambon added enhancement New feature or request priority:low not on the roadmap for now labels Apr 12, 2021
@mjambon
Copy link
Member Author

mjambon commented Jun 21, 2021

Some of this work was done (#202) already: simplify is now a subcommand of ocaml-tree-sitter. What's left I think is to add subcommands for gen-c and gen-ocaml, which would call the commands ocaml-tree-sitter-gen-c and ocaml-tree-sitter-gen-ocaml respectively.

@mjambon mjambon changed the title Create subcommands for 'ocaml-tree-sitter' Create subcommands for 'ocaml-tree-sitter-gen-c' and ''ocaml-tree-sitter-gen-ocaml' Jun 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority:low not on the roadmap for now
Development

No branches or pull requests

1 participant