feat(ziggy-schema): Add ziggy-schema parser and queries

Ziggy-schema is the schema definition file format for a ziggy file.
This commit is contained in:
Tim Culverhouse 2024-09-09 09:27:03 -05:00 committed by Christian Clason
parent 1a6fa428b8
commit 58c702c4d5
4 changed files with 53 additions and 0 deletions

View file

@ -892,5 +892,8 @@
},
"ziggy": {
"revision": "c66f47bc632c66668d61fa06eda112b41d6e5130"
},
"ziggy_schema": {
"revision": "c66f47bc632c66668d61fa06eda112b41d6e5130"
}
}

View file

@ -2573,6 +2573,15 @@ list.ziggy = {
maintainers = { "@rockorager" },
}
list.ziggy_schema = {
install_info = {
url = "https://github.com/kristoff-it/ziggy",
files = { "src/parser.c" },
location = "tree-sitter-ziggy-schema",
},
maintainers = { "@rockorager" },
}
list.templ = {
install_info = {
url = "https://github.com/vrischmann/tree-sitter-templ",

View file

@ -0,0 +1,38 @@
(struct_field
key: (_) @keyword)
(tag_name) @function
[
"unknown"
"any"
"struct"
"root"
"enum"
"map"
] @keyword
(identifier) @type
"?" @type
[
"bool"
"bytes"
"int"
"float"
] @constant.builtin
(doc_comment) @comment.documentation
[
","
"|"
] @punctuation.delimiter
[
"["
"]"
"{"
"}"
] @punctuation.bracket

View file

@ -0,0 +1,3 @@
(struct) @indent.begin
"}" @indent.end