chore: query formatting

This commit is contained in:
Pham Huy Hoang 2024-01-06 15:05:50 +09:00 committed by Christian Clason
parent 79975d6557
commit 57a8acf0c4
674 changed files with 18466 additions and 12648 deletions

View file

@ -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

View file

@ -1,2 +1,2 @@
((comment) @injection.content
(#set! injection.language "comment"))
(#set! injection.language "comment"))

View file

@ -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)