summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Sax <christoph.sax@mailbox.org>2023-07-30 18:10:40 +0200
committerChristian Clason <c.clason@uni-graz.at>2023-07-30 19:29:33 +0200
commit0fe8fa0bcf65ca3eb0d8beeab6fcf952cfb8f4f9 (patch)
tree740a2bb581b984a04532f141dcff1beec0072a92
parentfeat(t32): re-enable tests (diff)
downloadnvim-treesitter-0fe8fa0bcf65ca3eb0d8beeab6fcf952cfb8f4f9.tar
nvim-treesitter-0fe8fa0bcf65ca3eb0d8beeab6fcf952cfb8f4f9.tar.gz
nvim-treesitter-0fe8fa0bcf65ca3eb0d8beeab6fcf952cfb8f4f9.tar.bz2
nvim-treesitter-0fe8fa0bcf65ca3eb0d8beeab6fcf952cfb8f4f9.tar.lz
nvim-treesitter-0fe8fa0bcf65ca3eb0d8beeab6fcf952cfb8f4f9.tar.xz
nvim-treesitter-0fe8fa0bcf65ca3eb0d8beeab6fcf952cfb8f4f9.tar.zst
nvim-treesitter-0fe8fa0bcf65ca3eb0d8beeab6fcf952cfb8f4f9.zip
feat(t32): update tests to new node types
-rw-r--r--tests/query/highlights/t32/keywords.cmm31
-rw-r--r--tests/query/highlights/t32/literals.cmm11
-rw-r--r--tests/query/highlights/t32/var.cmm50
3 files changed, 78 insertions, 14 deletions
diff --git a/tests/query/highlights/t32/keywords.cmm b/tests/query/highlights/t32/keywords.cmm
index f51786e46..21422438b 100644
--- a/tests/query/highlights/t32/keywords.cmm
+++ b/tests/query/highlights/t32/keywords.cmm
@@ -35,7 +35,7 @@ ELSE
RETURNVALUES &pass
; ^ parameter
WAIT 10.ms
-; ^ number
+; ^ float
)
IF !&pass
@@ -61,9 +61,9 @@ RePeaT &num PRINT "Password: &password"
WinCLEAR
FramePOS ,,,,Maximized
; ^ punctuation.delimiter
-; ^ constant
+; ^ constant.builtin
WinPOS 0% 50% 100% 35%
-; ^ number
+; ^ float
COVerage.ListFunc
ENDDO
@@ -84,13 +84,16 @@ verify_password:
SYStem.Option.KEYCODE "&password"
SYStem.JtagClock 1kHz
-; ^ number
+; ^ float
SYStem.Mode.Attach
- Data.Set EAXI:0x34000000 %Long 0x34000100 0x34000021 /verify
-; ^ number
-; ^ constant.builtin
-; ^ constant
+ Data.Set N: EAXI:0x34000000 %Long 0x34000100 0x34000021 /verify
+; ^ constant.builtin
+; ^ constant.builtin
+; ^ number
+; ^ constant.builtin
+; ^ number
+; ^ constant.builtin
RETURN TRUE()
; ^ keyword.return
@@ -98,8 +101,20 @@ verify_password:
SUBROUTINE start_debug
+; <- keyword.function
; ^ function
(
+ COVerage.ListModule %MULTI.OBC \sieve
+; ^ keyword
+; ^ constant.builtin
+; ^ symbol
+
+ Var.DRAW flags[0..16] /Alternate 3
+; ^ keyword
+; ^ variable
+; ^ constant.builtin
+; ^ number
+
Go main
RETURN
; ^ keyword.return
diff --git a/tests/query/highlights/t32/literals.cmm b/tests/query/highlights/t32/literals.cmm
index b1662639b..6c6849aea 100644
--- a/tests/query/highlights/t32/literals.cmm
+++ b/tests/query/highlights/t32/literals.cmm
@@ -11,13 +11,13 @@ DO ~~~~/test.cmm
; ^ string.special
WAIT 1.ns
-; ^ number
+; ^ float
SYStem.JtagClock 100.GHZ
-; ^ number
+; ^ float
DATA.SET P:&HEAD+0x4 %LONG DATA.LONG(EA:&HEAD+0x4)&0xFFFFFF
-; ^ number
+; ^ constant.builtin
List `main`
; ^ symbol
@@ -28,11 +28,12 @@ List `main`
; ^ character
Data.Set N: 0xffff800000 0y0011xx01xx&&a
-; ^ number
+; ^ constant.builtin
+; ^ number
; ^ number
; ^ operator
WinPOS 0% 85% 100% 15%
-; ^ number
+; ^ float
// vim: set ft=t32:
diff --git a/tests/query/highlights/t32/var.cmm b/tests/query/highlights/t32/var.cmm
index a2d6f9b2a..d77de90c8 100644
--- a/tests/query/highlights/t32/var.cmm
+++ b/tests/query/highlights/t32/var.cmm
@@ -1,6 +1,6 @@
Var.NEWGLOBAL char[4][32] \myarr
; <- keyword
-; ^ type
+; ^ type.builtin
; ^ variable.builtin
LOCAL &i &data
@@ -13,6 +13,7 @@ WHILE &i<4
&val=STRing.SPLIT("&data","|",&i)
Var.Assign \myarr[&i]="&val"
; ^ variable.builtin
+; ^ operator
&i=&i+1.
)
@@ -21,7 +22,54 @@ Var.NEWLOCAL \x
; ^ variable.builtin
Var.set \x=func3(5,3)
; ^ variable.builtin
+; ^ function.call
+; ^ number
PRINT Var.VALUE(\x)
; ^ variable.builtin
+PRINT Var.VALUE('a')
+; ^ character
+Var.Assign (*ap)[2..4] = &a
+; ^ variable
+; ^ variable
+Var.Assign sp = &s.n+offset
+; ^ variable
+; ^ variable
+; ^ field
+; ^ variable
+Var.Assign padd = (CAddition const * volatile)&d
+; ^ variable
+; ^ type
+; ^ type.qualifier
+; ^ type.qualifier
+; ^ variable
+Var.Assign e1 = (enum e2)&e
+; ^ variable
+; ^ keyword
+; ^ type
+; ^ variable
+Var.Assign *vector = (struct Vector3d*)&acceleration
+; ^ variable
+; ^ keyword
+; ^ type
+; ^ variable
+Var.Assign z = (union foo)x
+; ^ variable
+; ^ keyword
+; ^ 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: