feat(meson): add support for meson

Log: meson build
This commit is contained in:
ShootingStarDragons 2022-08-23 18:52:45 +08:00 committed by Stephan Seitz
parent 08e9b7cdf7
commit d4ca2c6791
3 changed files with 92 additions and 0 deletions

View file

@ -54,6 +54,17 @@ list.agda = {
filetype = "agda",
maintainers = { "@Decodetalkers" },
}
list.meson = {
install_info = {
url = "https://github.com/Decodetalkers/tree-sitter-meson",
branch = "master",
files = { "src/parser.c" },
},
filetype = "meson",
maintainers = { "@Decodetalkers" },
}
list.qmljs = {
install_info = {
url = "https://github.com/yuja/tree-sitter-qmljs",

9
queries/meson/folds.scm Normal file
View file

@ -0,0 +1,9 @@
[
(normal_command)
(if_condition)
(if_command)
(else_command)
(elseif_command)
(foreach_command)
(list)
] @fold

View file

@ -0,0 +1,72 @@
(comment) @comment
(number) @number
(bool) @boolean
[
"("
")"
"{"
"}"
"["
"]"
]
@punctuation.bracket
[
"and"
"not"
"or"
"in"
] @keyword.operator
[
"="
"=="
"!="
"+"
"/"
"/="
"+="
"-="
">"
">="
] @operator
[
"if"
"elif"
"else"
"endif"
] @conditional
[
"foreach"
"endforeach"
(keyword_break)
(keyword_continue)
] @repeat
;;; format
(string) @string
["@"] @punctuation.special
(experession_statement
object: (identifier) @variable)
(normal_command
command: (identifier) @function)
(list
variable: (identifier) @variable)
(formatunit
variable: (identifier) @variable)
(variableunit
value: (identifier) @variable)
(pair
key: (identifier) @property)
(pair
value: (identifier) @variable)
(escape_sequence) @string.escape