highlights(zig): label, switch item, operator, punctuation, field property (#1685)

Co-authored-by: maxxnino <idonthaveemail@dontknow.com>
This commit is contained in:
maxxnino 2021-08-13 13:36:01 +09:00 committed by GitHub
parent 03943f9a7c
commit 2dd36fa585
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -97,7 +97,6 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor)
("!")? @exception
)
(ParamDecl
(ParamType (SuffixExpr (IDENTIFIER) @parameter))
)
@ -111,12 +110,19 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor)
]
)
(SwitchItem
(SuffixExpr
"."
.
(IDENTIFIER) @constant
)
)
(BUILTINIDENTIFIER) @function.builtin
((BUILTINIDENTIFIER) @include
(#any-of? @include "@import" "@cImport"))
(INTEGER) @number
(FLOAT) @float
@ -136,10 +142,8 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor)
(BuildinTypeExpr)
] @type.builtin
[
(BreakLabel)
(BlockLabel)
] @label
(BreakLabel (IDENTIFIER) @label)
(BlockLabel (IDENTIFIER) @label)
[
"true"
@ -166,7 +170,7 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor)
[
"or"
"and"
(BitwiseOp "orelse")
"orelse"
] @keyword.operator
[
@ -220,7 +224,6 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor)
; PrecProc
[
(BitwiseOp "orelse")
"inline"
"noinline"
"asm"
@ -240,6 +243,13 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor)
(AdditionOp)
(MultiplyOp)
(PrefixOp)
"*"
"**"
"->"
"=>"
".?"
".*"
"="
] @operator
[
@ -249,6 +259,11 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor)
":"
] @punctuation.delimiter
[
".."
"..."
] @punctuation.special
[
"["
"]"
@ -256,4 +271,7 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor)
")"
"{"
"}"
(Payload "|")
(PtrPayload "|")
(PtrIndexPayload "|")
] @punctuation.bracket