Merge pull request #542 from SKalt/issue-524-document-supertypes-in-grammar-schema

feat(cli): documented optional supertypes string[] in grammar schema
This commit is contained in:
Max Brunsfeld 2020-02-24 16:14:49 -08:00 committed by GitHub
commit 6cb8d24de2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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": "A list of hidden rule names that should be considered supertypes in the generated node types file. See http://tree-sitter.github.io/tree-sitter/using-parsers#static-node-types.",
"type": "array",
"items": {
"description": "the name of a rule in `rules` or `extras`",
"type": "string"
}
}
},