PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.6.0
Code Block Pro – Beautiful Syntax Highlighting v1.6.0
1.27.1 1.27.2 1.27.3 1.27.4 1.27.5 1.27.6 1.27.7 1.28.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 trunk 1.1.0 1.10.0 1.11.0 1.11.1 All 63 releases
code-block-pro / build / shiki / languages / zenscript.tmLanguage.json

zenscript.tmLanguage.json in Code Block Pro – Beautiful Syntax Highlighting 1.6.0, at build/shiki/languages/zenscript.tmLanguage.json

255 lines 6.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 {
2 "fileTypes": ["zs"],
3 "name": "zenscript",
4 "patterns": [
5 {
6 "comment": "numbers",
7 "name": "constant.numeric.zenscript",
8 "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)([LlFfUuDd]|UL|ul)?\\b"
9 },
10 {
11 "comment": "prefixedNumbers",
12 "name": "constant.numeric.zenscript",
13 "match": "\\b\\-?(0b|0x|0o|0B|0X|0O)(0|[1-9a-fA-F][0-9a-fA-F_]*)[a-zA-Z_]*\\b"
14 },
15 {
16 "include": "#code"
17 },
18 {
19 "comment": "arrays",
20 "name": "storage.type.object.array.zenscript",
21 "match": "\\b((?:[a-z]\\w*\\.)*[A-Z]+\\w*)(?=\\[)"
22 }
23 ],
24 "repository": {
25 "code": {
26 "patterns": [
27 {
28 "include": "#class"
29 },
30 {
31 "include": "#functions"
32 },
33 {
34 "include": "#dots"
35 },
36 {
37 "include": "#quotes"
38 },
39 {
40 "include": "#brackets"
41 },
42 {
43 "include": "#comments"
44 },
45 {
46 "include": "#var"
47 },
48 {
49 "include": "#keywords"
50 },
51 {
52 "include": "#constants"
53 },
54 {
55 "include": "#operators"
56 }
57 ]
58 },
59 "class": {
60 "comment": "class",
61 "name": "meta.class.zenscript",
62 "match": "(zenClass)\\s+(\\w+)",
63 "captures": {
64 "1": {
65 "name": "storage.type.zenscript"
66 },
67 "2": {
68 "name": "entity.name.type.class.zenscript"
69 }
70 }
71 },
72 "functions": {
73 "comment": "functions",
74 "name": "meta.function.zenscript",
75 "match": "function\\s+([A-Za-z_$][\\w$]*)\\s*(?=\\()",
76 "captures": {
77 "0": {
78 "name": "storage.type.function.zenscript"
79 },
80 "1": {
81 "name": "entity.name.function.zenscript"
82 }
83 }
84 },
85 "dots": {
86 "comment": "dots",
87 "name": "plain.text.zenscript",
88 "match": "\\b(\\w+)(\\.)(\\w+)((\\.)(\\w+))*",
89 "captures": {
90 "1": {
91 "name": "storage.type.zenscript"
92 },
93 "2": {
94 "name": "keyword.control.zenscript"
95 },
96 "5": {
97 "name": "keyword.control.zenscript"
98 }
99 }
100 },
101 "quotes": {
102 "patterns": [
103 {
104 "begin": "\"",
105 "beginCaptures": {
106 "0": {
107 "name": "punctuation.definition.string.begin.zenscript"
108 }
109 },
110 "end": "\"",
111 "endCaptures": {
112 "0": {
113 "name": "punctuation.definition.string.end.zenscript"
114 }
115 },
116 "name": "string.quoted.double.zenscript",
117 "patterns": [
118 {
119 "match": "\\\\.",
120 "name": "constant.character.escape.zenscript"
121 }
122 ]
123 },
124 {
125 "begin": "'",
126 "beginCaptures": {
127 "0": {
128 "name": "punctuation.definition.string.begin.zenscript"
129 }
130 },
131 "end": "'",
132 "endCaptures": {
133 "0": {
134 "name": "punctuation.definition.string.end.zenscript"
135 }
136 },
137 "name": "string.quoted.single.zenscript",
138 "patterns": [
139 {
140 "match": "\\\\.",
141 "name": "constant.character.escape.zenscript"
142 }
143 ]
144 }
145 ]
146 },
147 "brackets": {
148 "patterns": [
149 {
150 "comment": "items and blocks",
151 "name": "keyword.other.zenscript",
152 "match": "(<)\\b(.*?)(:(.*?(:(\\*|\\d+)?)?)?)(>)",
153 "captures": {
154 "1": {
155 "name": "keyword.control.zenscript"
156 },
157 "2": {
158 "name": "keyword.other.zenscript"
159 },
160 "3": {
161 "name": "keyword.control.zenscript"
162 },
163 "4": {
164 "name": "variable.other.zenscript"
165 },
166 "5": {
167 "name": "keyword.control.zenscript"
168 },
169 "6": {
170 "name": "constant.numeric.zenscript"
171 },
172 "7": {
173 "name": "keyword.control.zenscript"
174 }
175 }
176 }
177 ]
178 },
179 "comments": {
180 "patterns": [
181 {
182 "comment": "inline comments",
183 "name": "comment.line.double=slash",
184 "match": "//[^\n]*"
185 },
186 {
187 "comment": "block comments",
188 "name": "comment.block",
189 "begin": "\\/\\*",
190 "beginCaptures": {
191 "0": {
192 "name": "comment.block"
193 }
194 },
195 "end": "\\*\\/",
196 "endCaptures": {
197 "0": {
198 "name": "comment.block"
199 }
200 }
201 }
202 ]
203 },
204 "var": {
205 "comment": "var",
206 "match": "\\b(val|var)\\b",
207 "name": "storage.type"
208 },
209 "keywords": {
210 "patterns": [
211 {
212 "comment": "statement keywords",
213 "name": "keyword.control.zenscript",
214 "match": "\\b(instanceof|get|implements|set|import|function|override|const|if|else|do|while|for|throw|panic|lock|try|catch|finally|return|break|continue|switch|case|default|in|is|as|match|throws|super|new)\\b"
215 },
216 {
217 "comment": "storage keywords",
218 "name": "storage.type.zenscript",
219 "match": "\\b(zenClass|zenConstructor|alias|class|interface|enum|struct|expand|variant|set|void|bool|byte|sbyte|short|ushort|int|uint|long|ulong|usize|float|double|char|string)\\b"
220 },
221 {
222 "comment": "modifier keywords",
223 "name": "storage.modifier.zenscript",
224 "match": "\\b(variant|abstract|final|private|public|export|internal|static|protected|implicit|virtual|extern|immutable)\\b"
225 },
226 {
227 "comment": "annotation keywords",
228 "name": "entity.other.attribute-name",
229 "match": "\\b(Native|Precondition)\\b"
230 },
231 {
232 "comment": "language keywords",
233 "name": "constant.language",
234 "match": "\\b(null|true|false)\\b"
235 }
236 ]
237 },
238 "operators": {
239 "patterns": [
240 {
241 "comment": "math operators",
242 "name": "keyword.control",
243 "match": "\\b(\\.|\\.\\.|\\.\\.\\.|,|\\+|\\+=|\\+\\+|-|-=|--|~|~=|\\*|\\*=|/|/=|%|%=|\\||\\|=|\\|\\||&|&=|&&|\\^|\\^=|\\?|\\?\\.|\\?\\?|<|<=|<<|<<=|>|>=|>>|>>=|>>>|>>>=|=>|=|==|===|!|!=|!==|\\$|`)\\b"
244 },
245 {
246 "comment": "colons",
247 "name": "keyword.control",
248 "match": "\\b(;|:)\\b"
249 }
250 ]
251 }
252 },
253 "scopeName": "source.zenscript"
254 }
255