nvim-treesitter/tests/query/highlights/t32/var.cmm
Christoph Sax b50774079a
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.
2025-11-12 10:06:04 +01:00

75 lines
2 KiB
Text

Var.NEWGLOBAL char[4][32] \myarr
; <- @keyword
; ^ @type.builtin
; ^ @variable
LOCAL &i &data
&data="zero|one|two|three"
&i=0.
WHILE &i<4
(
PRIVATE &val
&val=STRing.SPLIT("&data","|",&i)
Var.Assign \myarr[&i]="&val"
; ^ @variable
; ^ @operator
&i=&i+1.
)
Var.NEWLOCAL \x
; <- @keyword
; ^ @variable
Var.set \x=func3(5,3)
; ^ @variable
; ^ @function.call
; ^ @number
PRINT Var.VALUE(\x)
; ^ @variable
PRINT Var.VALUE('a')
; ^ @character
Var.Assign (*ap)[2..4] = &a
; ^ @variable
; ^ @variable
Var.Assign sp = &s.n+offset
; ^ @variable
; ^ @variable
; ^ @variable.member
; ^ @variable
Var.Assign padd = (CAddition const * volatile)&d
; ^ @variable
; ^ @type
; ^ @keyword.modifier
; ^ @keyword.modifier
; ^ @variable
Var.Assign e1 = (enum e2)&e
; ^ @variable
; ^ @keyword.type
; ^ @type
; ^ @variable
Var.Assign *vector = (struct Vector3d*)&acceleration
; ^ @variable
; ^ @keyword.type
; ^ @type
; ^ @variable
Var.Assign z = (union foo)x
; ^ @variable
; ^ @keyword.type
; ^ @type
; ^ @variable
Var.Assign b = -a
; ^ @variable
; ^ @variable
Var.Assign c = i++
; ^ @variable
; ^ @variable
Var.Assign d = sizeof(int)
; ^ @variable
; ^ @keyword.operator
; ^ @type.builtin
Var.call strcmp(key,buffer)
; ^ @function.call
; ^ @variable
; ^ @variable
// vim: set ft=t32: