mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -04:00
feat(t32)!: update parser and queries (#8276)
`trace32_hll_variable` has been removed from the grammar. The queries are now capturing `symbol` instead. `symbol` is highlighted as variable or constant.
This commit is contained in:
parent
f46e3a09bd
commit
b50774079a
6 changed files with 17 additions and 13 deletions
|
|
@ -2271,7 +2271,7 @@ return {
|
||||||
},
|
},
|
||||||
t32 = {
|
t32 = {
|
||||||
install_info = {
|
install_info = {
|
||||||
revision = '2f604ad17a15c09d99648199da7f173eed8250dc',
|
revision = '056123923a10e3d537914885cfbacf79cd644e40',
|
||||||
url = 'https://github.com/xasc/tree-sitter-t32',
|
url = 'https://github.com/xasc/tree-sitter-t32',
|
||||||
},
|
},
|
||||||
maintainers = { '@xasc' },
|
maintainers = { '@xasc' },
|
||||||
|
|
|
||||||
|
|
@ -102,8 +102,6 @@
|
||||||
|
|
||||||
(path) @string.special.path
|
(path) @string.special.path
|
||||||
|
|
||||||
(symbol) @string.special.symbol
|
|
||||||
|
|
||||||
[
|
[
|
||||||
(character)
|
(character)
|
||||||
(hll_char_literal)
|
(hll_char_literal)
|
||||||
|
|
@ -159,7 +157,7 @@
|
||||||
; Variables, constants and labels
|
; Variables, constants and labels
|
||||||
(macro) @variable.builtin
|
(macro) @variable.builtin
|
||||||
|
|
||||||
(trace32_hll_variable) @variable.builtin
|
(symbol) @variable
|
||||||
|
|
||||||
(argument_list
|
(argument_list
|
||||||
(identifier) @constant.builtin)
|
(identifier) @constant.builtin)
|
||||||
|
|
@ -168,6 +166,12 @@
|
||||||
(identifier) @constant.builtin)
|
(identifier) @constant.builtin)
|
||||||
(#lua-match? @constant.builtin "^[%%/][%l%u][%l%u%d.]*$"))
|
(#lua-match? @constant.builtin "^[%%/][%l%u][%l%u%d.]*$"))
|
||||||
|
|
||||||
|
((symbol) @constant
|
||||||
|
(#lua-match? @constant "^\\\\\\\\\\\\[^\\\\]*(\\\\\\\\[^\\\\]*)?(\\\\[^\\\\]*)?$"))
|
||||||
|
|
||||||
|
((symbol) @constant
|
||||||
|
(#lua-match? @constant "^\\\\\\\\[^\\\\]*(\\\\[^\\\\]*)?$"))
|
||||||
|
|
||||||
((command_expression
|
((command_expression
|
||||||
command: (identifier) @keyword
|
command: (identifier) @keyword
|
||||||
arguments: (argument_list
|
arguments: (argument_list
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
(command_expression
|
(command_expression
|
||||||
command: (identifier)
|
command: (identifier)
|
||||||
arguments: (argument_list
|
arguments: (argument_list
|
||||||
declarator: (trace32_hll_variable) @local.definition.var))
|
declarator: (symbol) @local.definition.var))
|
||||||
|
|
||||||
; Function definitions
|
; Function definitions
|
||||||
(subroutine_block
|
(subroutine_block
|
||||||
|
|
@ -32,5 +32,5 @@
|
||||||
|
|
||||||
[
|
[
|
||||||
(macro)
|
(macro)
|
||||||
(trace32_hll_variable)
|
(symbol)
|
||||||
] @local.reference
|
] @local.reference
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ SUBROUTINE start_debug
|
||||||
COVerage.ListModule %MULTI.OBC \sieve
|
COVerage.ListModule %MULTI.OBC \sieve
|
||||||
; ^ @keyword
|
; ^ @keyword
|
||||||
; ^ @constant.builtin
|
; ^ @constant.builtin
|
||||||
; ^ @string.special.symbol
|
; ^ @variable
|
||||||
|
|
||||||
Var.DRAW flags[0..16] /Alternate 3
|
Var.DRAW flags[0..16] /Alternate 3
|
||||||
; ^ @keyword
|
; ^ @keyword
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ DATA.SET P:&HEAD+0x4 %LONG DATA.LONG(EA:&HEAD+0x4)&0xFFFFFF
|
||||||
; ^ @constant.builtin
|
; ^ @constant.builtin
|
||||||
|
|
||||||
List `main`
|
List `main`
|
||||||
; ^ @string.special.symbol
|
; ^ @variable
|
||||||
|
|
||||||
&range = 'a'--'z'||'0'--'9'
|
&range = 'a'--'z'||'0'--'9'
|
||||||
; ^ @character
|
; ^ @character
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
Var.NEWGLOBAL char[4][32] \myarr
|
Var.NEWGLOBAL char[4][32] \myarr
|
||||||
; <- @keyword
|
; <- @keyword
|
||||||
; ^ @type.builtin
|
; ^ @type.builtin
|
||||||
; ^ @variable.builtin
|
; ^ @variable
|
||||||
LOCAL &i &data
|
LOCAL &i &data
|
||||||
|
|
||||||
&data="zero|one|two|three"
|
&data="zero|one|two|three"
|
||||||
|
|
@ -12,20 +12,20 @@ WHILE &i<4
|
||||||
PRIVATE &val
|
PRIVATE &val
|
||||||
&val=STRing.SPLIT("&data","|",&i)
|
&val=STRing.SPLIT("&data","|",&i)
|
||||||
Var.Assign \myarr[&i]="&val"
|
Var.Assign \myarr[&i]="&val"
|
||||||
; ^ @variable.builtin
|
; ^ @variable
|
||||||
; ^ @operator
|
; ^ @operator
|
||||||
&i=&i+1.
|
&i=&i+1.
|
||||||
)
|
)
|
||||||
|
|
||||||
Var.NEWLOCAL \x
|
Var.NEWLOCAL \x
|
||||||
; <- @keyword
|
; <- @keyword
|
||||||
; ^ @variable.builtin
|
; ^ @variable
|
||||||
Var.set \x=func3(5,3)
|
Var.set \x=func3(5,3)
|
||||||
; ^ @variable.builtin
|
; ^ @variable
|
||||||
; ^ @function.call
|
; ^ @function.call
|
||||||
; ^ @number
|
; ^ @number
|
||||||
PRINT Var.VALUE(\x)
|
PRINT Var.VALUE(\x)
|
||||||
; ^ @variable.builtin
|
; ^ @variable
|
||||||
PRINT Var.VALUE('a')
|
PRINT Var.VALUE('a')
|
||||||
; ^ @character
|
; ^ @character
|
||||||
Var.Assign (*ap)[2..4] = &a
|
Var.Assign (*ap)[2..4] = &a
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue