Skip to content

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

Open
@mjambon

Description

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).

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpriority:lownot on the roadmap for now

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions