ocaml-tree-sitter-core icon indicating copy to clipboard operation
ocaml-tree-sitter-core copied to clipboard

Do hyphens really need to be illegal?

Open patrick-nicodemus opened this issue 8 months ago • 0 comments

https://github.com/semgrep/ocaml-tree-sitter-core/blob/b7d8468878aabb138753ac4d0d1258bc73a975ef/src/gen/lib/Type_name.ml#L56

I want to use a grammar which contains hyphens in some strings, i.e.,

    "_tag_expr_start": {
      "type": "TOKEN",
      "content": {
        "type": "PREC",
        "value": "non-immediate",
        "content": {
          "type": "STRING",
          "value": ":"
        }
      }
    },

Is it really necessary to ban hyphens? It would be nice to be able to use a pre-existing grammar without having to scrape the hyphens out of it.

patrick-nicodemus avatar Jun 13 '24 15:06 patrick-nicodemus