diff options
| author | maxxnino <34153891+maxxnino@users.noreply.github.com> | 2021-08-13 13:36:01 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-12 23:36:01 -0500 |
| commit | 2dd36fa585f703c76bb2b5ca0aab673edb773741 (patch) | |
| tree | a588b66d814b71a6187474593e57fc51da7059d1 /queries/zig | |
| parent | [docgen] Update README.md (diff) | |
| download | nvim-treesitter-2dd36fa585f703c76bb2b5ca0aab673edb773741.tar nvim-treesitter-2dd36fa585f703c76bb2b5ca0aab673edb773741.tar.gz nvim-treesitter-2dd36fa585f703c76bb2b5ca0aab673edb773741.tar.bz2 nvim-treesitter-2dd36fa585f703c76bb2b5ca0aab673edb773741.tar.lz nvim-treesitter-2dd36fa585f703c76bb2b5ca0aab673edb773741.tar.xz nvim-treesitter-2dd36fa585f703c76bb2b5ca0aab673edb773741.tar.zst nvim-treesitter-2dd36fa585f703c76bb2b5ca0aab673edb773741.zip | |
highlights(zig): label, switch item, operator, punctuation, field property (#1685)
Co-authored-by: maxxnino <idonthaveemail@dontknow.com>
Diffstat (limited to 'queries/zig')
| -rw-r--r-- | queries/zig/highlights.scm | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/queries/zig/highlights.scm b/queries/zig/highlights.scm index 06daf0f99..048d6e07b 100644 --- a/queries/zig/highlights.scm +++ b/queries/zig/highlights.scm @@ -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 [ @@ -250,10 +260,18 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor) ] @punctuation.delimiter [ + ".." + "..." +] @punctuation.special + +[ "[" "]" "(" ")" "{" "}" + (Payload "|") + (PtrPayload "|") + (PtrIndexPayload "|") ] @punctuation.bracket |
