mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-11 07:50:07 -04:00
chore: query formatting
This commit is contained in:
parent
79975d6557
commit
57a8acf0c4
674 changed files with 18466 additions and 12648 deletions
|
|
@ -1,5 +1,4 @@
|
|||
; Keywords
|
||||
|
||||
[
|
||||
"ENTRY"
|
||||
"SECTIONS"
|
||||
|
|
@ -12,17 +11,18 @@
|
|||
] @keyword
|
||||
|
||||
; Conditionals
|
||||
|
||||
(conditional_expression [ "?" ":" ] @keyword.conditional.ternary)
|
||||
(conditional_expression
|
||||
[
|
||||
"?"
|
||||
":"
|
||||
] @keyword.conditional.ternary)
|
||||
|
||||
; Variables
|
||||
|
||||
(symbol) @variable
|
||||
|
||||
(filename) @string.special.path
|
||||
|
||||
; Functions
|
||||
|
||||
(call_expression
|
||||
function: (symbol) @function.call)
|
||||
|
||||
|
|
@ -32,10 +32,7 @@
|
|||
|
||||
((call_expression
|
||||
function: (symbol) @function.builtin)
|
||||
(#any-of? @function.builtin
|
||||
"ABSOLUTE" "ALIAS" "ADDR" "ALIGN" "ALIGNOF" "BASE" "BLOCK" "CHIP" "DATA_SEGMENT_ALIGN"
|
||||
"DATA_SEGMENT_END" "DATA_SEGMENT_RELRO_END" "END" "LENGTH" "LOADADDR" "LOG2CEIL" "MAX" "MIN"
|
||||
"NEXT" "ORIGIN" "SEGMENT_START" "SIZEOF" "BYTE" "FILL" "LONG" "SHORT" "QUAD" "SQUAD" "WORD"))
|
||||
(#any-of? @function.builtin "ABSOLUTE" "ALIAS" "ADDR" "ALIGN" "ALIGNOF" "BASE" "BLOCK" "CHIP" "DATA_SEGMENT_ALIGN" "DATA_SEGMENT_END" "DATA_SEGMENT_RELRO_END" "END" "LENGTH" "LOADADDR" "LOG2CEIL" "MAX" "MIN" "NEXT" "ORIGIN" "SEGMENT_START" "SIZEOF" "BYTE" "FILL" "LONG" "SHORT" "QUAD" "SQUAD" "WORD"))
|
||||
|
||||
[
|
||||
"KEEP"
|
||||
|
|
@ -44,42 +41,63 @@
|
|||
] @function.builtin
|
||||
|
||||
; Types
|
||||
|
||||
(section_type "(" [ "NOLOAD" "DSECT" "COPY" "INFO" "OVERLAY" ] @type.builtin ")")
|
||||
(section_type
|
||||
"("
|
||||
[
|
||||
"NOLOAD"
|
||||
"DSECT"
|
||||
"COPY"
|
||||
"INFO"
|
||||
"OVERLAY"
|
||||
] @type.builtin
|
||||
")")
|
||||
|
||||
; Fields
|
||||
|
||||
[
|
||||
"ORIGIN" "org" "o"
|
||||
"LENGTH" "len" "l"
|
||||
"ORIGIN"
|
||||
"org"
|
||||
"o"
|
||||
"LENGTH"
|
||||
"len"
|
||||
"l"
|
||||
] @variable.member.builtin
|
||||
|
||||
; Constants
|
||||
|
||||
((symbol) @constant
|
||||
(#lua-match? @constant "^[%u_][%u%d_]+$"))
|
||||
|
||||
; Labels
|
||||
(entry_command
|
||||
name: (symbol) @label)
|
||||
|
||||
(entry_command name: (symbol) @label)
|
||||
(output_section
|
||||
name: (symbol) @label)
|
||||
|
||||
(output_section name: (symbol) @label)
|
||||
(memory_command
|
||||
name: (symbol) @label)
|
||||
|
||||
(memory_command name: (symbol) @label)
|
||||
(phdrs_command
|
||||
name: (symbol) @label)
|
||||
|
||||
(phdrs_command name: (symbol) @label)
|
||||
(region
|
||||
">"
|
||||
(symbol) @label)
|
||||
|
||||
(region ">" (symbol) @label)
|
||||
(lma_region
|
||||
">"
|
||||
(symbol) @label)
|
||||
|
||||
(lma_region ">" (symbol) @label)
|
||||
(phdr
|
||||
":"
|
||||
(symbol) @label)
|
||||
|
||||
(phdr ":" (symbol) @label)
|
||||
|
||||
([(symbol) (filename)] @label
|
||||
([
|
||||
(symbol)
|
||||
(filename)
|
||||
] @label
|
||||
(#lua-match? @label "^%."))
|
||||
|
||||
; Exceptions
|
||||
|
||||
"ASSERT" @keyword.exception
|
||||
|
||||
[
|
||||
|
|
@ -88,7 +106,6 @@
|
|||
] @variable.builtin
|
||||
|
||||
; Operators
|
||||
|
||||
[
|
||||
"+"
|
||||
"-"
|
||||
|
|
@ -121,18 +138,26 @@
|
|||
] @operator
|
||||
|
||||
; Literals
|
||||
|
||||
(number) @number
|
||||
|
||||
(quoted_symbol) @string
|
||||
|
||||
(wildcard_pattern [ "*" "[" "]" ] @character.special)
|
||||
(wildcard_pattern
|
||||
[
|
||||
"*"
|
||||
"["
|
||||
"]"
|
||||
] @character.special)
|
||||
|
||||
(attributes) @character.special
|
||||
|
||||
; Punctuation
|
||||
|
||||
[ "{" "}" "(" ")" ] @punctuation.bracket
|
||||
[
|
||||
"{"
|
||||
"}"
|
||||
"("
|
||||
")"
|
||||
] @punctuation.bracket
|
||||
|
||||
[
|
||||
":"
|
||||
|
|
@ -142,5 +167,4 @@
|
|||
">" @punctuation.special
|
||||
|
||||
; Comments
|
||||
|
||||
(comment) @comment @spell
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
; References
|
||||
|
||||
[
|
||||
(symbol)
|
||||
(filename)
|
||||
(quoted_symbol)
|
||||
(symbol)
|
||||
(filename)
|
||||
(quoted_symbol)
|
||||
] @local.reference
|
||||
|
||||
; Definitions
|
||||
(output_section
|
||||
name: (symbol) @local.definition.var)
|
||||
|
||||
(output_section name: (symbol) @local.definition.var)
|
||||
(memory_command
|
||||
name: (symbol) @local.definition.var)
|
||||
|
||||
(memory_command name: (symbol) @local.definition.var)
|
||||
|
||||
(phdrs_command name: (symbol) @local.definition.var)
|
||||
(phdrs_command
|
||||
name: (symbol) @local.definition.var)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue