annotate runtime/syntax/zig.vim @ 31555:5aa54cbc6e20 v9.0.1110

patch 9.0.1110: build fails on Mac OS X 10.4/10.5 Commit: https://github.com/vim/vim/commit/254480736f7db3667c7b84873efb49c2cb1d385f Author: Evan Miller <emmiller@gmail.com> Date: Fri Dec 30 10:42:23 2022 +0000 patch 9.0.1110: build fails on Mac OS X 10.4/10.5 Problem: Build fails on Mac OS X 10.4/10.5 . Solution: Check if the dispatch/dispatch.h header exists. (Evan Miller, closes #11746)
author Bram Moolenaar <Bram@vim.org>
date Fri, 30 Dec 2022 11:45:05 +0100
parents 15c80d8bc515
children f7351afc42cf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
31383
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Vim syntax file
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2 " Language: Zig
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 " Upstream: https://github.com/ziglang/zig.vim
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5 if exists("b:current_syntax")
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6 finish
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 endif
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9 let s:cpo_save = &cpo
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10 set cpo&vim
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 let s:zig_syntax_keywords = {
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13 \ 'zigBoolean': ["true"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14 \ , "false"]
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15 \ , 'zigNull': ["null"]
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 \ , 'zigType': ["bool"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17 \ , "f16"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18 \ , "f32"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19 \ , "f64"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20 \ , "f80"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21 \ , "f128"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 \ , "void"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 \ , "type"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24 \ , "anytype"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 \ , "anyerror"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 \ , "anyframe"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27 \ , "volatile"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28 \ , "linksection"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 \ , "noreturn"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 \ , "allowzero"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 \ , "i0"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32 \ , "u0"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33 \ , "isize"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34 \ , "usize"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35 \ , "comptime_int"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 \ , "comptime_float"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37 \ , "c_short"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38 \ , "c_ushort"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
39 \ , "c_int"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
40 \ , "c_uint"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41 \ , "c_long"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
42 \ , "c_ulong"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43 \ , "c_longlong"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44 \ , "c_ulonglong"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
45 \ , "c_longdouble"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
46 \ , "anyopaque"]
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47 \ , 'zigConstant': ["undefined"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
48 \ , "unreachable"]
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
49 \ , 'zigConditional': ["if"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
50 \ , "else"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
51 \ , "switch"]
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
52 \ , 'zigRepeat': ["while"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
53 \ , "for"]
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
54 \ , 'zigComparatorWord': ["and"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
55 \ , "or"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
56 \ , "orelse"]
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
57 \ , 'zigStructure': ["struct"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
58 \ , "enum"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
59 \ , "union"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
60 \ , "error"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
61 \ , "packed"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
62 \ , "opaque"]
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
63 \ , 'zigException': ["error"]
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
64 \ , 'zigVarDecl': ["var"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
65 \ , "const"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
66 \ , "comptime"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
67 \ , "threadlocal"]
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
68 \ , 'zigDummyVariable': ["_"]
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
69 \ , 'zigKeyword': ["fn"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
70 \ , "try"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
71 \ , "test"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
72 \ , "pub"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
73 \ , "usingnamespace"]
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
74 \ , 'zigExecution': ["return"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
75 \ , "break"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
76 \ , "continue"]
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
77 \ , 'zigMacro': ["defer"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
78 \ , "errdefer"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
79 \ , "async"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
80 \ , "nosuspend"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
81 \ , "await"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
82 \ , "suspend"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
83 \ , "resume"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
84 \ , "export"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
85 \ , "extern"]
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
86 \ , 'zigPreProc': ["catch"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
87 \ , "inline"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
88 \ , "noinline"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
89 \ , "asm"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
90 \ , "callconv"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
91 \ , "noalias"]
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
92 \ , 'zigBuiltinFn': ["align"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
93 \ , "@addWithOverflow"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
94 \ , "@as"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
95 \ , "@atomicLoad"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
96 \ , "@atomicStore"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
97 \ , "@bitCast"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
98 \ , "@breakpoint"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
99 \ , "@alignCast"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
100 \ , "@alignOf"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
101 \ , "@cDefine"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
102 \ , "@cImport"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
103 \ , "@cInclude"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
104 \ , "@cUndef"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
105 \ , "@clz"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
106 \ , "@cmpxchgWeak"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
107 \ , "@cmpxchgStrong"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
108 \ , "@compileError"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
109 \ , "@compileLog"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
110 \ , "@ctz"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
111 \ , "@popCount"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
112 \ , "@divExact"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
113 \ , "@divFloor"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
114 \ , "@divTrunc"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
115 \ , "@embedFile"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
116 \ , "@export"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
117 \ , "@extern"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
118 \ , "@tagName"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
119 \ , "@TagType"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
120 \ , "@errorName"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
121 \ , "@call"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
122 \ , "@errorReturnTrace"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
123 \ , "@fence"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
124 \ , "@fieldParentPtr"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
125 \ , "@field"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
126 \ , "@unionInit"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
127 \ , "@frameAddress"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
128 \ , "@import"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
129 \ , "@newStackCall"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
130 \ , "@asyncCall"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
131 \ , "@intToPtr"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
132 \ , "@max"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
133 \ , "@min"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
134 \ , "@memcpy"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
135 \ , "@memset"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
136 \ , "@mod"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
137 \ , "@mulAdd"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
138 \ , "@mulWithOverflow"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
139 \ , "@splat"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
140 \ , "@src"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
141 \ , "@bitOffsetOf"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
142 \ , "@byteOffsetOf"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
143 \ , "@offsetOf"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
144 \ , "@OpaqueType"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
145 \ , "@panic"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
146 \ , "@prefetch"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
147 \ , "@ptrCast"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
148 \ , "@ptrToInt"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
149 \ , "@rem"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
150 \ , "@returnAddress"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
151 \ , "@setCold"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
152 \ , "@Type"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
153 \ , "@shuffle"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
154 \ , "@reduce"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
155 \ , "@select"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
156 \ , "@setRuntimeSafety"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
157 \ , "@setEvalBranchQuota"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
158 \ , "@setFloatMode"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
159 \ , "@shlExact"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
160 \ , "@This"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
161 \ , "@hasDecl"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
162 \ , "@hasField"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
163 \ , "@shlWithOverflow"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
164 \ , "@shrExact"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
165 \ , "@sizeOf"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
166 \ , "@bitSizeOf"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
167 \ , "@sqrt"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
168 \ , "@byteSwap"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
169 \ , "@subWithOverflow"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
170 \ , "@intCast"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
171 \ , "@floatCast"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
172 \ , "@intToFloat"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
173 \ , "@floatToInt"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
174 \ , "@boolToInt"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
175 \ , "@errSetCast"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
176 \ , "@truncate"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
177 \ , "@typeInfo"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
178 \ , "@typeName"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
179 \ , "@TypeOf"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
180 \ , "@atomicRmw"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
181 \ , "@intToError"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
182 \ , "@errorToInt"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
183 \ , "@intToEnum"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
184 \ , "@enumToInt"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
185 \ , "@setAlignStack"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
186 \ , "@frame"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
187 \ , "@Frame"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
188 \ , "@frameSize"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
189 \ , "@bitReverse"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
190 \ , "@Vector"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
191 \ , "@sin"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
192 \ , "@cos"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
193 \ , "@tan"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
194 \ , "@exp"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
195 \ , "@exp2"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
196 \ , "@log"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
197 \ , "@log2"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
198 \ , "@log10"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
199 \ , "@fabs"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
200 \ , "@floor"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
201 \ , "@ceil"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
202 \ , "@trunc"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
203 \ , "@wasmMemorySize"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
204 \ , "@wasmMemoryGrow"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
205 \ , "@round"]
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
206 \ }
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
207
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
208 function! s:syntax_keyword(dict)
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
209 for key in keys(a:dict)
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
210 execute 'syntax keyword' key join(a:dict[key], ' ')
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
211 endfor
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
212 endfunction
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
213
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
214 call s:syntax_keyword(s:zig_syntax_keywords)
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
215
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
216 syntax match zigType "\v<[iu][1-9]\d*>"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
217 syntax match zigOperator display "\V\[-+/*=^&?|!><%~]"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
218 syntax match zigArrowCharacter display "\V->"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
219
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
220 " 12_34 (. but not ..)? (12_34)? (exponent 12_34)?
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
221 syntax match zigDecNumber display "\v<\d%(_?\d)*%(\.\.@!)?%(\d%(_?\d)*)?%([eE][+-]?\d%(_?\d)*)?"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
222 syntax match zigHexNumber display "\v<0x\x%(_?\x)*%(\.\.@!)?%(\x%(_?\x)*)?%([pP][+-]?\d%(_?\d)*)?"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
223 syntax match zigOctNumber display "\v<0o\o%(_?\o)*"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
224 syntax match zigBinNumber display "\v<0b[01]%(_?[01])*"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
225
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
226 syntax match zigCharacterInvalid display contained /b\?'\zs[\n\r\t']\ze'/
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
227 syntax match zigCharacterInvalidUnicode display contained /b'\zs[^[:cntrl:][:graph:][:alnum:][:space:]]\ze'/
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
228 syntax match zigCharacter /b'\([^\\]\|\\\(.\|x\x\{2}\)\)'/ contains=zigEscape,zigEscapeError,zigCharacterInvalid,zigCharacterInvalidUnicode
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
229 syntax match zigCharacter /'\([^\\]\|\\\(.\|x\x\{2}\|u\x\{4}\|U\x\{6}\)\)'/ contains=zigEscape,zigEscapeUnicode,zigEscapeError,zigCharacterInvalid
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
230
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
231 syntax region zigBlock start="{" end="}" transparent fold
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
232
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
233 syntax region zigCommentLine start="//" end="$" contains=zigTodo,@Spell
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
234 syntax region zigCommentLineDoc start="//[/!]/\@!" end="$" contains=zigTodo,@Spell
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
235
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
236 syntax match zigMultilineStringPrefix /c\?\\\\/ contained containedin=zigMultilineString
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
237 syntax region zigMultilineString matchgroup=zigMultilineStringDelimiter start="c\?\\\\" end="$" contains=zigMultilineStringPrefix display
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
238
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
239 syntax keyword zigTodo contained TODO
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
240
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
241 syntax region zigString matchgroup=zigStringDelimiter start=+c\?"+ skip=+\\\\\|\\"+ end=+"+ oneline contains=zigEscape,zigEscapeUnicode,zigEscapeError,@Spell
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
242 syntax match zigEscapeError display contained /\\./
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
243 syntax match zigEscape display contained /\\\([nrt\\'"]\|x\x\{2}\)/
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
244 syntax match zigEscapeUnicode display contained /\\\(u\x\{4}\|U\x\{6}\)/
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
245
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
246 highlight default link zigDecNumber zigNumber
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
247 highlight default link zigHexNumber zigNumber
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
248 highlight default link zigOctNumber zigNumber
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
249 highlight default link zigBinNumber zigNumber
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
250
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
251 highlight default link zigBuiltinFn Statement
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
252 highlight default link zigKeyword Keyword
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
253 highlight default link zigType Type
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
254 highlight default link zigCommentLine Comment
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
255 highlight default link zigCommentLineDoc Comment
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
256 highlight default link zigDummyVariable Comment
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
257 highlight default link zigTodo Todo
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
258 highlight default link zigString String
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
259 highlight default link zigStringDelimiter String
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
260 highlight default link zigMultilineString String
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
261 highlight default link zigMultilineStringContent String
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
262 highlight default link zigMultilineStringPrefix String
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
263 highlight default link zigMultilineStringDelimiter Delimiter
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
264 highlight default link zigCharacterInvalid Error
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
265 highlight default link zigCharacterInvalidUnicode zigCharacterInvalid
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
266 highlight default link zigCharacter Character
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
267 highlight default link zigEscape Special
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
268 highlight default link zigEscapeUnicode zigEscape
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
269 highlight default link zigEscapeError Error
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
270 highlight default link zigBoolean Boolean
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
271 highlight default link zigNull Boolean
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
272 highlight default link zigConstant Constant
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
273 highlight default link zigNumber Number
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
274 highlight default link zigArrowCharacter zigOperator
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
275 highlight default link zigOperator Operator
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
276 highlight default link zigStructure Structure
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
277 highlight default link zigExecution Special
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
278 highlight default link zigMacro Macro
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
279 highlight default link zigConditional Conditional
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
280 highlight default link zigComparatorWord Keyword
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
281 highlight default link zigRepeat Repeat
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
282 highlight default link zigSpecial Special
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
283 highlight default link zigVarDecl Function
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
284 highlight default link zigPreProc PreProc
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
285 highlight default link zigException Exception
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
286
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
287 delfunction s:syntax_keyword
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
288
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
289 let b:current_syntax = "zig"
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
290
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
291 let &cpo = s:cpo_save
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
292 unlet! s:cpo_save