tm-grammars 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/NOTICE +6565 -0
- package/README.md +211 -0
- package/grammars/abap.json +380 -0
- package/grammars/actionscript-3.json +951 -0
- package/grammars/ada.json +3874 -0
- package/grammars/apache.json +562 -0
- package/grammars/apex.json +3203 -0
- package/grammars/apl.json +1479 -0
- package/grammars/applescript.json +1406 -0
- package/grammars/ara.json +428 -0
- package/grammars/asm.json +1741 -0
- package/grammars/astro.json +776 -0
- package/grammars/awk.json +388 -0
- package/grammars/ballerina.json +3768 -0
- package/grammars/bat.json +783 -0
- package/grammars/beancount.json +831 -0
- package/grammars/berry.json +172 -0
- package/grammars/bibtex.json +315 -0
- package/grammars/bicep.json +239 -0
- package/grammars/blade.json +3870 -0
- package/grammars/c.json +3552 -0
- package/grammars/cadence.json +738 -0
- package/grammars/clarity.json +877 -0
- package/grammars/clojure.json +426 -0
- package/grammars/cmake.json +143 -0
- package/grammars/cobol.json +1124 -0
- package/grammars/codeql.json +1540 -0
- package/grammars/coffee.json +1311 -0
- package/grammars/cpp-macro.json +9498 -0
- package/grammars/cpp.json +16635 -0
- package/grammars/crystal.json +1866 -0
- package/grammars/csharp.json +5722 -0
- package/grammars/css.json +1860 -0
- package/grammars/csv.json +46 -0
- package/grammars/cue.json +1128 -0
- package/grammars/cypher.json +353 -0
- package/grammars/d.json +3185 -0
- package/grammars/dart.json +522 -0
- package/grammars/dax.json +185 -0
- package/grammars/diff.json +155 -0
- package/grammars/docker.json +97 -0
- package/grammars/dream-maker.json +640 -0
- package/grammars/elixir.json +1014 -0
- package/grammars/elm.json +751 -0
- package/grammars/erb.json +156 -0
- package/grammars/erlang.json +1757 -0
- package/grammars/fish.json +189 -0
- package/grammars/fsharp.json +1831 -0
- package/grammars/gdresource.json +290 -0
- package/grammars/gdscript.json +969 -0
- package/grammars/gdshader.json +405 -0
- package/grammars/gherkin.json +133 -0
- package/grammars/git-commit.json +85 -0
- package/grammars/git-rebase.json +56 -0
- package/grammars/glimmer-js.json +98 -0
- package/grammars/glimmer-ts.json +98 -0
- package/grammars/glsl.json +57 -0
- package/grammars/gnuplot.json +892 -0
- package/grammars/go.json +1012 -0
- package/grammars/graphql.json +1295 -0
- package/grammars/groovy.json +1378 -0
- package/grammars/hack.json +2650 -0
- package/grammars/haml.json +598 -0
- package/grammars/handlebars.json +848 -0
- package/grammars/haskell.json +2431 -0
- package/grammars/hcl.json +787 -0
- package/grammars/hjson.json +821 -0
- package/grammars/hlsl.json +212 -0
- package/grammars/html.json +93 -0
- package/grammars/imba.json +2696 -0
- package/grammars/ini.json +108 -0
- package/grammars/java.json +1885 -0
- package/grammars/javascript.json +5984 -0
- package/grammars/jinja-html.json +16 -0
- package/grammars/jinja.json +345 -0
- package/grammars/jison.json +715 -0
- package/grammars/jsdoc.json +21 -0
- package/grammars/json.json +208 -0
- package/grammars/json5.json +244 -0
- package/grammars/jsonc.json +208 -0
- package/grammars/jsonl.json +208 -0
- package/grammars/jsonnet.json +211 -0
- package/grammars/jssm.json +159 -0
- package/grammars/jsx.json +5984 -0
- package/grammars/julia.json +1061 -0
- package/grammars/kotlin.json +580 -0
- package/grammars/kusto.json +687 -0
- package/grammars/latex.json +2395 -0
- package/grammars/less.json +5012 -0
- package/grammars/liquid.json +990 -0
- package/grammars/lisp.json +121 -0
- package/grammars/logo.json +55 -0
- package/grammars/lua.json +956 -0
- package/grammars/make.json +629 -0
- package/grammars/markdown.json +3066 -0
- package/grammars/marko.json +1344 -0
- package/grammars/matlab.json +1131 -0
- package/grammars/mdc.json +571 -0
- package/grammars/mdx.json +5629 -0
- package/grammars/mermaid.json +1382 -0
- package/grammars/mojo.json +4153 -0
- package/grammars/narrat.json +227 -0
- package/grammars/nextflow.json +298 -0
- package/grammars/nginx.json +2121 -0
- package/grammars/nim.json +1522 -0
- package/grammars/nix.json +1200 -0
- package/grammars/nushell.json +1047 -0
- package/grammars/objective-c.json +3750 -0
- package/grammars/objective-cpp.json +7242 -0
- package/grammars/ocaml.json +2967 -0
- package/grammars/pascal.json +154 -0
- package/grammars/perl.json +2971 -0
- package/grammars/php.json +4024 -0
- package/grammars/plsql.json +241 -0
- package/grammars/postcss.json +377 -0
- package/grammars/powerquery.json +349 -0
- package/grammars/powershell.json +1024 -0
- package/grammars/prisma.json +443 -0
- package/grammars/prolog.json +298 -0
- package/grammars/proto.json +507 -0
- package/grammars/pug.json +1033 -0
- package/grammars/puppet.json +777 -0
- package/grammars/purescript.json +871 -0
- package/grammars/python.json +4208 -0
- package/grammars/r.json +637 -0
- package/grammars/raku.json +310 -0
- package/grammars/razor.json +1813 -0
- package/grammars/reg.json +136 -0
- package/grammars/rel.json +200 -0
- package/grammars/riscv.json +298 -0
- package/grammars/rst.json +734 -0
- package/grammars/ruby.json +2769 -0
- package/grammars/rust.json +1171 -0
- package/grammars/sas.json +302 -0
- package/grammars/sass.json +618 -0
- package/grammars/scala.json +1313 -0
- package/grammars/scheme.json +384 -0
- package/grammars/scss.json +1874 -0
- package/grammars/shaderlab.json +199 -0
- package/grammars/shellscript.json +2025 -0
- package/grammars/shellsession.json +33 -0
- package/grammars/smalltalk.json +235 -0
- package/grammars/solidity.json +1210 -0
- package/grammars/sparql.json +45 -0
- package/grammars/splunk.json +91 -0
- package/grammars/sql.json +631 -0
- package/grammars/ssh-config.json +88 -0
- package/grammars/stata.json +3050 -0
- package/grammars/stylus.json +1208 -0
- package/grammars/svelte.json +1171 -0
- package/grammars/swift.json +4203 -0
- package/grammars/system-verilog.json +1063 -0
- package/grammars/tasl.json +292 -0
- package/grammars/tcl.json +291 -0
- package/grammars/tex.json +281 -0
- package/grammars/toml.json +431 -0
- package/grammars/tsx.json +5984 -0
- package/grammars/turtle.json +261 -0
- package/grammars/twig.json +1394 -0
- package/grammars/typescript.json +5735 -0
- package/grammars/v.json +1001 -0
- package/grammars/vb.json +232 -0
- package/grammars/verilog.json +305 -0
- package/grammars/vhdl.json +1484 -0
- package/grammars/viml.json +445 -0
- package/grammars/vue-html.json +559 -0
- package/grammars/vue.json +1237 -0
- package/grammars/vyper.json +5415 -0
- package/grammars/wasm.json +831 -0
- package/grammars/wenyan.json +129 -0
- package/grammars/wgsl.json +391 -0
- package/grammars/wolfram.json +2370 -0
- package/grammars/xml.json +382 -0
- package/grammars/xsl.json +89 -0
- package/grammars/yaml.json +616 -0
- package/grammars/zenscript.json +257 -0
- package/grammars/zig.json +312 -0
- package/index.d.ts +18 -0
- package/index.js +2165 -0
- package/package.json +46 -0
|
@@ -0,0 +1,640 @@
|
|
|
1
|
+
{
|
|
2
|
+
"displayName": "Dream Maker",
|
|
3
|
+
"fileTypes": [
|
|
4
|
+
"dm",
|
|
5
|
+
"dme"
|
|
6
|
+
],
|
|
7
|
+
"foldingStartMarker": "(?x)\n/\\*\\*(?!\\*)\n|^(?![^{]*?//|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|//|/\\*(?!.*?\\*/.*\\S))",
|
|
8
|
+
"foldingStopMarker": "(?<!\\*)\\*\\*/|^\\s*\\}",
|
|
9
|
+
"name": "dream-maker",
|
|
10
|
+
"patterns": [
|
|
11
|
+
{
|
|
12
|
+
"include": "#preprocessor-rule-enabled"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"include": "#preprocessor-rule-disabled"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"include": "#preprocessor-rule-other"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"include": "#comments"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"captures": {
|
|
25
|
+
"1": {
|
|
26
|
+
"name": "storage.type.dm"
|
|
27
|
+
},
|
|
28
|
+
"2": {
|
|
29
|
+
"name": "storage.modifier.dm"
|
|
30
|
+
},
|
|
31
|
+
"3": {
|
|
32
|
+
"name": "storage.type.dm"
|
|
33
|
+
},
|
|
34
|
+
"5": {
|
|
35
|
+
"name": "variable.other.dm"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"match": "(?x)\n(var)[\\/ ]\n(?:(static|global|tmp|const)\\/)?\n(?:(datum|atom(?:\\/movable)?|obj|mob|turf|area|savefile|list|client|sound|image|database|matrix|regex|exception)\\/)?\n(?:\n\t([a-zA-Z0-9_\\-$]*)\\/\n)*\n\n([A-Za-z0-9_$]*)\\b",
|
|
39
|
+
"name": "meta.initialization.dm"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)\\b",
|
|
43
|
+
"name": "constant.numeric.dm"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"match": "\\b(sleep|spawn|break|continue|do|else|for|goto|if|return|switch|while)\\b",
|
|
47
|
+
"name": "keyword.control.dm"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"match": "\\b(del|new)\\b",
|
|
51
|
+
"name": "keyword.other.dm"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"match": "\\b(proc|verb|datum|atom(/movable)?|obj|mob|turf|area|savefile|list|client|sound|image|database|matrix|regex|exception)\\b",
|
|
55
|
+
"name": "storage.type.dm"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"match": "\\b(as|const|global|set|static|tmp)\\b",
|
|
59
|
+
"name": "storage.modifier.dm"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"match": "\\b(usr|world|src|args)\\b",
|
|
63
|
+
"name": "variable.language.dm"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"match": "(\\?|(>|<)(=)?|\\.|:|/(=)?|~|\\+(\\+|=)?|-(-|=)?|\\*(\\*|=)?|%|>>|<<|=(=)?|!(=)?|<>|&|&&|\\^|\\||\\|\\||\\bto\\b|\\bin\\b|\\bstep\\b)",
|
|
67
|
+
"name": "keyword.operator.dm"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"match": "\\b([A-Z_][A-Z_0-9]*)\\b",
|
|
71
|
+
"name": "constant.language.dm"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"match": "\\bnull\\b",
|
|
75
|
+
"name": "constant.language.dm"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"begin": "{\"",
|
|
79
|
+
"beginCaptures": {
|
|
80
|
+
"0": {
|
|
81
|
+
"name": "punctuation.definition.string.begin.dm"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"end": "\"}",
|
|
85
|
+
"endCaptures": {
|
|
86
|
+
"0": {
|
|
87
|
+
"name": "punctuation.definition.string.end.dm"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"name": "string.quoted.triple.dm",
|
|
91
|
+
"patterns": [
|
|
92
|
+
{
|
|
93
|
+
"include": "#string_escaped_char"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"include": "#string_embedded_expression"
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"begin": "\"",
|
|
102
|
+
"beginCaptures": {
|
|
103
|
+
"0": {
|
|
104
|
+
"name": "punctuation.definition.string.begin.dm"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"end": "\"",
|
|
108
|
+
"endCaptures": {
|
|
109
|
+
"0": {
|
|
110
|
+
"name": "punctuation.definition.string.end.dm"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"name": "string.quoted.double.dm",
|
|
114
|
+
"patterns": [
|
|
115
|
+
{
|
|
116
|
+
"include": "#string_escaped_char"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"include": "#string_embedded_expression"
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"begin": "'",
|
|
125
|
+
"beginCaptures": {
|
|
126
|
+
"0": {
|
|
127
|
+
"name": "punctuation.definition.string.begin.dm"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"end": "'",
|
|
131
|
+
"endCaptures": {
|
|
132
|
+
"0": {
|
|
133
|
+
"name": "punctuation.definition.string.end.dm"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"name": "string.quoted.single.dm",
|
|
137
|
+
"patterns": [
|
|
138
|
+
{
|
|
139
|
+
"include": "#string_escaped_char"
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"begin": "(?x)\n^\\s* ((\\#)\\s*define) \\s+ # define\n((?<id>[a-zA-Z_][a-zA-Z0-9_]*)) # macro name\n(?:\n\t(\\()\n\t\t(\n\t\t\t\\s* \\g<id> \\s* # first argument\n\t\t\t((,) \\s* \\g<id> \\s*)* # additional arguments\n\t\t\t(?:\\.\\.\\.)? # varargs ellipsis?\n\t\t)\n\t(\\))\n)",
|
|
145
|
+
"beginCaptures": {
|
|
146
|
+
"1": {
|
|
147
|
+
"name": "keyword.control.directive.define.dm"
|
|
148
|
+
},
|
|
149
|
+
"2": {
|
|
150
|
+
"name": "punctuation.definition.directive.dm"
|
|
151
|
+
},
|
|
152
|
+
"3": {
|
|
153
|
+
"name": "entity.name.function.preprocessor.dm"
|
|
154
|
+
},
|
|
155
|
+
"5": {
|
|
156
|
+
"name": "punctuation.definition.parameters.begin.dm"
|
|
157
|
+
},
|
|
158
|
+
"6": {
|
|
159
|
+
"name": "variable.parameter.preprocessor.dm"
|
|
160
|
+
},
|
|
161
|
+
"8": {
|
|
162
|
+
"name": "punctuation.separator.parameters.dm"
|
|
163
|
+
},
|
|
164
|
+
"9": {
|
|
165
|
+
"name": "punctuation.definition.parameters.end.dm"
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"end": "(?=(?://|/\\*))|(?<!\\\\)(?=\\n)",
|
|
169
|
+
"name": "meta.preprocessor.macro.dm",
|
|
170
|
+
"patterns": [
|
|
171
|
+
{
|
|
172
|
+
"include": "$base"
|
|
173
|
+
}
|
|
174
|
+
]
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"begin": "(?x)\n^\\s* ((\\#)\\s*define) \\s+ # define\n((?<id>[a-zA-Z_][a-zA-Z0-9_]*)) # macro name",
|
|
178
|
+
"beginCaptures": {
|
|
179
|
+
"1": {
|
|
180
|
+
"name": "keyword.control.directive.define.dm"
|
|
181
|
+
},
|
|
182
|
+
"2": {
|
|
183
|
+
"name": "punctuation.definition.directive.dm"
|
|
184
|
+
},
|
|
185
|
+
"3": {
|
|
186
|
+
"name": "variable.other.preprocessor.dm"
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"end": "(?=(?://|/\\*))|(?<!\\\\)(?=\\n)",
|
|
190
|
+
"name": "meta.preprocessor.macro.dm",
|
|
191
|
+
"patterns": [
|
|
192
|
+
{
|
|
193
|
+
"include": "$base"
|
|
194
|
+
}
|
|
195
|
+
]
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"begin": "^\\s*(#\\s*(error|warn))\\b",
|
|
199
|
+
"captures": {
|
|
200
|
+
"1": {
|
|
201
|
+
"name": "keyword.control.import.error.dm"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"end": "$",
|
|
205
|
+
"name": "meta.preprocessor.diagnostic.dm",
|
|
206
|
+
"patterns": [
|
|
207
|
+
{
|
|
208
|
+
"match": "(?>\\\\\\s*\\n)",
|
|
209
|
+
"name": "punctuation.separator.continuation.dm"
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"begin": "^\\s*(?:((#)\\s*(?:elif|else|if|ifdef|ifndef))|((#)\\s*(undef|include)))\\b",
|
|
215
|
+
"beginCaptures": {
|
|
216
|
+
"1": {
|
|
217
|
+
"name": "keyword.control.directive.conditional.dm"
|
|
218
|
+
},
|
|
219
|
+
"2": {
|
|
220
|
+
"name": "punctuation.definition.directive.dm"
|
|
221
|
+
},
|
|
222
|
+
"3": {
|
|
223
|
+
"name": "keyword.control.directive.$5.dm"
|
|
224
|
+
},
|
|
225
|
+
"4": {
|
|
226
|
+
"name": "punctuation.definition.directive.dm"
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"end": "(?=(?://|/\\*))|(?<!\\\\)(?=\\n)",
|
|
230
|
+
"name": "meta.preprocessor.dm",
|
|
231
|
+
"patterns": [
|
|
232
|
+
{
|
|
233
|
+
"match": "(?>\\\\\\s*\\n)",
|
|
234
|
+
"name": "punctuation.separator.continuation.dm"
|
|
235
|
+
}
|
|
236
|
+
]
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"include": "#block"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"begin": "(?x)\n\t\t\t\t(?: ^ # begin-of-line\n\t\t\t\t\t|\n\t\t\t\t\t\t (?: (?= \\s ) (?<!else|new|return) (?<=\\w) # or word + space before name\n\t\t\t\t\t\t\t | (?= \\s*[A-Za-z_] ) (?<!&&) (?<=[*&>]) # or type modifier before name\n\t\t\t\t\t\t )\n\t\t\t\t)\n\t\t\t\t(\\s*) (?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate)\\s*\\()\n\t\t\t\t(\n\t\t\t\t\t(?: [A-Za-z_][A-Za-z0-9_]*+ | :: )++ | # actual name\n\t\t\t\t\t(?: (?<=operator) (?: [-*&<>=+!]+ | \\(\\) | \\[\\] ) ) # if it is a C++ operator\n\t\t\t\t)\n\t\t\t\t \\s*(?=\\()",
|
|
243
|
+
"beginCaptures": {
|
|
244
|
+
"1": {
|
|
245
|
+
"name": "punctuation.whitespace.function.leading.dm"
|
|
246
|
+
},
|
|
247
|
+
"3": {
|
|
248
|
+
"name": "entity.name.function.dm"
|
|
249
|
+
},
|
|
250
|
+
"4": {
|
|
251
|
+
"name": "punctuation.definition.parameters.dm"
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"end": "(?<=\\})|(?=#)|(;)?",
|
|
255
|
+
"name": "meta.function.dm",
|
|
256
|
+
"patterns": [
|
|
257
|
+
{
|
|
258
|
+
"include": "#comments"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"include": "#parens"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"match": "\\bconst\\b",
|
|
265
|
+
"name": "storage.modifier.dm"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"include": "#block"
|
|
269
|
+
}
|
|
270
|
+
]
|
|
271
|
+
}
|
|
272
|
+
],
|
|
273
|
+
"repository": {
|
|
274
|
+
"access": {
|
|
275
|
+
"match": "\\.[a-zA-Z_][a-zA-Z_0-9]*\\b(?!\\s*\\()",
|
|
276
|
+
"name": "variable.other.dot-access.dm"
|
|
277
|
+
},
|
|
278
|
+
"block": {
|
|
279
|
+
"begin": "\\{",
|
|
280
|
+
"end": "\\}",
|
|
281
|
+
"name": "meta.block.dm",
|
|
282
|
+
"patterns": [
|
|
283
|
+
{
|
|
284
|
+
"include": "#block_innards"
|
|
285
|
+
}
|
|
286
|
+
]
|
|
287
|
+
},
|
|
288
|
+
"block_innards": {
|
|
289
|
+
"patterns": [
|
|
290
|
+
{
|
|
291
|
+
"include": "#preprocessor-rule-enabled-block"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"include": "#preprocessor-rule-disabled-block"
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"include": "#preprocessor-rule-other-block"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"include": "#access"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"captures": {
|
|
304
|
+
"1": {
|
|
305
|
+
"name": "punctuation.whitespace.function-call.leading.dm"
|
|
306
|
+
},
|
|
307
|
+
"2": {
|
|
308
|
+
"name": "support.function.any-method.dm"
|
|
309
|
+
},
|
|
310
|
+
"3": {
|
|
311
|
+
"name": "punctuation.definition.parameters.dm"
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
"match": "(?x) (?: (?= \\s ) (?:(?<=else|new|return) | (?<!\\w)) (\\s+))?\n\t\t\t(\\b\n\t\t\t\t(?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate)\\s*\\()(?:(?!NS)[A-Za-z_][A-Za-z0-9_]*+\\b | :: )++ # actual name\n\t\t\t)\n\t\t\t \\s*(\\()",
|
|
315
|
+
"name": "meta.function-call.dm"
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"include": "#block"
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"include": "$base"
|
|
322
|
+
}
|
|
323
|
+
]
|
|
324
|
+
},
|
|
325
|
+
"comments": {
|
|
326
|
+
"patterns": [
|
|
327
|
+
{
|
|
328
|
+
"captures": {
|
|
329
|
+
"1": {
|
|
330
|
+
"name": "meta.toc-list.banner.block.dm"
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
"match": "^/\\* =(\\s*.*?)\\s*= \\*/$\\n?",
|
|
334
|
+
"name": "comment.block.dm"
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"begin": "/\\*",
|
|
338
|
+
"captures": {
|
|
339
|
+
"0": {
|
|
340
|
+
"name": "punctuation.definition.comment.dm"
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
"end": "\\*/",
|
|
344
|
+
"name": "comment.block.dm",
|
|
345
|
+
"patterns": [
|
|
346
|
+
{
|
|
347
|
+
"include": "#comments"
|
|
348
|
+
}
|
|
349
|
+
]
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"match": "\\*/.*\\n",
|
|
353
|
+
"name": "invalid.illegal.stray-comment-end.dm"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"captures": {
|
|
357
|
+
"1": {
|
|
358
|
+
"name": "meta.toc-list.banner.line.dm"
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
"match": "^// =(\\s*.*?)\\s*=\\s*$\\n?",
|
|
362
|
+
"name": "comment.line.banner.dm"
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"begin": "//",
|
|
366
|
+
"beginCaptures": {
|
|
367
|
+
"0": {
|
|
368
|
+
"name": "punctuation.definition.comment.dm"
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
"end": "$\\n?",
|
|
372
|
+
"name": "comment.line.double-slash.dm",
|
|
373
|
+
"patterns": [
|
|
374
|
+
{
|
|
375
|
+
"match": "(?>\\\\\\s*\\n)",
|
|
376
|
+
"name": "punctuation.separator.continuation.dm"
|
|
377
|
+
}
|
|
378
|
+
]
|
|
379
|
+
}
|
|
380
|
+
]
|
|
381
|
+
},
|
|
382
|
+
"disabled": {
|
|
383
|
+
"begin": "^\\s*#\\s*if(n?def)?\\b.*$",
|
|
384
|
+
"comment": "eat nested preprocessor if(def)s",
|
|
385
|
+
"end": "^\\s*#\\s*endif\\b.*$",
|
|
386
|
+
"patterns": [
|
|
387
|
+
{
|
|
388
|
+
"include": "#disabled"
|
|
389
|
+
}
|
|
390
|
+
]
|
|
391
|
+
},
|
|
392
|
+
"parens": {
|
|
393
|
+
"begin": "\\(",
|
|
394
|
+
"end": "\\)",
|
|
395
|
+
"name": "meta.parens.dm",
|
|
396
|
+
"patterns": [
|
|
397
|
+
{
|
|
398
|
+
"include": "$base"
|
|
399
|
+
}
|
|
400
|
+
]
|
|
401
|
+
},
|
|
402
|
+
"preprocessor-rule-disabled": {
|
|
403
|
+
"begin": "^\\s*(#(if)\\s+(0)\\b).*",
|
|
404
|
+
"captures": {
|
|
405
|
+
"1": {
|
|
406
|
+
"name": "meta.preprocessor.dm"
|
|
407
|
+
},
|
|
408
|
+
"2": {
|
|
409
|
+
"name": "keyword.control.import.if.dm"
|
|
410
|
+
},
|
|
411
|
+
"3": {
|
|
412
|
+
"name": "constant.numeric.preprocessor.dm"
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
"end": "^\\s*(#\\s*(endif)\\b)",
|
|
416
|
+
"patterns": [
|
|
417
|
+
{
|
|
418
|
+
"begin": "^\\s*(#\\s*(else)\\b)",
|
|
419
|
+
"captures": {
|
|
420
|
+
"1": {
|
|
421
|
+
"name": "meta.preprocessor.dm"
|
|
422
|
+
},
|
|
423
|
+
"2": {
|
|
424
|
+
"name": "keyword.control.import.else.dm"
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
"end": "(?=^\\s*#\\s*endif\\b.*$)",
|
|
428
|
+
"patterns": [
|
|
429
|
+
{
|
|
430
|
+
"include": "$base"
|
|
431
|
+
}
|
|
432
|
+
]
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"begin": "",
|
|
436
|
+
"end": "(?=^\\s*#\\s*(else|endif)\\b.*$)",
|
|
437
|
+
"name": "comment.block.preprocessor.if-branch",
|
|
438
|
+
"patterns": [
|
|
439
|
+
{
|
|
440
|
+
"include": "#disabled"
|
|
441
|
+
}
|
|
442
|
+
]
|
|
443
|
+
}
|
|
444
|
+
]
|
|
445
|
+
},
|
|
446
|
+
"preprocessor-rule-disabled-block": {
|
|
447
|
+
"begin": "^\\s*(#(if)\\s+(0)\\b).*",
|
|
448
|
+
"captures": {
|
|
449
|
+
"1": {
|
|
450
|
+
"name": "meta.preprocessor.dm"
|
|
451
|
+
},
|
|
452
|
+
"2": {
|
|
453
|
+
"name": "keyword.control.import.if.dm"
|
|
454
|
+
},
|
|
455
|
+
"3": {
|
|
456
|
+
"name": "constant.numeric.preprocessor.dm"
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
"end": "^\\s*(#\\s*(endif)\\b)",
|
|
460
|
+
"patterns": [
|
|
461
|
+
{
|
|
462
|
+
"begin": "^\\s*(#\\s*(else)\\b)",
|
|
463
|
+
"captures": {
|
|
464
|
+
"1": {
|
|
465
|
+
"name": "meta.preprocessor.dm"
|
|
466
|
+
},
|
|
467
|
+
"2": {
|
|
468
|
+
"name": "keyword.control.import.else.dm"
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
"end": "(?=^\\s*#\\s*endif\\b.*$)",
|
|
472
|
+
"patterns": [
|
|
473
|
+
{
|
|
474
|
+
"include": "#block_innards"
|
|
475
|
+
}
|
|
476
|
+
]
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
"begin": "",
|
|
480
|
+
"end": "(?=^\\s*#\\s*(else|endif)\\b.*$)",
|
|
481
|
+
"name": "comment.block.preprocessor.if-branch.in-block",
|
|
482
|
+
"patterns": [
|
|
483
|
+
{
|
|
484
|
+
"include": "#disabled"
|
|
485
|
+
}
|
|
486
|
+
]
|
|
487
|
+
}
|
|
488
|
+
]
|
|
489
|
+
},
|
|
490
|
+
"preprocessor-rule-enabled": {
|
|
491
|
+
"begin": "^\\s*(#(if)\\s+(0*1)\\b)",
|
|
492
|
+
"captures": {
|
|
493
|
+
"1": {
|
|
494
|
+
"name": "meta.preprocessor.dm"
|
|
495
|
+
},
|
|
496
|
+
"2": {
|
|
497
|
+
"name": "keyword.control.import.if.dm"
|
|
498
|
+
},
|
|
499
|
+
"3": {
|
|
500
|
+
"name": "constant.numeric.preprocessor.dm"
|
|
501
|
+
}
|
|
502
|
+
},
|
|
503
|
+
"end": "^\\s*(#\\s*(endif)\\b)",
|
|
504
|
+
"patterns": [
|
|
505
|
+
{
|
|
506
|
+
"begin": "^\\s*(#\\s*(else)\\b).*",
|
|
507
|
+
"captures": {
|
|
508
|
+
"1": {
|
|
509
|
+
"name": "meta.preprocessor.dm"
|
|
510
|
+
},
|
|
511
|
+
"2": {
|
|
512
|
+
"name": "keyword.control.import.else.dm"
|
|
513
|
+
}
|
|
514
|
+
},
|
|
515
|
+
"contentName": "comment.block.preprocessor.else-branch",
|
|
516
|
+
"end": "(?=^\\s*#\\s*endif\\b.*$)",
|
|
517
|
+
"patterns": [
|
|
518
|
+
{
|
|
519
|
+
"include": "#disabled"
|
|
520
|
+
}
|
|
521
|
+
]
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
"begin": "",
|
|
525
|
+
"end": "(?=^\\s*#\\s*(else|endif)\\b.*$)",
|
|
526
|
+
"patterns": [
|
|
527
|
+
{
|
|
528
|
+
"include": "$base"
|
|
529
|
+
}
|
|
530
|
+
]
|
|
531
|
+
}
|
|
532
|
+
]
|
|
533
|
+
},
|
|
534
|
+
"preprocessor-rule-enabled-block": {
|
|
535
|
+
"begin": "^\\s*(#(if)\\s+(0*1)\\b)",
|
|
536
|
+
"captures": {
|
|
537
|
+
"1": {
|
|
538
|
+
"name": "meta.preprocessor.dm"
|
|
539
|
+
},
|
|
540
|
+
"2": {
|
|
541
|
+
"name": "keyword.control.import.if.dm"
|
|
542
|
+
},
|
|
543
|
+
"3": {
|
|
544
|
+
"name": "constant.numeric.preprocessor.dm"
|
|
545
|
+
}
|
|
546
|
+
},
|
|
547
|
+
"end": "^\\s*(#\\s*(endif)\\b)",
|
|
548
|
+
"patterns": [
|
|
549
|
+
{
|
|
550
|
+
"begin": "^\\s*(#\\s*(else)\\b).*",
|
|
551
|
+
"captures": {
|
|
552
|
+
"1": {
|
|
553
|
+
"name": "meta.preprocessor.dm"
|
|
554
|
+
},
|
|
555
|
+
"2": {
|
|
556
|
+
"name": "keyword.control.import.else.dm"
|
|
557
|
+
}
|
|
558
|
+
},
|
|
559
|
+
"contentName": "comment.block.preprocessor.else-branch.in-block",
|
|
560
|
+
"end": "(?=^\\s*#\\s*endif\\b.*$)",
|
|
561
|
+
"patterns": [
|
|
562
|
+
{
|
|
563
|
+
"include": "#disabled"
|
|
564
|
+
}
|
|
565
|
+
]
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
"begin": "",
|
|
569
|
+
"end": "(?=^\\s*#\\s*(else|endif)\\b.*$)",
|
|
570
|
+
"patterns": [
|
|
571
|
+
{
|
|
572
|
+
"include": "#block_innards"
|
|
573
|
+
}
|
|
574
|
+
]
|
|
575
|
+
}
|
|
576
|
+
]
|
|
577
|
+
},
|
|
578
|
+
"preprocessor-rule-other": {
|
|
579
|
+
"begin": "^\\s*((#\\s*(if(n?def)?))\\b.*?(?:(?=(?://|/\\*))|$))",
|
|
580
|
+
"captures": {
|
|
581
|
+
"1": {
|
|
582
|
+
"name": "meta.preprocessor.dm"
|
|
583
|
+
},
|
|
584
|
+
"2": {
|
|
585
|
+
"name": "keyword.control.import.dm"
|
|
586
|
+
}
|
|
587
|
+
},
|
|
588
|
+
"end": "^\\s*((#\\s*(endif))\\b).*$",
|
|
589
|
+
"patterns": [
|
|
590
|
+
{
|
|
591
|
+
"include": "$base"
|
|
592
|
+
}
|
|
593
|
+
]
|
|
594
|
+
},
|
|
595
|
+
"preprocessor-rule-other-block": {
|
|
596
|
+
"begin": "^\\s*(#\\s*(if(n?def)?)\\b.*?(?:(?=(?://|/\\*))|$))",
|
|
597
|
+
"captures": {
|
|
598
|
+
"1": {
|
|
599
|
+
"name": "meta.preprocessor.dm"
|
|
600
|
+
},
|
|
601
|
+
"2": {
|
|
602
|
+
"name": "keyword.control.import.dm"
|
|
603
|
+
}
|
|
604
|
+
},
|
|
605
|
+
"end": "^\\s*(#\\s*(endif)\\b).*$",
|
|
606
|
+
"patterns": [
|
|
607
|
+
{
|
|
608
|
+
"include": "#block_innards"
|
|
609
|
+
}
|
|
610
|
+
]
|
|
611
|
+
},
|
|
612
|
+
"string_embedded_expression": {
|
|
613
|
+
"patterns": [
|
|
614
|
+
{
|
|
615
|
+
"begin": "(?<!\\\\)\\[",
|
|
616
|
+
"end": "\\]",
|
|
617
|
+
"name": "string.interpolated.dm",
|
|
618
|
+
"patterns": [
|
|
619
|
+
{
|
|
620
|
+
"include": "$self"
|
|
621
|
+
}
|
|
622
|
+
]
|
|
623
|
+
}
|
|
624
|
+
]
|
|
625
|
+
},
|
|
626
|
+
"string_escaped_char": {
|
|
627
|
+
"patterns": [
|
|
628
|
+
{
|
|
629
|
+
"match": "(?x)\n\\\\\n(\n\th(?:(?:er|im)self|ers|im)\n\t|([tTsS]?he) # Weird regex to match The, the, She, she and he at once.\n\t|He\n\t|[Hh]is\n\t|[aA]n?\n\t|(?:im)?proper\n\t|\\.\\.\\.\n\t|(?:icon|ref|[Rr]oman)(?=\\[) # Macros which need a [] after them.\n\t|[s<>\"n\\n \\[]\n)",
|
|
630
|
+
"name": "constant.character.escape.dm"
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
"match": "\\\\.",
|
|
634
|
+
"name": "invalid.illegal.unknown-escape.dm"
|
|
635
|
+
}
|
|
636
|
+
]
|
|
637
|
+
}
|
|
638
|
+
},
|
|
639
|
+
"scopeName": "source.dm"
|
|
640
|
+
}
|