From 5236768c3308314f0d4bf2066d4411b2df4d59e3 Mon Sep 17 00:00:00 2001 From: TJ DeVries Date: Tue, 17 Nov 2020 17:28:53 -0500 Subject: add gdscript --- queries/gdscript/highlights.scm | 27 +++++++++++++++++++++++++++ queries/gdscript/locals.scm | 10 ++++++++++ 2 files changed, 37 insertions(+) create mode 100644 queries/gdscript/highlights.scm create mode 100644 queries/gdscript/locals.scm (limited to 'queries/gdscript') diff --git a/queries/gdscript/highlights.scm b/queries/gdscript/highlights.scm new file mode 100644 index 000000000..06b7c8df6 --- /dev/null +++ b/queries/gdscript/highlights.scm @@ -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 diff --git a/queries/gdscript/locals.scm b/queries/gdscript/locals.scm new file mode 100644 index 000000000..313af2aef --- /dev/null +++ b/queries/gdscript/locals.scm @@ -0,0 +1,10 @@ +(function_definition) @definition.function + +[ + (extends_statement) + (variable_statement) + (expression_statement) + (if_statement) + (function_definition) + (body) +] @scope -- cgit v1.2.3-70-g09d2