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