mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-16 10:20:11 -04:00
chore: query formatting
This commit is contained in:
parent
79975d6557
commit
57a8acf0c4
674 changed files with 18466 additions and 12648 deletions
|
|
@ -1,8 +1,9 @@
|
|||
;; adapted from https://github.com/naclsn/tree-sitter-nasm/blob/main/queries/highlights.scm
|
||||
|
||||
; adapted from https://github.com/naclsn/tree-sitter-nasm/blob/main/queries/highlights.scm
|
||||
(word) @variable
|
||||
|
||||
((word) @constant
|
||||
(#lua-match? @constant "^[A-Z_][?A-Z_0-9]+$"))
|
||||
|
||||
((word) @constant.builtin
|
||||
(#lua-match? @constant.builtin "^__%?[A-Z_a-z0-9]+%?__$"))
|
||||
|
||||
|
|
@ -11,19 +12,28 @@
|
|||
(section_here_token)
|
||||
] @variable.builtin
|
||||
|
||||
(label (word) @label)
|
||||
(assembl_directive_symbols (word) @label)
|
||||
(assembl_directive_sections (word) @label)
|
||||
(label
|
||||
(word) @label)
|
||||
|
||||
(assembl_directive_symbols
|
||||
(word) @label)
|
||||
|
||||
(assembl_directive_sections
|
||||
(word) @label)
|
||||
|
||||
(unary_expression
|
||||
operator: _ @operator)
|
||||
|
||||
(binary_expression
|
||||
operator: _ @operator)
|
||||
|
||||
"?" @constant.builtin
|
||||
|
||||
(conditional_expression
|
||||
[ "?" ":" ] @keyword.conditional.ternary)
|
||||
[
|
||||
"?"
|
||||
":"
|
||||
] @keyword.conditional.ternary)
|
||||
|
||||
[
|
||||
":"
|
||||
|
|
@ -31,12 +41,16 @@
|
|||
] @punctuation.delimiter
|
||||
|
||||
[
|
||||
"(" ")"
|
||||
"[" "]"
|
||||
"{" "}"
|
||||
"("
|
||||
")"
|
||||
"["
|
||||
"]"
|
||||
"{"
|
||||
"}"
|
||||
] @punctuation.bracket
|
||||
|
||||
(instruction_prefix) @keyword
|
||||
|
||||
(actual_instruction
|
||||
instruction: (word) @function.builtin)
|
||||
|
||||
|
|
@ -44,13 +58,16 @@
|
|||
base: (word) @function.call)
|
||||
|
||||
(size_hint) @type
|
||||
|
||||
(struc_declaration
|
||||
name: (word) @type)
|
||||
|
||||
(struc_instance
|
||||
name: (word) @type)
|
||||
|
||||
(effective_address
|
||||
hint: _ @type)
|
||||
|
||||
(effective_address
|
||||
segment: _ @constant.builtin)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue