diff options
author | EmmChriss | 2022-04-15 15:35:23 +0000 |
---|---|---|
committer | GitHub | 2022-04-15 15:35:23 +0000 |
commit | 50df92481103ec4b2d2549eebc0dcbae73ed8a20 (patch) | |
tree | a441fc4aecd0bbe849e66d3b801447826928dc32 /runtime/queries/gdscript/highlights.scm | |
parent | 893963df0ad8596034522cd18570517f823d7123 (diff) |
gdscript support (#1985)
Diffstat (limited to 'runtime/queries/gdscript/highlights.scm')
-rw-r--r-- | runtime/queries/gdscript/highlights.scm | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/runtime/queries/gdscript/highlights.scm b/runtime/queries/gdscript/highlights.scm new file mode 100644 index 00000000..0849eedb --- /dev/null +++ b/runtime/queries/gdscript/highlights.scm @@ -0,0 +1,93 @@ +; Identifier naming conventions + +((identifier) @constant + (#match? @constant "^[A-Z][A-Z_]*$")) + +; Function calls + +(attribute_call (identifier) @function) + +(base_call (identifier) @function) + +(call (identifier) @function) + +; Function definitions + +(function_definition (name) @function) + +(constructor_definition "_init" @function) + +;; Literals +(integer) @constant.numeric.integer +(float) @constant.numeric.float +(comment) @comment +(string) @string +(escape_sequence) @constant.character.escape +(identifier) @variable +(type) @type + +;; Literals +[ + (true) + (false) + (null) +] @constant.builtin + +[ + "+" + "-" + "*" + "/" + "%" + "==" + "!=" + ">" + "<" + ">=" + "<=" + "=" + "+=" + "-=" + "*=" + "/=" + "%=" + "&" + "|" + "^" + "~" + "<<" + ">>" + "and" + "or" + "not" +] @operator + +[ + (static_keyword) + (remote_keyword) + (tool_statement) + "var" + "func" + "setget" + "in" + "is" + "as" + "if" + "else" + "elif" + "while" + "for" + "return" + "break" + "continue" + "pass" + "match" + "class" + "class_name" + "enum" + "signal" + "onready" + "export" + "extends" + "const" +] @keyword |