add gdscript

This commit is contained in:
TJ DeVries 2020-11-17 17:28:53 -05:00 committed by Stephan Seitz
parent 57ba843d18
commit 5236768c33
3 changed files with 46 additions and 0 deletions

View file

@ -389,6 +389,15 @@ list.sparql = {
maintainers = { "@bonabeavis" },
}
list.gdscript = {
install_info = {
url = "https://github.com/PrestonKnopp/tree-sitter-gdscript",
files = { "src/parser.c", "src/scanner.cc" },
},
readme_name = "Godot (gdscript)",
maintainers = {"not @tjdevries"},
}
local M = {
list = list
}

View file

@ -0,0 +1,27 @@
(identifier) @variable
(name) @variable
(type) @type
(comment) @comment
(enum_definition
(name) @constant) @Statement
(function_definition
(name) @function
(parameters
(identifier)* @parameter) @punctuation.bracket) @Statement
(return_statement) @Statement
(variable_statement
(inferred_type)? @operator) @Statement
(call (identifier) @function) @punctuation.bracket
(attribute (attribute_call (identifier) @function) @punctuation.bracket)
; simple items
[ (binary_operator) (comparison_operator) ] @operator
[ (false) (true) ] @boolean
(string) @string
(integer) @number

View file

@ -0,0 +1,10 @@
(function_definition) @definition.function
[
(extends_statement)
(variable_statement)
(expression_statement)
(if_statement)
(function_definition)
(body)
] @scope