Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/t32/highlights.scm')
| -rw-r--r-- | runtime/queries/t32/highlights.scm | 134 |
1 files changed, 26 insertions, 108 deletions
diff --git a/runtime/queries/t32/highlights.scm b/runtime/queries/t32/highlights.scm index bcfa3add..c3bba814 100644 --- a/runtime/queries/t32/highlights.scm +++ b/runtime/queries/t32/highlights.scm @@ -1,28 +1,3 @@ -; Operators in command and conditional HLL expressions -(hll_comma_expression - "," @operator) - -(hll_conditional_expression - [ - "?" - ":" -] @operator) - - -; Keywords, punctuation and operators -[ - "enum" - "struct" - "union" -] @keyword.storage.type - -"sizeof" @keyword.operator - -[ - "const" - "volatile" -] @keyword.storage.modifier - [ "=" "^^" @@ -53,92 +28,48 @@ "&" "->" "*" - "-=" - "+=" - "*=" - "/=" - "%=" - "|=" - "&=" - "^=" - ">>=" - "<<=" - "--" - "++" ] @operator [ - "(" - ")" - "{" - "}" - "[" - "]" + "(" + ")" + "{" + "}" + "[" + "]" ] @punctuation.bracket [ "," "." + ";" ] @punctuation.delimiter -; HLL variables -(identifier) @variable -(hll_field_identifier) @variable.other.member - - -; Strings and others literal types -(access_class) @constant.builtin - +; Constants [ + (access_class) (address) (bitmask) (file_handle) - (integer) - (hll_number_literal) -] @constant.numeric.integer + (frequency) + (time) +] @constant.builtin [ (float) - (frequency) (percentage) - (time) ] @constant.numeric.float -[ - (string) - (hll_string_literal) -] @string +(integer) @constant.numeric.integer -(hll_escape_sequence) @constant.character.escape - -(path) @string.special.path -(symbol) @string.special.symbol - -[ - (character) - (hll_char_literal) -] @constant.character +(character) @constant.character +; Strings +(string) @string -; Types in HLL expressions -[ - (hll_type_identifier) - (hll_type_descriptor) -] @type - -(hll_type_qualifier) @keyword.storage.modifier - -(hll_primitive_type) @type.builtin - - -; HLL call expressions -(hll_call_expression - function: (hll_field_expression - field: (hll_field_identifier) @function)) - -(hll_call_expression - function: (identifier) @function) +(path) @string.special.path +(symbol) @string.special.symbol ; Returns ( @@ -152,13 +83,11 @@ (#match? @keyword.return "^[rR][eE][tT][uU][rR][nN]$") ) - ; Subroutine calls (subroutine_call_expression command: (identifier) @keyword subroutine: (identifier) @function) - ; Subroutine blocks (subroutine_block command: (identifier) @keyword @@ -168,17 +97,15 @@ label: (identifier) @function (block)) - ; Parameter declarations (parameter_declaration command: (identifier) @keyword (identifier)? @constant.builtin macro: (macro) @variable.parameter) - ; Variables, constants and labels -(macro) @variable.builtin -(trace32_hll_variable) @variable.builtin +(macro) @variable +(internal_c_variable) @variable ( (command_expression @@ -189,28 +116,17 @@ (labeled_expression label: (identifier) @label) -(option_expression - (identifier) @constant.builtin) - -(format_expression - (identifier) @constant.builtin) - ( - (argument_list (identifier) @constant.builtin) - (#match? @constant.builtin "^[%/][a-zA-Z][a-zA-Z0-9.]*$") + (argument_list (identifier) @constant.builtin) + (#match? @constant.builtin "^[%/][a-zA-Z][a-zA-Z0-9.]*$") ) (argument_list - (identifier) @constant.builtin) - + (identifier) @constant) ; Commands (command_expression command: (identifier) @keyword) (macro_definition command: (identifier) @keyword) -(call_expression - function: (identifier) @function.builtin) - - ; Control flow (if_block command: (identifier) @keyword.control.conditional.if) @@ -222,6 +138,8 @@ (repeat_block command: (identifier) @keyword.control.loop) +(call_expression + function: (identifier) @function) - +(type_identifier) @type (comment) @comment |