aboutsummaryrefslogtreecommitdiffstats
path: root/queries/t32
diff options
context:
space:
mode:
authorPham Huy Hoang <hoangtun0810@gmail.com>2024-01-06 15:05:50 +0900
committerChristian Clason <c.clason@uni-graz.at>2024-01-19 16:58:37 +0100
commit57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9 (patch)
tree70bf645539882b88e6fa129cefd30986b89bbac3 /queries/t32
parentci: add query lint job (diff)
downloadnvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar
nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.gz
nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.bz2
nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.lz
nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.xz
nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.zst
nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.zip
chore: query formatting
Diffstat (limited to 'queries/t32')
-rw-r--r--queries/t32/highlights.scm68
-rw-r--r--queries/t32/injections.scm2
-rw-r--r--queries/t32/locals.scm16
3 files changed, 37 insertions, 49 deletions
diff --git a/queries/t32/highlights.scm b/queries/t32/highlights.scm
index a0e1e3c2d..e2b6c44c8 100644
--- a/queries/t32/highlights.scm
+++ b/queries/t32/highlights.scm
@@ -70,17 +70,15 @@
"volatile"
] @type.qualifier
-
; Operators in comma and conditional HLL expressions
(hll_comma_expression
"," @operator)
(hll_conditional_expression
[
- "?"
- ":"
-] @keyword.conditional.ternary)
-
+ "?"
+ ":"
+ ] @keyword.conditional.ternary)
; Strings and others literal types
(access_class) @constant.builtin
@@ -108,6 +106,7 @@
(hll_escape_sequence) @string.escape
(path) @string.special.path
+
(symbol) @string.special.symbol
[
@@ -115,31 +114,29 @@
(hll_char_literal)
] @character
-
; Types in HLL expressions
[
- (hll_type_identifier)
- (hll_type_descriptor)
+ (hll_type_identifier)
+ (hll_type_descriptor)
] @type
(hll_type_qualifier) @type.qualifier
(hll_primitive_type) @type.builtin
-
; HLL expressions
(hll_call_expression
function: (identifier) @function.call)
(hll_call_expression
- function: (hll_field_expression
- field: (hll_field_identifier) @function.call))
-
+ function:
+ (hll_field_expression
+ field: (hll_field_identifier) @function.call))
; HLL variables
(identifier) @variable
-(hll_field_identifier) @variable.member
+(hll_field_identifier) @variable.member
; Commands
(command_expression
@@ -151,44 +148,39 @@
(call_expression
function: (identifier) @function.builtin)
-
; Returns
-(
- (command_expression
- command: (identifier) @keyword.return)
- (#match? @keyword.return "^[eE][nN][dD]([dD][oO])?$")
-)
-(
- (command_expression
- command: (identifier) @keyword.return)
- (#lua-match? @keyword.return "^[rR][eE][tT][uU][rR][nN]$")
-)
+((command_expression
+ command: (identifier) @keyword.return)
+ (#match? @keyword.return "^[eE][nN][dD]([dD][oO])?$"))
+((command_expression
+ command: (identifier) @keyword.return)
+ (#lua-match? @keyword.return "^[rR][eE][tT][uU][rR][nN]$"))
; Subroutine calls
(subroutine_call_expression
command: (identifier) @keyword
subroutine: (identifier) @function.call)
-
; Variables, constants and labels
(macro) @variable.builtin
+
(trace32_hll_variable) @variable.builtin
(argument_list
(identifier) @constant.builtin)
-(
- (argument_list (identifier) @constant.builtin)
- (#lua-match? @constant.builtin "^[%%/][%l%u][%l%u%d.]*$")
-)
+((argument_list
+ (identifier) @constant.builtin)
+ (#lua-match? @constant.builtin "^[%%/][%l%u][%l%u%d.]*$"))
-(
- (command_expression
- command: (identifier) @keyword
- arguments: (argument_list . (identifier) @label))
- (#lua-match? @keyword "^[gG][oO][tT][oO]$")
-)
+((command_expression
+ command: (identifier) @keyword
+ arguments:
+ (argument_list
+ .
+ (identifier) @label))
+ (#lua-match? @keyword "^[gG][oO][tT][oO]$"))
(labeled_expression
label: (identifier) @label)
@@ -199,7 +191,6 @@
(format_expression
(identifier) @constant.builtin)
-
; Subroutine blocks
(subroutine_block
command: (identifier) @keyword.function
@@ -209,24 +200,23 @@
label: (identifier) @function
(block))
-
; Parameter declarations
(parameter_declaration
command: (identifier) @keyword
(identifier)? @constant.builtin
macro: (macro) @variable.parameter)
-
; Control flow
(if_block
command: (identifier) @keyword.conditional)
+
(else_block
command: (identifier) @keyword.conditional)
(while_block
command: (identifier) @keyword.repeat)
+
(repeat_block
command: (identifier) @keyword.repeat)
-
(comment) @comment @spell
diff --git a/queries/t32/injections.scm b/queries/t32/injections.scm
index 321c90add..2f0e58eb6 100644
--- a/queries/t32/injections.scm
+++ b/queries/t32/injections.scm
@@ -1,2 +1,2 @@
((comment) @injection.content
- (#set! injection.language "comment"))
+ (#set! injection.language "comment"))
diff --git a/queries/t32/locals.scm b/queries/t32/locals.scm
index bad645fdf..3c10c58ab 100644
--- a/queries/t32/locals.scm
+++ b/queries/t32/locals.scm
@@ -1,5 +1,4 @@
(block) @local.scope
-
; Parameter definitions
(parameter_declaration
command: (identifier)
@@ -12,8 +11,9 @@
(command_expression
command: (identifier)
- arguments: (argument_list
- declarator: (trace32_hll_variable) @local.definition.var))
+ arguments:
+ (argument_list
+ declarator: (trace32_hll_variable) @local.definition.var))
; Function definitions
(subroutine_block
@@ -25,12 +25,10 @@
(block))
; References
-(
- (subroutine_call_expression
- command: (identifier)
- subroutine: (identifier) @local.reference)
- (#set! reference.kind "function")
-)
+((subroutine_call_expression
+ command: (identifier)
+ subroutine: (identifier) @local.reference)
+ (#set! reference.kind "function"))
[
(macro)