feat: allow - in grammar names

A number of grammars in the wild have this character in their name:

- https://github.com/sogaiu/tree-sitter-janet-simple/pull/7
- https://github.com/tree-sitter/tree-sitter-c-sharp/pull/408
- https://github.com/tree-sitter/tree-sitter-embedded-template/pull/45
- https://github.com/tree-sitter/tree-sitter-ql-dbscheme/pull/7

I read through https://github.com/tree-sitter/tree-sitter/pull/3700 and
https://github.com/tree-sitter/tree-sitter/issues/3637, and it doesn't
look like there was much discussion about this name regex, so hopefully
this is an acceptable change?
This commit is contained in:
Jeremy Fleischman 2026-02-09 12:03:09 -08:00 committed by Will Lillis
parent 48e921883a
commit 7d3c321253

View file

@ -13,7 +13,7 @@
"name": {
"type": "string",
"description": "The name of the grammar.",
"pattern": "^[a-z0-9_]+$"
"pattern": "^[a-z0-9_-]+$"
},
"camelcase": {
"type": "string",