feat(cli): documented optional supertypes Array<string> in grammar-schema.json

This commit is contained in:
Steven Kalt 2020-02-15 11:23:14 -05:00
parent b2e79f6438
commit c5ca259d09
No known key found for this signature in database
GPG key ID: 3A0190D9053F2975

View file

@ -1,4 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "tree-sitter grammar specification",
"type": "object",
"required": ["name", "rules"],
@ -7,6 +9,7 @@
"properties": {
"name": {
"description": "the name of the grammar",
"type": "string",
"pattern": "^[a-zA-Z_]\\w*"
},
@ -57,6 +60,15 @@
"word": {
"type": "string",
"pattern": "^[a-zA-Z_]\\w*"
},
"supertypes": {
"description": "each supertype instructs the parser to replace a set of subtypes in the `types` list with a single supertype.",
"type": "array",
"items": {
"description": "the name of a rule in `rules` or `extras`",
"type": "string"
}
}
},