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,3050 @@
|
|
|
1
|
+
{
|
|
2
|
+
"displayName": "Stata",
|
|
3
|
+
"fileTypes": [
|
|
4
|
+
"do",
|
|
5
|
+
"ado",
|
|
6
|
+
"mata"
|
|
7
|
+
],
|
|
8
|
+
"foldingStartMarker": "\\{\\s*$",
|
|
9
|
+
"foldingStopMarker": "^\\s*\\}",
|
|
10
|
+
"name": "stata",
|
|
11
|
+
"patterns": [
|
|
12
|
+
{
|
|
13
|
+
"include": "#ascii-regex-functions"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"include": "#unicode-regex-functions"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"include": "#constants"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"include": "#functions"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"include": "#comments"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"include": "#subscripts"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"include": "#operators"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"include": "#macro-local"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"include": "#macro-global"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"include": "#string-compound"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"include": "#string-regular"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"include": "#builtin_variables"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"include": "#macro-commands"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"comment": "keywords that delimit flow conditionals",
|
|
53
|
+
"match": "\\b(if|else if|else)\\b",
|
|
54
|
+
"name": "keyword.control.conditional.stata"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"captures": {
|
|
58
|
+
"1": {
|
|
59
|
+
"name": "storage.type.scalar.stata"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"match": "^\\s*(sca(lar|la|l)?(\\s+de(fine|fin|fi|f)?)?)\\s+(?!(drop|dir?|l(ist|is|i)?)\\s+)"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"begin": "\\b(mer(ge|g)?)\\s+(1|m|n)(:)(1|m|n)",
|
|
66
|
+
"beginCaptures": {
|
|
67
|
+
"1": {
|
|
68
|
+
"name": "keyword.control.flow.stata"
|
|
69
|
+
},
|
|
70
|
+
"3": {
|
|
71
|
+
"patterns": [
|
|
72
|
+
{
|
|
73
|
+
"include": "#constants"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"match": "m|n",
|
|
77
|
+
"name": ""
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
"4": {
|
|
82
|
+
"name": "punctuation.separator.key-value"
|
|
83
|
+
},
|
|
84
|
+
"5": {
|
|
85
|
+
"patterns": [
|
|
86
|
+
{
|
|
87
|
+
"include": "#constants"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"match": "m|n",
|
|
91
|
+
"name": ""
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"end": "using",
|
|
97
|
+
"patterns": [
|
|
98
|
+
{
|
|
99
|
+
"include": "#builtin_variables"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"include": "#macro-local"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"include": "#macro-global"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"include": "#comments"
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"captures": {
|
|
114
|
+
"1": {
|
|
115
|
+
"name": "keyword.control.flow.stata"
|
|
116
|
+
},
|
|
117
|
+
"2": {
|
|
118
|
+
"patterns": [
|
|
119
|
+
{
|
|
120
|
+
"include": "#macro-local-identifiers"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"include": "#macro-local"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"include": "#macro-global"
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
"3": {
|
|
131
|
+
"name": "keyword.control.flow.stata"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"match": "\\b(foreach)\\s+((?!in|of).+)\\s+(in|of var(list|lis|li|l)?|of new(list|lis|li|l)?|of num(list|lis|li|l)?)\\b"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"begin": "\\b(foreach)\\s+((?!in|of).+)\\s+(of loc(al|a)?|of glo(bal|ba|b)?)\\b\\s*",
|
|
138
|
+
"beginCaptures": {
|
|
139
|
+
"1": {
|
|
140
|
+
"name": "keyword.control.flow.stata"
|
|
141
|
+
},
|
|
142
|
+
"2": {
|
|
143
|
+
"patterns": [
|
|
144
|
+
{
|
|
145
|
+
"include": "#macro-local-identifiers"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"include": "#macro-local"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"include": "#macro-global"
|
|
152
|
+
}
|
|
153
|
+
]
|
|
154
|
+
},
|
|
155
|
+
"3": {
|
|
156
|
+
"name": "keyword.control.flow.stata"
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"end": "(?=\\s*\\{)",
|
|
160
|
+
"patterns": [
|
|
161
|
+
{
|
|
162
|
+
"include": "#macro-local-identifiers"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"include": "#macro-local"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"include": "#macro-global"
|
|
169
|
+
}
|
|
170
|
+
]
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"begin": "\\b(forvalues|forvalue|forvalu|forval|forva|forv)\\s*",
|
|
174
|
+
"beginCaptures": {
|
|
175
|
+
"1": {
|
|
176
|
+
"name": "keyword.control.flow.stata"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"end": "\\s*(=)\\s*([^\\{]+)\\s*|(?=\\n)",
|
|
180
|
+
"endCaptures": {
|
|
181
|
+
"1": {
|
|
182
|
+
"name": "keyword.operator.assignment.stata"
|
|
183
|
+
},
|
|
184
|
+
"2": {
|
|
185
|
+
"patterns": [
|
|
186
|
+
{
|
|
187
|
+
"include": "#constants"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"include": "#operators"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"include": "#macro-local"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"include": "#macro-global"
|
|
197
|
+
}
|
|
198
|
+
]
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"patterns": [
|
|
202
|
+
{
|
|
203
|
+
"include": "#macro-local-identifiers"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"include": "#macro-local"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"include": "#macro-global"
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"comment": "keywords that delimit loops",
|
|
215
|
+
"match": "\\b(while|continue)\\b",
|
|
216
|
+
"name": "keyword.control.flow.stata"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"captures": {
|
|
220
|
+
"1": {
|
|
221
|
+
"name": "keyword.other.stata"
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
"comment": "keywords that haven't fit into other groups (yet).",
|
|
225
|
+
"match": "\\b(as|ass|asse|asser|assert)\\b"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"comment": "prefixes that require a colon",
|
|
229
|
+
"match": "\\b(by(sort|sor|so|s)?|statsby|rolling|bootstrap|jackknife|permute|simulate|svy|mi est(imate|imat|ima|im|i)?|nestreg|stepwise|xi|fp|mfp|vers(ion|io|i)?)\\b",
|
|
230
|
+
"name": "storage.type.function.stata"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"comment": "prefixes that don't need a colon",
|
|
234
|
+
"match": "\\b(qui(etly|etl|et|e)?|n(oisily|oisil|oisi|ois|oi|o)?|cap(ture|tur|tu|t)?)\\b:?",
|
|
235
|
+
"name": "keyword.control.flow.stata"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"captures": {
|
|
239
|
+
"1": {
|
|
240
|
+
"name": "storage.type.function.stata"
|
|
241
|
+
},
|
|
242
|
+
"3": {
|
|
243
|
+
"name": "storage.type.function.stata"
|
|
244
|
+
},
|
|
245
|
+
"7": {
|
|
246
|
+
"name": "entity.name.function.stata"
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
"match": "\\s*(pr(ogram|ogra|ogr|og|o)?)\\s+((di(r)?|drop|l(ist|is|i)?)\\s+)([\\w&&[^0-9]]\\w{0,31})"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"begin": "^\\s*(pr(ogram|ogra|ogr|og|o)?)\\s+(de(fine|fin|fi|f)?\\s+)?",
|
|
253
|
+
"beginCaptures": {
|
|
254
|
+
"1": {
|
|
255
|
+
"name": "storage.type.function.stata"
|
|
256
|
+
},
|
|
257
|
+
"3": {
|
|
258
|
+
"name": "storage.type.function.stata"
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
"end": "(?=,|\\n|/)",
|
|
262
|
+
"patterns": [
|
|
263
|
+
{
|
|
264
|
+
"include": "#macro-local"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"include": "#macro-global"
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"match": "[\\w&&[^0-9]]\\w{0,31}",
|
|
271
|
+
"name": "entity.name.function.stata"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"match": "[^A-za-z_0-9,\\n/ ]+",
|
|
275
|
+
"name": "invalid.illegal.name.stata"
|
|
276
|
+
}
|
|
277
|
+
]
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"captures": {
|
|
281
|
+
"1": "keyword.functions.data.stata.test"
|
|
282
|
+
},
|
|
283
|
+
"match": "\\b(form(at|a)?)\\s*([\\w&&[^0-9]]\\w{0,31})*\\s*(%)(-)?(0)?([0-9]+)(.)([0-9]+)(e|f|g)(c)?"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"include": "#braces-with-error"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"begin": "(?=syntax)",
|
|
290
|
+
"end": "\\n",
|
|
291
|
+
"patterns": [
|
|
292
|
+
{
|
|
293
|
+
"begin": "syntax",
|
|
294
|
+
"beginCaptures": {
|
|
295
|
+
"0": {
|
|
296
|
+
"name": "keyword.functions.program.stata"
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
"comment": "color before the comma",
|
|
300
|
+
"end": "(?=,|\\n)",
|
|
301
|
+
"patterns": [
|
|
302
|
+
{
|
|
303
|
+
"begin": "///",
|
|
304
|
+
"end": "\\n",
|
|
305
|
+
"name": "comment.block.stata"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"match": "\\[",
|
|
309
|
+
"name": "punctuation.definition.parameters.begin.stata"
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"match": "\\]",
|
|
313
|
+
"name": "punctuation.definition.parameters.end.stata"
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"match": "\\b(varlist|varname|newvarlist|newvarname|namelist|name|anything)\\b",
|
|
317
|
+
"name": "entity.name.type.class.stata"
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"captures": {
|
|
321
|
+
"2": {
|
|
322
|
+
"name": "entity.name.type.class.stata"
|
|
323
|
+
},
|
|
324
|
+
"3": {
|
|
325
|
+
"name": "keyword.operator.arithmetic.stata"
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
"match": "\\b((if|in|using|fweight|aweight|pweight|iweight))\\b(/)?"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"captures": {
|
|
332
|
+
"1": {
|
|
333
|
+
"name": "keyword.operator.arithmetic.stata"
|
|
334
|
+
},
|
|
335
|
+
"2": {
|
|
336
|
+
"name": "entity.name.type.class.stata"
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
"match": "(/)?(exp)"
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
"include": "#constants"
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"include": "#operators"
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"include": "#string-compound"
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"include": "#string-regular"
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"include": "#macro-local"
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"include": "#macro-global"
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"include": "#builtin_variables"
|
|
361
|
+
}
|
|
362
|
+
]
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"begin": ",",
|
|
366
|
+
"beginCaptures": {
|
|
367
|
+
"0": {
|
|
368
|
+
"name": "punctuation.definition.variable.begin.stata"
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
"comment": "things to color after the comma",
|
|
372
|
+
"end": "(?=\\n)",
|
|
373
|
+
"patterns": [
|
|
374
|
+
{
|
|
375
|
+
"begin": "///",
|
|
376
|
+
"end": "\\n",
|
|
377
|
+
"name": "comment.block.stata"
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"begin": "([^\\s\\[\\]]+)(\\()",
|
|
381
|
+
"beginCaptures": {
|
|
382
|
+
"1": {
|
|
383
|
+
"comment": "these are the names that become macros",
|
|
384
|
+
"patterns": [
|
|
385
|
+
{
|
|
386
|
+
"include": "#macro-local-identifiers"
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"include": "#macro-local"
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"include": "#macro-global"
|
|
393
|
+
}
|
|
394
|
+
]
|
|
395
|
+
},
|
|
396
|
+
"2": {
|
|
397
|
+
"name": "keyword.operator.parentheses.stata"
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
"comment": "color options with parentheses",
|
|
401
|
+
"end": "\\)",
|
|
402
|
+
"endCaptures": {
|
|
403
|
+
"0": {
|
|
404
|
+
"name": "keyword.operator.parentheses.stata"
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
"patterns": [
|
|
408
|
+
{
|
|
409
|
+
"captures": {
|
|
410
|
+
"0": {
|
|
411
|
+
"name": "support.type.stata"
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
"comment": "the first word is often a type",
|
|
415
|
+
"match": "\\b(integer|intege|integ|inte|int|real|string|strin|stri|str)\\b"
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"include": "#constants"
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
"include": "#operators"
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
"include": "#string-compound"
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
"include": "#string-regular"
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
"include": "#macro-local"
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
"include": "#macro-global"
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
"include": "#builtin_variables"
|
|
437
|
+
}
|
|
438
|
+
]
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
"include": "#macro-local-identifiers"
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
"include": "#constants"
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
"include": "#operators"
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
"include": "#string-compound"
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
"include": "#string-regular"
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
"include": "#macro-local"
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
"include": "#macro-global"
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
"include": "#builtin_variables"
|
|
463
|
+
}
|
|
464
|
+
]
|
|
465
|
+
}
|
|
466
|
+
]
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
"captures": {
|
|
470
|
+
"1": {
|
|
471
|
+
"name": "keyword.functions.data.stata"
|
|
472
|
+
}
|
|
473
|
+
},
|
|
474
|
+
"comment": "one-word commands",
|
|
475
|
+
"match": "\\b(sa(v|ve)|saveold|destring|tostring|u(se|s)?|note(s)?|form(at|a)?)\\b"
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
"comment": "programming commands",
|
|
479
|
+
"match": "\\b(exit|end)\\b",
|
|
480
|
+
"name": "keyword.functions.data.stata"
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"captures": {
|
|
484
|
+
"1": {
|
|
485
|
+
"name": "keyword.functions.data.stata"
|
|
486
|
+
},
|
|
487
|
+
"2": {
|
|
488
|
+
"patterns": [
|
|
489
|
+
{
|
|
490
|
+
"include": "#macro-local"
|
|
491
|
+
}
|
|
492
|
+
]
|
|
493
|
+
},
|
|
494
|
+
"4": {
|
|
495
|
+
"name": "invalid.illegal.name.stata"
|
|
496
|
+
},
|
|
497
|
+
"5": {
|
|
498
|
+
"name": "keyword.operator.assignment.stata"
|
|
499
|
+
}
|
|
500
|
+
},
|
|
501
|
+
"match": "\\b(replace)\\s+([^=]+)\\s*((==)|(=))"
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
"captures": {
|
|
505
|
+
"1": {
|
|
506
|
+
"name": "keyword.functions.data.stata"
|
|
507
|
+
},
|
|
508
|
+
"3": {
|
|
509
|
+
"name": "support.type.stata"
|
|
510
|
+
},
|
|
511
|
+
"5": {
|
|
512
|
+
"patterns": [
|
|
513
|
+
{
|
|
514
|
+
"include": "#reserved-names"
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
"include": "#macro-local"
|
|
518
|
+
}
|
|
519
|
+
]
|
|
520
|
+
},
|
|
521
|
+
"7": {
|
|
522
|
+
"name": "invalid.illegal.name.stata"
|
|
523
|
+
},
|
|
524
|
+
"8": {
|
|
525
|
+
"name": "keyword.operator.assignment.stata"
|
|
526
|
+
}
|
|
527
|
+
},
|
|
528
|
+
"match": "\\b(g(enerate|enerat|enera|ener|ene|en|e)?|egen)\\s+((byte|int|long|float|double|str[1-9]?[0-9]?[0-9]?[0-9]?|strL)\\s+)?([^=\\s]+)\\s*((==)|(=))"
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
"captures": {
|
|
532
|
+
"1": {
|
|
533
|
+
"name": "keyword.functions.data.stata"
|
|
534
|
+
},
|
|
535
|
+
"3": {
|
|
536
|
+
"name": "support.type.stata"
|
|
537
|
+
}
|
|
538
|
+
},
|
|
539
|
+
"match": "\\b(set ty(pe|p)?)\\s+((byte|int|long|float|double|str[1-9]?[0-9]?[0-9]?[0-9]?|strL)?\\s+)\\b"
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
"captures": {
|
|
543
|
+
"1": {
|
|
544
|
+
"name": "keyword.functions.data.stata"
|
|
545
|
+
},
|
|
546
|
+
"3": {
|
|
547
|
+
"name": "keyword.functions.data.stata"
|
|
548
|
+
},
|
|
549
|
+
"6": {
|
|
550
|
+
"name": "punctuation.definition.string.begin.stata"
|
|
551
|
+
},
|
|
552
|
+
"7": {
|
|
553
|
+
"patterns": [
|
|
554
|
+
{
|
|
555
|
+
"include": "#string-compound"
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
"include": "#macro-local-escaped"
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
"include": "#macro-global-escaped"
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
"include": "#macro-local"
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
"include": "#macro-global"
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
"match": "[^`\\$]{81,}",
|
|
571
|
+
"name": "invalid.illegal.name.stata"
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
"match": ".",
|
|
575
|
+
"name": "string.quoted.double.compound.stata"
|
|
576
|
+
}
|
|
577
|
+
]
|
|
578
|
+
},
|
|
579
|
+
"8": {
|
|
580
|
+
"name": "punctuation.definition.string.begin.stata"
|
|
581
|
+
}
|
|
582
|
+
},
|
|
583
|
+
"match": "\\b(la(bel|be|b)?)\\s+(var(iable|iabl|iab|ia|i)?)\\s+([\\w&&[^0-9]]\\w{0,31})\\s+(`\")(.+)(\"')"
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
"captures": {
|
|
587
|
+
"1": {
|
|
588
|
+
"name": "keyword.functions.data.stata"
|
|
589
|
+
},
|
|
590
|
+
"3": {
|
|
591
|
+
"name": "keyword.functions.data.stata"
|
|
592
|
+
},
|
|
593
|
+
"6": {
|
|
594
|
+
"name": "punctuation.definition.string.begin.stata"
|
|
595
|
+
},
|
|
596
|
+
"7": {
|
|
597
|
+
"patterns": [
|
|
598
|
+
{
|
|
599
|
+
"include": "#macro-local-escaped"
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
"include": "#macro-global-escaped"
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
"include": "#macro-local"
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
"include": "#macro-global"
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
"match": "[^`\\$]{81,}",
|
|
612
|
+
"name": "invalid.illegal.name.stata"
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
"match": ".",
|
|
616
|
+
"name": "string.quoted.double.stata"
|
|
617
|
+
}
|
|
618
|
+
]
|
|
619
|
+
},
|
|
620
|
+
"8": {
|
|
621
|
+
"name": "punctuation.definition.string.begin.stata"
|
|
622
|
+
}
|
|
623
|
+
},
|
|
624
|
+
"match": "\\b(la(bel|be|b)?)\\s+(var(iable|iabl|iab|ia|i)?)\\s+([\\w&&[^0-9]]\\w{0,31})\\s+(\")(.+)(\")"
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
"captures": {
|
|
628
|
+
"1": {
|
|
629
|
+
"name": "keyword.functions.data.stata"
|
|
630
|
+
},
|
|
631
|
+
"3": {
|
|
632
|
+
"name": "keyword.functions.data.stata"
|
|
633
|
+
}
|
|
634
|
+
},
|
|
635
|
+
"match": "\\b(la(bel|be|b)?)\\s+(da(ta|t)?|var(iable|iabl|iab|ia|i)?|de(f|fi|fin|fine)?|val(ues|ue|u)?|di(r)?|l(ist|is|i)?|copy|drop|save|lang(uage|uag|ua|u)?)\\b"
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
"begin": "\\b(drop|keep)\\b(?!\\s+(if|in)\\b)",
|
|
639
|
+
"beginCaptures": {
|
|
640
|
+
"1": {
|
|
641
|
+
"name": "keyword.functions.data.stata"
|
|
642
|
+
}
|
|
643
|
+
},
|
|
644
|
+
"end": "\\n",
|
|
645
|
+
"patterns": [
|
|
646
|
+
{
|
|
647
|
+
"match": "\\b(if|in)\\b",
|
|
648
|
+
"name": "invalid.illegal.name.stata"
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
"include": "#comments"
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
"include": "#macro-local"
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
"include": "#macro-global"
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
"include": "#operators"
|
|
661
|
+
}
|
|
662
|
+
]
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
"captures": {
|
|
666
|
+
"1": {
|
|
667
|
+
"name": "keyword.functions.data.stata"
|
|
668
|
+
},
|
|
669
|
+
"2": {
|
|
670
|
+
"name": "keyword.functions.data.stata"
|
|
671
|
+
}
|
|
672
|
+
},
|
|
673
|
+
"match": "\\b(drop|keep)\\s+(if|in)\\b"
|
|
674
|
+
},
|
|
675
|
+
{
|
|
676
|
+
"begin": "^\\s*mata:?\\s*$",
|
|
677
|
+
"comment": "won't match single-line Mata statements",
|
|
678
|
+
"end": "^\\s*end\\s*$\\n?",
|
|
679
|
+
"name": "meta.embedded.block.mata",
|
|
680
|
+
"patterns": [
|
|
681
|
+
{
|
|
682
|
+
"match": "(?<![^$\\s])(version|pragma|if|else|for|while|do|break|continue|goto|return)(?=\\s)",
|
|
683
|
+
"name": "keyword.control.mata"
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
"captures": {
|
|
687
|
+
"1": {
|
|
688
|
+
"name": "storage.type.eltype.mata"
|
|
689
|
+
},
|
|
690
|
+
"4": {
|
|
691
|
+
"name": "storage.type.orgtype.mata"
|
|
692
|
+
}
|
|
693
|
+
},
|
|
694
|
+
"match": "\\b(transmorphic|string|numeric|real|complex|(pointer(\\([^)]+\\))?))\\s+(matrix|vector|rowvector|colvector|scalar)\\b",
|
|
695
|
+
"name": "storage.type.mata"
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
"comment": "need to end with whitespace character here or last group doesn't match",
|
|
699
|
+
"match": "\\b(transmorphic|string|numeric|real|complex|(pointer(\\([^)]+\\))?))\\s",
|
|
700
|
+
"name": "storage.type.eltype.mata"
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
"match": "\\b(matrix|vector|rowvector|colvector|scalar)\\b",
|
|
704
|
+
"name": "storage.type.orgtype.mata"
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
"match": "\\!|\\+\\+|\\-\\-|\\&|\\'|\\?|\\\\|\\:\\:|\\,|\\.\\.|\\||\\=|\\=\\=|\\>\\=|\\<\\=|\\<|\\>|\\!\\=|\\#|\\+|\\-|\\*|\\^|\\/",
|
|
708
|
+
"name": "keyword.operator.mata"
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
"include": "$self"
|
|
712
|
+
}
|
|
713
|
+
]
|
|
714
|
+
},
|
|
715
|
+
{
|
|
716
|
+
"begin": "\\b(odbc)\\b",
|
|
717
|
+
"beginCaptures": {
|
|
718
|
+
"0": {
|
|
719
|
+
"name": "keyword.control.flow.stata"
|
|
720
|
+
}
|
|
721
|
+
},
|
|
722
|
+
"end": "\\n",
|
|
723
|
+
"patterns": [
|
|
724
|
+
{
|
|
725
|
+
"begin": "///",
|
|
726
|
+
"end": "\\n",
|
|
727
|
+
"name": "comment.block.stata"
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
"begin": "(exec?)(\\(\")",
|
|
731
|
+
"beginCaptures": {
|
|
732
|
+
"1": {
|
|
733
|
+
"name": "support.function.builtin.stata"
|
|
734
|
+
},
|
|
735
|
+
"2": {
|
|
736
|
+
"name": "punctuation.definition.parameters.begin.stata"
|
|
737
|
+
}
|
|
738
|
+
},
|
|
739
|
+
"end": "\"\\)",
|
|
740
|
+
"endCaptures": {
|
|
741
|
+
"0": {
|
|
742
|
+
"name": "punctuation.definition.parameters.end.stata"
|
|
743
|
+
}
|
|
744
|
+
},
|
|
745
|
+
"patterns": [
|
|
746
|
+
{
|
|
747
|
+
"include": "source.sql"
|
|
748
|
+
}
|
|
749
|
+
]
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
"include": "$self"
|
|
753
|
+
}
|
|
754
|
+
]
|
|
755
|
+
},
|
|
756
|
+
{
|
|
757
|
+
"include": "#commands-other"
|
|
758
|
+
}
|
|
759
|
+
],
|
|
760
|
+
"repository": {
|
|
761
|
+
"ascii-regex-character-class": {
|
|
762
|
+
"patterns": [
|
|
763
|
+
{
|
|
764
|
+
"match": "\\\\[\\*\\+\\?\\-\\.\\^\\$\\|\\[\\]\\(\\)\\\\]",
|
|
765
|
+
"name": "constant.character.escape.backslash.stata"
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
"match": "\\.",
|
|
769
|
+
"name": "constant.character.character-class.stata"
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
"match": "\\\\.",
|
|
773
|
+
"name": "illegal.invalid.character-class.stata"
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
"begin": "(\\[)(\\^)?",
|
|
777
|
+
"beginCaptures": {
|
|
778
|
+
"1": {
|
|
779
|
+
"name": "punctuation.definition.character-class.stata"
|
|
780
|
+
},
|
|
781
|
+
"2": {
|
|
782
|
+
"name": "keyword.operator.negation.stata"
|
|
783
|
+
}
|
|
784
|
+
},
|
|
785
|
+
"end": "(\\])",
|
|
786
|
+
"endCaptures": {
|
|
787
|
+
"1": {
|
|
788
|
+
"name": "punctuation.definition.character-class.stata"
|
|
789
|
+
}
|
|
790
|
+
},
|
|
791
|
+
"name": "constant.other.character-class.set.stata",
|
|
792
|
+
"patterns": [
|
|
793
|
+
{
|
|
794
|
+
"include": "#ascii-regex-character-class"
|
|
795
|
+
},
|
|
796
|
+
{
|
|
797
|
+
"captures": {
|
|
798
|
+
"2": {
|
|
799
|
+
"name": "constant.character.escape.backslash.stata"
|
|
800
|
+
},
|
|
801
|
+
"4": {
|
|
802
|
+
"name": "constant.character.escape.backslash.stata"
|
|
803
|
+
}
|
|
804
|
+
},
|
|
805
|
+
"match": "((\\\\.)|.)\\-((\\\\.)|[^\\]])",
|
|
806
|
+
"name": "constant.other.character-class.range.stata"
|
|
807
|
+
}
|
|
808
|
+
]
|
|
809
|
+
}
|
|
810
|
+
]
|
|
811
|
+
},
|
|
812
|
+
"ascii-regex-functions": {
|
|
813
|
+
"patterns": [
|
|
814
|
+
{
|
|
815
|
+
"captures": {
|
|
816
|
+
"1": {
|
|
817
|
+
"name": "support.function.builtin.stata"
|
|
818
|
+
},
|
|
819
|
+
"2": {
|
|
820
|
+
"name": "punctuation.definition.parameters.begin.stata"
|
|
821
|
+
},
|
|
822
|
+
"3": {
|
|
823
|
+
"patterns": [
|
|
824
|
+
{
|
|
825
|
+
"include": "#string-compound"
|
|
826
|
+
},
|
|
827
|
+
{
|
|
828
|
+
"include": "#string-regular"
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
"include": "#macro-local"
|
|
832
|
+
},
|
|
833
|
+
{
|
|
834
|
+
"include": "#macro-global"
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
"include": "#functions"
|
|
838
|
+
},
|
|
839
|
+
{
|
|
840
|
+
"match": "[\\w&&[^0-9]]\\w{0,31}",
|
|
841
|
+
"name": "variable.parameter.function.stata"
|
|
842
|
+
},
|
|
843
|
+
{
|
|
844
|
+
"include": "#comments-triple-slash"
|
|
845
|
+
}
|
|
846
|
+
]
|
|
847
|
+
},
|
|
848
|
+
"4": {
|
|
849
|
+
"name": "punctuation.definition.variable.begin.stata"
|
|
850
|
+
},
|
|
851
|
+
"5": {
|
|
852
|
+
"name": "punctuation.definition.string.begin.stata"
|
|
853
|
+
},
|
|
854
|
+
"6": {
|
|
855
|
+
"patterns": [
|
|
856
|
+
{
|
|
857
|
+
"include": "#ascii-regex-internals"
|
|
858
|
+
}
|
|
859
|
+
]
|
|
860
|
+
},
|
|
861
|
+
"7": {
|
|
862
|
+
"name": "punctuation.definition.string.end.stata"
|
|
863
|
+
},
|
|
864
|
+
"8": {
|
|
865
|
+
"name": "invalid.illegal.punctuation.stata"
|
|
866
|
+
},
|
|
867
|
+
"9": {
|
|
868
|
+
"name": "punctuation.definition.parameters.end.stata"
|
|
869
|
+
}
|
|
870
|
+
},
|
|
871
|
+
"comment": "color regexm with regular quotes i.e. \" ",
|
|
872
|
+
"match": "\\b(regexm)(\\()([^,]+)(,)\\s*(\")([^\"]+)(\"(')?)\\s*(\\))"
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
"captures": {
|
|
876
|
+
"1": {
|
|
877
|
+
"name": "support.function.builtin.stata"
|
|
878
|
+
},
|
|
879
|
+
"2": {
|
|
880
|
+
"name": "punctuation.definition.parameters.begin.stata"
|
|
881
|
+
},
|
|
882
|
+
"3": {
|
|
883
|
+
"patterns": [
|
|
884
|
+
{
|
|
885
|
+
"include": "#string-compound"
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
"include": "#string-regular"
|
|
889
|
+
},
|
|
890
|
+
{
|
|
891
|
+
"include": "#macro-local"
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
"include": "#macro-global"
|
|
895
|
+
},
|
|
896
|
+
{
|
|
897
|
+
"include": "#functions"
|
|
898
|
+
},
|
|
899
|
+
{
|
|
900
|
+
"match": "[\\w&&[^0-9]]\\w{0,31}",
|
|
901
|
+
"name": "variable.parameter.function.stata"
|
|
902
|
+
},
|
|
903
|
+
{
|
|
904
|
+
"include": "#comments-triple-slash"
|
|
905
|
+
}
|
|
906
|
+
]
|
|
907
|
+
},
|
|
908
|
+
"4": {
|
|
909
|
+
"name": "punctuation.definition.variable.begin.stata"
|
|
910
|
+
},
|
|
911
|
+
"5": {
|
|
912
|
+
"name": "punctuation.definition.string.begin.stata"
|
|
913
|
+
},
|
|
914
|
+
"6": {
|
|
915
|
+
"patterns": [
|
|
916
|
+
{
|
|
917
|
+
"include": "#ascii-regex-internals"
|
|
918
|
+
}
|
|
919
|
+
]
|
|
920
|
+
},
|
|
921
|
+
"7": {
|
|
922
|
+
"name": "punctuation.definition.string.end.stata"
|
|
923
|
+
},
|
|
924
|
+
"8": {
|
|
925
|
+
"name": "punctuation.definition.parameters.end.stata"
|
|
926
|
+
}
|
|
927
|
+
},
|
|
928
|
+
"comment": "color regexm with compound quotes",
|
|
929
|
+
"match": "\\b(regexm)(\\()([^,]+)(,)\\s*(`\")([^\"]+)(\"')\\s*(\\))"
|
|
930
|
+
},
|
|
931
|
+
{
|
|
932
|
+
"captures": {
|
|
933
|
+
"1": {
|
|
934
|
+
"name": "support.function.builtin.stata"
|
|
935
|
+
},
|
|
936
|
+
"10": {
|
|
937
|
+
"name": "punctuation.definition.parameters.end.stata"
|
|
938
|
+
},
|
|
939
|
+
"2": {
|
|
940
|
+
"name": "punctuation.definition.parameters.begin.stata"
|
|
941
|
+
},
|
|
942
|
+
"3": {
|
|
943
|
+
"patterns": [
|
|
944
|
+
{
|
|
945
|
+
"include": "#string-compound"
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
"include": "#string-regular"
|
|
949
|
+
},
|
|
950
|
+
{
|
|
951
|
+
"include": "#macro-local"
|
|
952
|
+
},
|
|
953
|
+
{
|
|
954
|
+
"include": "#macro-global"
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
"include": "#functions"
|
|
958
|
+
},
|
|
959
|
+
{
|
|
960
|
+
"match": "[\\w&&[^0-9]]\\w{0,31}",
|
|
961
|
+
"name": "variable.parameter.function.stata"
|
|
962
|
+
},
|
|
963
|
+
{
|
|
964
|
+
"include": "#comments"
|
|
965
|
+
}
|
|
966
|
+
]
|
|
967
|
+
},
|
|
968
|
+
"4": {
|
|
969
|
+
"name": "punctuation.definition.variable.begin.stata"
|
|
970
|
+
},
|
|
971
|
+
"5": {
|
|
972
|
+
"name": "punctuation.definition.string.begin.stata"
|
|
973
|
+
},
|
|
974
|
+
"6": {
|
|
975
|
+
"patterns": [
|
|
976
|
+
{
|
|
977
|
+
"include": "#ascii-regex-internals"
|
|
978
|
+
}
|
|
979
|
+
]
|
|
980
|
+
},
|
|
981
|
+
"7": {
|
|
982
|
+
"name": "punctuation.definition.string.end.stata"
|
|
983
|
+
},
|
|
984
|
+
"8": {
|
|
985
|
+
"name": "invalid.illegal.punctuation.stata"
|
|
986
|
+
},
|
|
987
|
+
"9": {
|
|
988
|
+
"patterns": [
|
|
989
|
+
{
|
|
990
|
+
"match": ",",
|
|
991
|
+
"name": "punctuation.definition.variable.begin.stata"
|
|
992
|
+
},
|
|
993
|
+
{
|
|
994
|
+
"include": "#string-compound"
|
|
995
|
+
},
|
|
996
|
+
{
|
|
997
|
+
"include": "#string-regular"
|
|
998
|
+
},
|
|
999
|
+
{
|
|
1000
|
+
"include": "#macro-local"
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
"include": "#macro-global"
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
"include": "#functions"
|
|
1007
|
+
},
|
|
1008
|
+
{
|
|
1009
|
+
"match": "[\\w&&[^0-9]]\\w{0,31}",
|
|
1010
|
+
"name": "variable.parameter.function.stata"
|
|
1011
|
+
},
|
|
1012
|
+
{
|
|
1013
|
+
"include": "#comments-triple-slash"
|
|
1014
|
+
}
|
|
1015
|
+
]
|
|
1016
|
+
}
|
|
1017
|
+
},
|
|
1018
|
+
"comment": "color regexr with regular quotes i.e. \" ",
|
|
1019
|
+
"match": "\\b(regexr)(\\()([^,]+)(,)\\s*(\")([^\"]+)(\"(')?)\\s*([^\\)]*)(\\))"
|
|
1020
|
+
},
|
|
1021
|
+
{
|
|
1022
|
+
"captures": {
|
|
1023
|
+
"1": {
|
|
1024
|
+
"name": "support.function.builtin.stata"
|
|
1025
|
+
},
|
|
1026
|
+
"2": {
|
|
1027
|
+
"name": "punctuation.definition.parameters.begin.stata"
|
|
1028
|
+
},
|
|
1029
|
+
"3": {
|
|
1030
|
+
"patterns": [
|
|
1031
|
+
{
|
|
1032
|
+
"include": "#string-compound"
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
"include": "#string-regular"
|
|
1036
|
+
},
|
|
1037
|
+
{
|
|
1038
|
+
"include": "#macro-local"
|
|
1039
|
+
},
|
|
1040
|
+
{
|
|
1041
|
+
"include": "#macro-global"
|
|
1042
|
+
},
|
|
1043
|
+
{
|
|
1044
|
+
"include": "#functions"
|
|
1045
|
+
},
|
|
1046
|
+
{
|
|
1047
|
+
"match": "[\\w&&[^0-9]]\\w{0,31}",
|
|
1048
|
+
"name": "variable.parameter.function.stata"
|
|
1049
|
+
},
|
|
1050
|
+
{
|
|
1051
|
+
"include": "#comments"
|
|
1052
|
+
}
|
|
1053
|
+
]
|
|
1054
|
+
},
|
|
1055
|
+
"4": {
|
|
1056
|
+
"name": "punctuation.definition.variable.begin.stata"
|
|
1057
|
+
},
|
|
1058
|
+
"5": {
|
|
1059
|
+
"name": "punctuation.definition.string.begin.stata"
|
|
1060
|
+
},
|
|
1061
|
+
"6": {
|
|
1062
|
+
"patterns": [
|
|
1063
|
+
{
|
|
1064
|
+
"include": "#ascii-regex-internals"
|
|
1065
|
+
}
|
|
1066
|
+
]
|
|
1067
|
+
},
|
|
1068
|
+
"7": {
|
|
1069
|
+
"name": "punctuation.definition.string.end.stata"
|
|
1070
|
+
},
|
|
1071
|
+
"8": {
|
|
1072
|
+
"patterns": [
|
|
1073
|
+
{
|
|
1074
|
+
"match": ",",
|
|
1075
|
+
"name": "punctuation.definition.variable.begin.stata"
|
|
1076
|
+
},
|
|
1077
|
+
{
|
|
1078
|
+
"include": "#string-compound"
|
|
1079
|
+
},
|
|
1080
|
+
{
|
|
1081
|
+
"include": "#string-regular"
|
|
1082
|
+
},
|
|
1083
|
+
{
|
|
1084
|
+
"include": "#macro-local"
|
|
1085
|
+
},
|
|
1086
|
+
{
|
|
1087
|
+
"include": "#macro-global"
|
|
1088
|
+
},
|
|
1089
|
+
{
|
|
1090
|
+
"include": "#functions"
|
|
1091
|
+
},
|
|
1092
|
+
{
|
|
1093
|
+
"match": "[\\w&&[^0-9]]\\w{0,31}",
|
|
1094
|
+
"name": "variable.parameter.function.stata"
|
|
1095
|
+
},
|
|
1096
|
+
{
|
|
1097
|
+
"include": "#comments-triple-slash"
|
|
1098
|
+
}
|
|
1099
|
+
]
|
|
1100
|
+
},
|
|
1101
|
+
"9": {
|
|
1102
|
+
"name": "punctuation.definition.parameters.end.stata"
|
|
1103
|
+
}
|
|
1104
|
+
},
|
|
1105
|
+
"comment": "color regexr with compound quotes i.e. `\"text\"' ",
|
|
1106
|
+
"match": "\\b(regexr)(\\()([^,]+)(,)\\s*(`\")([^\"]+)(\"')\\s*([^\\)]*)(\\))"
|
|
1107
|
+
}
|
|
1108
|
+
]
|
|
1109
|
+
},
|
|
1110
|
+
"ascii-regex-internals": {
|
|
1111
|
+
"patterns": [
|
|
1112
|
+
{
|
|
1113
|
+
"match": "\\^",
|
|
1114
|
+
"name": "keyword.control.anchor.stata"
|
|
1115
|
+
},
|
|
1116
|
+
{
|
|
1117
|
+
"comment": "matched when not a global, but must be ascii",
|
|
1118
|
+
"match": "\\$(?![a-zA-Z_\\{])",
|
|
1119
|
+
"name": "keyword.control.anchor.stata"
|
|
1120
|
+
},
|
|
1121
|
+
{
|
|
1122
|
+
"match": "[\\?\\+\\*]",
|
|
1123
|
+
"name": "keyword.control.quantifier.stata"
|
|
1124
|
+
},
|
|
1125
|
+
{
|
|
1126
|
+
"match": "\\|",
|
|
1127
|
+
"name": "keyword.control.or.stata"
|
|
1128
|
+
},
|
|
1129
|
+
{
|
|
1130
|
+
"begin": "(\\()(?=\\?|\\*|\\+)",
|
|
1131
|
+
"beginCaptures": {
|
|
1132
|
+
"1": {
|
|
1133
|
+
"name": "keyword.operator.group.stata"
|
|
1134
|
+
}
|
|
1135
|
+
},
|
|
1136
|
+
"contentName": "invalid.illegal.regexm.stata",
|
|
1137
|
+
"end": "\\)",
|
|
1138
|
+
"endCaptures": {
|
|
1139
|
+
"0": {
|
|
1140
|
+
"name": "keyword.operator.group.stata"
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
},
|
|
1144
|
+
{
|
|
1145
|
+
"begin": "(\\()",
|
|
1146
|
+
"beginCaptures": {
|
|
1147
|
+
"1": {
|
|
1148
|
+
"name": "keyword.operator.group.stata"
|
|
1149
|
+
}
|
|
1150
|
+
},
|
|
1151
|
+
"end": "(\\))",
|
|
1152
|
+
"endCaptures": {
|
|
1153
|
+
"1": {
|
|
1154
|
+
"name": "keyword.operator.group.stata"
|
|
1155
|
+
}
|
|
1156
|
+
},
|
|
1157
|
+
"patterns": [
|
|
1158
|
+
{
|
|
1159
|
+
"include": "#ascii-regex-internals"
|
|
1160
|
+
}
|
|
1161
|
+
]
|
|
1162
|
+
},
|
|
1163
|
+
{
|
|
1164
|
+
"include": "#ascii-regex-character-class"
|
|
1165
|
+
},
|
|
1166
|
+
{
|
|
1167
|
+
"include": "#macro-local"
|
|
1168
|
+
},
|
|
1169
|
+
{
|
|
1170
|
+
"include": "#macro-global"
|
|
1171
|
+
},
|
|
1172
|
+
{
|
|
1173
|
+
"comment": "NOTE: Error if I have .+ No idea why but it works fine it seems with just .",
|
|
1174
|
+
"match": ".",
|
|
1175
|
+
"name": "string.quoted.stata"
|
|
1176
|
+
}
|
|
1177
|
+
]
|
|
1178
|
+
},
|
|
1179
|
+
"braces-with-error": {
|
|
1180
|
+
"patterns": [
|
|
1181
|
+
{
|
|
1182
|
+
"begin": "(\\{)\\s*([^\\n]*)(?=\\n)",
|
|
1183
|
+
"beginCaptures": {
|
|
1184
|
+
"1": {
|
|
1185
|
+
"name": "keyword.control.block.begin.stata"
|
|
1186
|
+
},
|
|
1187
|
+
"2": {
|
|
1188
|
+
"patterns": [
|
|
1189
|
+
{
|
|
1190
|
+
"include": "#comments"
|
|
1191
|
+
},
|
|
1192
|
+
{
|
|
1193
|
+
"match": "[^\\n]+",
|
|
1194
|
+
"name": "illegal.invalid.name.stata"
|
|
1195
|
+
}
|
|
1196
|
+
]
|
|
1197
|
+
}
|
|
1198
|
+
},
|
|
1199
|
+
"comment": "correct with nothing else on the line but whitespace; before and after; before; after; correct",
|
|
1200
|
+
"end": "^\\s*(\\})\\s*$|^\\s*([^\\*\"\\}]+)\\s+(\\})\\s*([^\\*\"\\}/\\n]+)|^\\s*([^\"\\*\\}]+)\\s+(\\})|\\s*(\\})\\s*([^\"\\*\\}/\\n]+)|(\\})$",
|
|
1201
|
+
"endCaptures": {
|
|
1202
|
+
"1": {
|
|
1203
|
+
"name": "keyword.control.block.end.stata"
|
|
1204
|
+
},
|
|
1205
|
+
"2": {
|
|
1206
|
+
"name": "invalid.illegal.name.stata"
|
|
1207
|
+
},
|
|
1208
|
+
"3": {
|
|
1209
|
+
"name": "keyword.control.block.end.stata"
|
|
1210
|
+
},
|
|
1211
|
+
"4": {
|
|
1212
|
+
"name": "invalid.illegal.name.stata"
|
|
1213
|
+
},
|
|
1214
|
+
"5": {
|
|
1215
|
+
"name": "invalid.illegal.name.stata"
|
|
1216
|
+
},
|
|
1217
|
+
"6": {
|
|
1218
|
+
"name": "keyword.control.block.end.stata"
|
|
1219
|
+
},
|
|
1220
|
+
"7": {
|
|
1221
|
+
"name": "keyword.control.block.end.stata"
|
|
1222
|
+
},
|
|
1223
|
+
"8": {
|
|
1224
|
+
"name": "invalid.illegal.name.stata"
|
|
1225
|
+
},
|
|
1226
|
+
"9": {
|
|
1227
|
+
"name": "keyword.control.block.end.stata"
|
|
1228
|
+
}
|
|
1229
|
+
},
|
|
1230
|
+
"patterns": [
|
|
1231
|
+
{
|
|
1232
|
+
"include": "$self"
|
|
1233
|
+
}
|
|
1234
|
+
]
|
|
1235
|
+
}
|
|
1236
|
+
]
|
|
1237
|
+
},
|
|
1238
|
+
"braces-without-error": {
|
|
1239
|
+
"patterns": [
|
|
1240
|
+
{
|
|
1241
|
+
"begin": "\\{",
|
|
1242
|
+
"beginCaptures": {
|
|
1243
|
+
"0": {
|
|
1244
|
+
"name": "keyword.control.block.begin.stata"
|
|
1245
|
+
}
|
|
1246
|
+
},
|
|
1247
|
+
"end": "\\}",
|
|
1248
|
+
"endCaptures": {
|
|
1249
|
+
"0": {
|
|
1250
|
+
"name": "keyword.control.block.end.stata"
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
]
|
|
1255
|
+
},
|
|
1256
|
+
"builtin_types": {
|
|
1257
|
+
"patterns": [
|
|
1258
|
+
{
|
|
1259
|
+
"match": "\\b(byte|int|long|float|double|str[1-9]?[0-9]?[0-9]?[0-9]?|strL)\\b",
|
|
1260
|
+
"name": "support.type.stata"
|
|
1261
|
+
}
|
|
1262
|
+
]
|
|
1263
|
+
},
|
|
1264
|
+
"builtin_variables": {
|
|
1265
|
+
"patterns": [
|
|
1266
|
+
{
|
|
1267
|
+
"match": "\\b(_b|_coef|_cons|_n|_N|_rc|_se)\\b",
|
|
1268
|
+
"name": "variable.object.stata"
|
|
1269
|
+
}
|
|
1270
|
+
]
|
|
1271
|
+
},
|
|
1272
|
+
"commands-other": {
|
|
1273
|
+
"patterns": [
|
|
1274
|
+
{
|
|
1275
|
+
"comment": "Add on commands",
|
|
1276
|
+
"match": "\\b(reghdfe|ivreghdfe|ivreg2|outreg|gcollapse|gcontract|gegen|gisid|glevelsof|gquantiles)\\b",
|
|
1277
|
+
"name": "keyword.control.flow.stata"
|
|
1278
|
+
},
|
|
1279
|
+
{
|
|
1280
|
+
"comment": "Built in commands",
|
|
1281
|
+
"match": "\\b(about|ac|acprplot|ado|adopath|adoupdate|alpha|ameans|an|ano|anov|anova|anova_terms|anovadef|aorder|ap|app|appe|appen|append|arch|arch_dr|arch_estat|arch_p|archlm|areg|areg_p|args|arima|arima_dr|arima_estat|arima_p|asmprobit|asmprobit_estat|asmprobit_lf|asmprobit_mfx__dlg|asmprobit_p|avplot|avplots|bcskew0|bgodfrey|binreg|bip0_lf|biplot|bipp_lf|bipr_lf|bipr_p|biprobit|bitest|bitesti|bitowt|blogit|bmemsize|boot|bootsamp|boxco_l|boxco_p|boxcox|boxcox_p|bprobit|br|break|brier|bro|brow|brows|browse|brr|brrstat|bs|bsampl_w|bsample|bsqreg|bstat|bstrap|ca|ca_estat|ca_p|cabiplot|camat|canon|canon_estat|canon_p|caprojection|cat|cc|cchart|cci|cd|censobs_table|centile|cf|char|chdir|checkdlgfiles|checkestimationsample|checkhlpfiles|checksum|chelp|ci|cii|cl|class|classutil|clear|cli|clis|clist|clog|clog_lf|clog_p|clogi|clogi_sw|clogit|clogit_lf|clogit_p|clogitp|clogl_sw|cloglog|clonevar|clslistarray|cluster|cluster_measures|cluster_stop|cluster_tree|cluster_tree_8|clustermat|cmdlog|cnr|cnre|cnreg|cnreg_p|cnreg_sw|cnsreg|codebook|collaps4|collapse|colormult_nb|colormult_nw|compare|compress|conf|confi|confir|confirm|conren|cons|const|constr|constra|constrai|constrain|constraint|contract|copy|copyright|copysource|cor|corc|corr|corr2data|corr_anti|corr_kmo|corr_smc|corre|correl|correla|correlat|correlate|corrgram|cou|coun|count|cprplot|crc|cret|cretu|cretur|creturn|cross|cs|cscript|cscript_log|csi|ct|ct_is|ctset|ctst_st|cttost|cumsp|cumul|cusum|cutil|d|datasig|datasign|datasigna|datasignat|datasignatu|datasignatur|datasignature|datetof|db|dbeta|de|dec|deco|decod|decode|deff|des|desc|descr|descri|describ|describe|dfbeta|dfgls|dfuller|di|di_g|dir|dirstats|dis|discard|disp|disp_res|disp_s|displ|displa|display|do|doe|doed|doedi|doedit|dotplot|dprobit|drawnorm|ds|ds_util|dstdize|duplicates|durbina|dwstat|dydx|ed|edi|edit|eivreg|emdef|en|enc|enco|encod|encode|eq|erase|ereg|ereg_lf|ereg_p|ereg_sw|ereghet|ereghet_glf|ereghet_glf_sh|ereghet_gp|ereghet_ilf|ereghet_ilf_sh|ereghet_ip|eret|eretu|eretur|ereturn|err|erro|error|est|est_cfexist|est_cfname|est_clickable|est_expand|est_hold|est_table|est_unhold|est_unholdok|estat|estat_default|estat_summ|estat_vce_only|esti|estimates|etodow|etof|etomdy|expand|expandcl|fac|fact|facto|factor|factor_estat|factor_p|factor_pca_rotated|factor_rotate|factormat|fcast|fcast_compute|fcast_graph|fdades|fdadesc|fdadescr|fdadescri|fdadescrib|fdadescribe|fdasav|fdasave|fdause|fh_st|file|filefilter|fillin|find_hlp_file|findfile|findit|fit|fl|fli|flis|flist|fpredict|frac_adj|frac_chk|frac_cox|frac_ddp|frac_dis|frac_dv|frac_in|frac_mun|frac_pp|frac_pq|frac_pv|frac_wgt|frac_xo|fracgen|fracplot|fracpoly|fracpred|fron_ex|fron_hn|fron_p|fron_tn|fron_tn2|frontier|ftodate|ftoe|ftomdy|ftowdate|gamhet_glf|gamhet_gp|gamhet_ilf|gamhet_ip|gamma|gamma_d2|gamma_p|gamma_sw|gammahet|gdi_hexagon|gdi_spokes|genrank|genstd|genvmean|gettoken|gladder|glim_l01|glim_l02|glim_l03|glim_l04|glim_l05|glim_l06|glim_l07|glim_l08|glim_l09|glim_l10|glim_l11|glim_l12|glim_lf|glim_mu|glim_nw1|glim_nw2|glim_nw3|glim_p|glim_v1|glim_v2|glim_v3|glim_v4|glim_v5|glim_v6|glim_v7|glm|glm_p|glm_sw|glmpred|glogit|glogit_p|gmeans|gnbre_lf|gnbreg|gnbreg_p|gomp_lf|gompe_sw|gomper_p|gompertz|gompertzhet|gomphet_glf|gomphet_glf_sh|gomphet_gp|gomphet_ilf|gomphet_ilf_sh|gomphet_ip|gphdot|gphpen|gphprint|gprefs|gprobi_p|gprobit|gr|gr7|gr_copy|gr_current|gr_db|gr_describe|gr_dir|gr_draw|gr_draw_replay|gr_drop|gr_edit|gr_editviewopts|gr_example|gr_example2|gr_export|gr_print|gr_qscheme|gr_query|gr_read|gr_rename|gr_replay|gr_save|gr_set|gr_setscheme|gr_table|gr_undo|gr_use|graph|grebar|greigen|grmeanby|gs_fileinfo|gs_filetype|gs_graphinfo|gs_stat|gsort|gwood|h|hareg|hausman|haver|he|heck_d2|heckma_p|heckman|heckp_lf|heckpr_p|heckprob|hel|help|hereg|hetpr_lf|hetpr_p|hetprob|hettest|hexdump|hilite|hist|histogram|hlogit|hlu|hmeans|hotel|hotelling|hprobit|hreg|hsearch|icd9|icd9_ff|icd9p|iis|impute|imtest|inbase|include|inf|infi|infil|infile|infix|inp|inpu|input|ins|insheet|insp|inspe|inspec|inspect|integ|inten|intreg|intreg_p|intrg2_ll|intrg_ll|intrg_ll2|ipolate|iqreg|ir|irf|irf_create|irfm|iri|is_svy|is_svysum|isid|istdize|ivprobit|ivprobit_p|ivreg|ivreg_footnote|ivtob_lf|ivtobit|ivtobit_p|jacknife|jknife|jkstat|joinby|kalarma1|kap|kapmeier|kappa|kapwgt|kdensity|ksm|ksmirnov|ktau|kwallis|labelbook|ladder|levelsof|leverage|lfit|lfit_p|li|lincom|line|linktest|lis|list|lloghet_glf|lloghet_glf_sh|lloghet_gp|lloghet_ilf|lloghet_ilf_sh|lloghet_ip|llogi_sw|llogis_p|llogist|llogistic|llogistichet|lnorm_lf|lnorm_sw|lnorma_p|lnormal|lnormalhet|lnormhet_glf|lnormhet_glf_sh|lnormhet_gp|lnormhet_ilf|lnormhet_ilf_sh|lnormhet_ip|lnskew0|loadingplot|(?<!\\.)log|logi|logis_lf|logistic|logistic_p|logit|logit_estat|logit_p|loglogs|logrank|loneway|lookfor|lookup|lowess|lpredict|lrecomp|lroc|lrtest|ls|lsens|lsens_x|lstat|ltable|ltriang|lv|lvr2plot|m|ma|mac|macr|macro|makecns|man|manova|manovatest|mantel|mark|markin|markout|marksample|mat|mat_capp|mat_order|mat_put_rr|mat_rapp|mata|mata_clear|mata_describe|mata_drop|mata_matdescribe|mata_matsave|mata_matuse|mata_memory|mata_mlib|mata_mosave|mata_rename|mata_which|matalabel|matcproc|matlist|matname|matr|matri|matrix|matrix_input__dlg|matstrik|mcc|mcci|md0_|md1_|md1debug_|md2_|md2debug_|mds|mds_estat|mds_p|mdsconfig|mdslong|mdsmat|mdsshepard|mdytoe|mdytof|me_derd|mean|means|median|memory|memsize|mfp|mfx|mhelp|mhodds|minbound|mixed_ll|mixed_ll_reparm|mkassert|mkdir|mkmat|mkspline|ml|ml_adjs|ml_bhhhs|ml_c_d|ml_check|ml_clear|ml_cnt|ml_debug|ml_defd|ml_e0|ml_e0_bfgs|ml_e0_cycle|ml_e0_dfp|ml_e0i|ml_e1|ml_e1_bfgs|ml_e1_bhhh|ml_e1_cycle|ml_e1_dfp|ml_e2|ml_e2_cycle|ml_ebfg0|ml_ebfr0|ml_ebfr1|ml_ebh0q|ml_ebhh0|ml_ebhr0|ml_ebr0i|ml_ecr0i|ml_edfp0|ml_edfr0|ml_edfr1|ml_edr0i|ml_eds|ml_eer0i|ml_egr0i|ml_elf|ml_elf_bfgs|ml_elf_bhhh|ml_elf_cycle|ml_elf_dfp|ml_elfi|ml_elfs|ml_enr0i|ml_enrr0|ml_erdu0|ml_erdu0_bfgs|ml_erdu0_bhhh|ml_erdu0_bhhhq|ml_erdu0_cycle|ml_erdu0_dfp|ml_erdu0_nrbfgs|ml_exde|ml_footnote|ml_geqnr|ml_grad0|ml_graph|ml_hbhhh|ml_hd0|ml_hold|ml_init|ml_inv|ml_log|ml_max|ml_mlout|ml_mlout_8|ml_model|ml_nb0|ml_opt|ml_p|ml_plot|ml_query|ml_rdgrd|ml_repor|ml_s_e|ml_score|ml_searc|ml_technique|ml_unhold|mleval|mlf_|mlmatbysum|mlmatsum|mlog|mlogi|mlogit|mlogit_footnote|mlogit_p|mlopts|mlsum|mlvecsum|mnl0_|mor|more|mov|move|mprobit|mprobit_lf|mprobit_p|mrdu0_|mrdu1_|mvdecode|mvencode|mvreg|mvreg_estat|nbreg|nbreg_al|nbreg_lf|nbreg_p|nbreg_sw|nestreg|net|newey|newey_p|news|nl|nlcom|nlcom_p|nlexp2|nlexp2a|nlexp3|nlgom3|nlgom4|nlinit|nllog3|nllog4|nlog_rd|nlogit|nlogit_p|nlogitgen|nlogittree|nlpred|nobreak|notes_dlg|nptrend|numlabel|numlist|old_ver|olo|olog|ologi|ologi_sw|ologit|ologit_p|ologitp|on|one|onew|onewa|oneway|op_colnm|op_comp|op_diff|op_inv|op_str|opr|opro|oprob|oprob_sw|oprobi|oprobi_p|oprobit|oprobitp|opts_exclusive|order|orthog|orthpoly|ou|out|outf|outfi|outfil|outfile|outs|outsh|outshe|outshee|outsheet|ovtest|pac|palette|parse_dissim|pause|pca|pca_display|pca_estat|pca_p|pca_rotate|pcamat|pchart|pchi|pcorr|pctile|pentium|pergram|personal|peto_st|pkcollapse|pkcross|pkequiv|pkexamine|pkshape|pksumm|plugin|pnorm|poisgof|poiss_lf|poiss_sw|poisso_p|poisson|poisson_estat|post|postclose|postfile|postutil|pperron|prais|prais_e|prais_e2|prais_p|predict|predictnl|preserve|print|prob|probi|probit|probit_estat|probit_p|proc_time|procoverlay|procrustes|procrustes_estat|procrustes_p|profiler|prop|proportion|prtest|prtesti|pwcorr|pwd|qs|qby|qbys|qchi|qladder|qnorm|qqplot|qreg|qreg_c|qreg_p|qreg_sw|qu|quadchk|quantile|que|quer|query|range|ranksum|ratio|rchart|rcof|recast|recode|reg|reg3|reg3_p|regdw|regr|regre|regre_p2|regres|regres_p|regress|regress_estat|regriv_p|remap|ren|rena|renam|rename|renpfix|repeat|reshape|restore|ret|retu|retur|return|rmdir|robvar|roccomp|rocf_lf|rocfit|rocgold|rocplot|roctab|rologit|rologit_p|rot|rota|rotat|rotate|rotatemat|rreg|rreg_p|ru|run|runtest|rvfplot|rvpplot|safesum|sample|sampsi|savedresults|sc|scatter|scm_mine|sco|scob_lf|scob_p|scobi_sw|scobit|scor|score|scoreplot|scoreplot_help|scree|screeplot|screeplot_help|sdtest|sdtesti|se|search|separate|seperate|serrbar|serset|set|set_defaults|sfrancia|sh|she|shel|shell|shewhart|signestimationsample|signrank|signtest|simul|sktest|sleep|slogit|slogit_d2|slogit_p|smooth|snapspan|so|sor|sort|spearman|spikeplot|spikeplt|spline_x|split|sqreg|sqreg_p|sret|sretu|sretur|sreturn|ssc|st|st_ct|st_hc|st_hcd|st_hcd_sh|st_is|st_issys|st_note|st_promo|st_set|st_show|st_smpl|st_subid|stack|stbase|stci|stcox|stcox_estat|stcox_fr|stcox_fr_ll|stcox_p|stcox_sw|stcoxkm|stcstat|stcurv|stcurve|stdes|stem|stepwise|stfill|stgen|stir|stjoin|stmc|stmh|stphplot|stphtest|stptime|strate|streg|streg_sw|streset|sts|stset|stsplit|stsum|sttocc|sttoct|stvary|su|suest|sum|summ|summa|summar|summari|summariz|summarize|sunflower|sureg|survcurv|survsum|svar|svar_p|svmat|svy_disp|svy_dreg|svy_est|svy_est_7|svy_estat|svy_get|svy_gnbreg_p|svy_head|svy_header|svy_heckman_p|svy_heckprob_p|svy_intreg_p|svy_ivreg_p|svy_logistic_p|svy_logit_p|svy_mlogit_p|svy_nbreg_p|svy_ologit_p|svy_oprobit_p|svy_poisson_p|svy_probit_p|svy_regress_p|svy_sub|svy_sub_7|svy_x|svy_x_7|svy_x_p|svydes|svygen|svygnbreg|svyheckman|svyheckprob|svyintreg|svyintrg|svyivreg|svylc|svylog_p|svylogit|svymarkout|svymean|svymlog|svymlogit|svynbreg|svyolog|svyologit|svyoprob|svyoprobit|svyopts|svypois|svypoisson|svyprobit|svyprobt|svyprop|svyratio|svyreg|svyreg_p|svyregress|svyset|svytab|svytest|svytotal|sw|swilk|symmetry|symmi|symplot|sysdescribe|sysdir|sysuse|szroeter|ta|tab|tab1|tab2|tab_or|tabd|tabdi|tabdis|tabdisp|tabi|table|tabodds|tabstat|tabu|tabul|tabula|tabulat|tabulate|te|tes|test|testnl|testparm|teststd|tetrachoric|time_it|timer|tis|tob|tobi|tobit|tobit_p|tobit_sw|token|tokeni|tokeniz|tokenize|total|translate|translator|transmap|treat_ll|treatr_p|treatreg|trim|trnb_cons|trnb_mean|trpoiss_d2|trunc_ll|truncr_p|truncreg|tsappend|tset|tsfill|tsline|tsline_ex|tsreport|tsrevar|tsrline|tsset|tssmooth|tsunab|ttest|ttesti|tut_chk|tut_wait|tutorial|tw|tware_st|two|twoway|twoway__fpfit_serset|twoway__function_gen|twoway__histogram_gen|twoway__ipoint_serset|twoway__ipoints_serset|twoway__kdensity_gen|twoway__lfit_serset|twoway__normgen_gen|twoway__pci_serset|twoway__qfit_serset|twoway__scatteri_serset|twoway__sunflower_gen|twoway_ksm_serset|ty|typ|type|typeof|unab|unabbrev|unabcmd|update|uselabel|var|var_mkcompanion|var_p|varbasic|varfcast|vargranger|varirf|varirf_add|varirf_cgraph|varirf_create|varirf_ctable|varirf_describe|varirf_dir|varirf_drop|varirf_erase|varirf_graph|varirf_ograph|varirf_rename|varirf_set|varirf_table|varlmar|varnorm|varsoc|varstable|varstable_w|varstable_w2|varwle|vec|vec_fevd|vec_mkphi|vec_p|vec_p_w|vecirf_create|veclmar|veclmar_w|vecnorm|vecnorm_w|vecrank|vecstable|verinst|vers|versi|versio|version|view|viewsource|vif|vwls|wdatetof|webdescribe|webseek|webuse|wh|whelp|whi|which|wilc_st|wilcoxon|win|wind|windo|window|winexec|wntestb|wntestq|xchart|xcorr|xi|xmlsav|xmlsave|xmluse|xpose|xsh|xshe|xshel|xshell|xt_iis|xt_tis|xtab_p|xtabond|xtbin_p|xtclog|xtcloglog|xtcloglog_d2|xtcloglog_pa_p|xtcloglog_re_p|xtcnt_p|xtcorr|xtdata|xtdes|xtfront_p|xtfrontier|xtgee|xtgee_elink|xtgee_estat|xtgee_makeivar|xtgee_p|xtgee_plink|xtgls|xtgls_p|xthaus|xthausman|xtht_p|xthtaylor|xtile|xtint_p|xtintreg|xtintreg_d2|xtintreg_p|xtivreg|xtline|xtline_ex|xtlogit|xtlogit_d2|xtlogit_fe_p|xtlogit_pa_p|xtlogit_re_p|xtmixed|xtmixed_estat|xtmixed_p|xtnb_fe|xtnb_lf|xtnbreg|xtnbreg_pa_p|xtnbreg_refe_p|xtpcse|xtpcse_p|xtpois|xtpoisson|xtpoisson_d2|xtpoisson_pa_p|xtpoisson_refe_p|xtpred|xtprobit|xtprobit_d2|xtprobit_re_p|xtps_fe|xtps_lf|xtps_ren|xtps_ren_8|xtrar_p|xtrc|xtrc_p|xtrchh|xtrefe_p|yx|yxview__barlike_draw|yxview_area_draw|yxview_bar_draw|yxview_dot_draw|yxview_dropline_draw|yxview_function_draw|yxview_iarrow_draw|yxview_ilabels_draw|yxview_normal_draw|yxview_pcarrow_draw|yxview_pcbarrow_draw|yxview_pccapsym_draw|yxview_pcscatter_draw|yxview_pcspike_draw|yxview_rarea_draw|yxview_rbar_draw|yxview_rbarm_draw|yxview_rcap_draw|yxview_rcapsym_draw|yxview_rconnected_draw|yxview_rline_draw|yxview_rscatter_draw|yxview_rspike_draw|yxview_spike_draw|yxview_sunflower_draw|zap_s|zinb|zinb_llf|zinb_plf|zip|zip_llf|zip_p|zip_plf|zt_ct_5|zt_hc_5|zt_hcd_5|zt_is_5|zt_iss_5|zt_sho_5|zt_smp_5|ztnb|ztnb_p|ztp|ztp_p|prtab|prchange|eststo|estout|esttab|estadd|estpost|ivregress|xtreg|xtreg_be|xtreg_fe|xtreg_ml|xtreg_pa_p|xtreg_re|xtregar|xtrere_p|xtset|xtsf_ll|xtsf_llti|xtsum|xttab|xttest0|xttobit|xttobit_p|xttrans)\\b",
|
|
1282
|
+
"name": "keyword.control.flow.stata"
|
|
1283
|
+
}
|
|
1284
|
+
]
|
|
1285
|
+
},
|
|
1286
|
+
"comments": {
|
|
1287
|
+
"patterns": [
|
|
1288
|
+
{
|
|
1289
|
+
"include": "#comments-double-slash"
|
|
1290
|
+
},
|
|
1291
|
+
{
|
|
1292
|
+
"include": "#comments-star"
|
|
1293
|
+
},
|
|
1294
|
+
{
|
|
1295
|
+
"include": "#comments-block"
|
|
1296
|
+
},
|
|
1297
|
+
{
|
|
1298
|
+
"include": "#comments-triple-slash"
|
|
1299
|
+
}
|
|
1300
|
+
]
|
|
1301
|
+
},
|
|
1302
|
+
"comments-block": {
|
|
1303
|
+
"patterns": [
|
|
1304
|
+
{
|
|
1305
|
+
"begin": "/\\*",
|
|
1306
|
+
"beginCaptures": {
|
|
1307
|
+
"0": {
|
|
1308
|
+
"name": "punctuation.definition.comment.begin.stata"
|
|
1309
|
+
}
|
|
1310
|
+
},
|
|
1311
|
+
"end": "(\\*/\\s+\\*[^\\n]*)|(\\*/(?!\\*))",
|
|
1312
|
+
"endCaptures": {
|
|
1313
|
+
"0": {
|
|
1314
|
+
"name": "punctuation.definition.comment.end.stata"
|
|
1315
|
+
}
|
|
1316
|
+
},
|
|
1317
|
+
"name": "comment.block.stata",
|
|
1318
|
+
"patterns": [
|
|
1319
|
+
{
|
|
1320
|
+
"comment": "this ends and restarts a comment block. but need to catch this so that it doesn't start _another_ level of comment blocks",
|
|
1321
|
+
"match": "\\*/\\*"
|
|
1322
|
+
},
|
|
1323
|
+
{
|
|
1324
|
+
"include": "#docblockr-comment"
|
|
1325
|
+
},
|
|
1326
|
+
{
|
|
1327
|
+
"include": "#comments-block"
|
|
1328
|
+
},
|
|
1329
|
+
{
|
|
1330
|
+
"include": "#docstring"
|
|
1331
|
+
}
|
|
1332
|
+
]
|
|
1333
|
+
}
|
|
1334
|
+
]
|
|
1335
|
+
},
|
|
1336
|
+
"comments-double-slash": {
|
|
1337
|
+
"patterns": [
|
|
1338
|
+
{
|
|
1339
|
+
"begin": "(^//|(?<=\\s)//)(?!/)",
|
|
1340
|
+
"captures": {
|
|
1341
|
+
"0": {
|
|
1342
|
+
"name": "punctuation.definition.comment.stata"
|
|
1343
|
+
}
|
|
1344
|
+
},
|
|
1345
|
+
"end": "(?=\\n)",
|
|
1346
|
+
"name": "comment.line.double-slash.stata",
|
|
1347
|
+
"patterns": [
|
|
1348
|
+
{
|
|
1349
|
+
"include": "#docblockr-comment"
|
|
1350
|
+
}
|
|
1351
|
+
]
|
|
1352
|
+
}
|
|
1353
|
+
]
|
|
1354
|
+
},
|
|
1355
|
+
"comments-star": {
|
|
1356
|
+
"patterns": [
|
|
1357
|
+
{
|
|
1358
|
+
"begin": "^\\s*(\\*)",
|
|
1359
|
+
"captures": {
|
|
1360
|
+
"0": {
|
|
1361
|
+
"name": "punctuation.definition.comment.stata"
|
|
1362
|
+
}
|
|
1363
|
+
},
|
|
1364
|
+
"comment": "TODO! need to except out the occasion that a * comes after a /// on the previous line. May be easiest to join with the comment.line.triple-slash.stata below",
|
|
1365
|
+
"end": "(?=\\n)",
|
|
1366
|
+
"name": "comment.line.star.stata",
|
|
1367
|
+
"patterns": [
|
|
1368
|
+
{
|
|
1369
|
+
"include": "#docblockr-comment"
|
|
1370
|
+
},
|
|
1371
|
+
{
|
|
1372
|
+
"begin": "///",
|
|
1373
|
+
"end": "\\n",
|
|
1374
|
+
"name": "comment.line-continuation.stata"
|
|
1375
|
+
},
|
|
1376
|
+
{
|
|
1377
|
+
"include": "#comments"
|
|
1378
|
+
}
|
|
1379
|
+
]
|
|
1380
|
+
}
|
|
1381
|
+
]
|
|
1382
|
+
},
|
|
1383
|
+
"comments-triple-slash": {
|
|
1384
|
+
"patterns": [
|
|
1385
|
+
{
|
|
1386
|
+
"begin": "(^///|(?<=\\s)///)",
|
|
1387
|
+
"captures": {
|
|
1388
|
+
"0": {
|
|
1389
|
+
"name": "punctuation.definition.comment.stata"
|
|
1390
|
+
}
|
|
1391
|
+
},
|
|
1392
|
+
"end": "(?=\\n)",
|
|
1393
|
+
"name": "comment.line.triple-slash.stata",
|
|
1394
|
+
"patterns": [
|
|
1395
|
+
{
|
|
1396
|
+
"include": "#docblockr-comment"
|
|
1397
|
+
}
|
|
1398
|
+
]
|
|
1399
|
+
}
|
|
1400
|
+
]
|
|
1401
|
+
},
|
|
1402
|
+
"constants": {
|
|
1403
|
+
"patterns": [
|
|
1404
|
+
{
|
|
1405
|
+
"include": "#factorvariables"
|
|
1406
|
+
},
|
|
1407
|
+
{
|
|
1408
|
+
"match": "\\b(?i:(\\d+\\.\\d*(e[\\-\\+]?\\d+)?))(?=[^a-zA-Z_])",
|
|
1409
|
+
"name": "constant.numeric.float.stata"
|
|
1410
|
+
},
|
|
1411
|
+
{
|
|
1412
|
+
"match": "(?<=[^0-9a-zA-Z_])(?i:(\\.\\d+(e[\\-\\+]?\\d+)?))",
|
|
1413
|
+
"name": "constant.numeric.float.stata"
|
|
1414
|
+
},
|
|
1415
|
+
{
|
|
1416
|
+
"match": "\\b(?i:(\\d+e[\\-\\+]?\\d+))",
|
|
1417
|
+
"name": "constant.numeric.float.stata"
|
|
1418
|
+
},
|
|
1419
|
+
{
|
|
1420
|
+
"match": "\\b(\\d+)\\b",
|
|
1421
|
+
"name": "constant.numeric.integer.decimal.stata"
|
|
1422
|
+
},
|
|
1423
|
+
{
|
|
1424
|
+
"match": "(?<![\\w])(\\.(?![\\./]))(?![\\w])",
|
|
1425
|
+
"name": "constant.language.missing.stata"
|
|
1426
|
+
},
|
|
1427
|
+
{
|
|
1428
|
+
"match": "\\b_all\\b",
|
|
1429
|
+
"name": "constant.language.allvars.stata"
|
|
1430
|
+
}
|
|
1431
|
+
]
|
|
1432
|
+
},
|
|
1433
|
+
"docblockr-comment": {
|
|
1434
|
+
"patterns": [
|
|
1435
|
+
{
|
|
1436
|
+
"captures": {
|
|
1437
|
+
"1": {
|
|
1438
|
+
"name": "invalid.illegal.name.stata"
|
|
1439
|
+
}
|
|
1440
|
+
},
|
|
1441
|
+
"match": "(?<!\\w)(@(error|ERROR|Error))\\b"
|
|
1442
|
+
},
|
|
1443
|
+
{
|
|
1444
|
+
"captures": {
|
|
1445
|
+
"1": {
|
|
1446
|
+
"name": "keyword.docblockr.stata"
|
|
1447
|
+
}
|
|
1448
|
+
},
|
|
1449
|
+
"match": "(?<!\\w)(@\\w+)\\b"
|
|
1450
|
+
}
|
|
1451
|
+
]
|
|
1452
|
+
},
|
|
1453
|
+
"docstring": {
|
|
1454
|
+
"patterns": [
|
|
1455
|
+
{
|
|
1456
|
+
"begin": "'''",
|
|
1457
|
+
"beginCaptures": {
|
|
1458
|
+
"0": {
|
|
1459
|
+
"name": "punctuation.definition.string.begin.stata"
|
|
1460
|
+
}
|
|
1461
|
+
},
|
|
1462
|
+
"end": "'''",
|
|
1463
|
+
"endCaptures": {
|
|
1464
|
+
"0": {
|
|
1465
|
+
"name": "punctuation.definition.string.begin.stata"
|
|
1466
|
+
}
|
|
1467
|
+
},
|
|
1468
|
+
"name": "string.quoted.docstring.stata"
|
|
1469
|
+
},
|
|
1470
|
+
{
|
|
1471
|
+
"begin": "\"\"\"",
|
|
1472
|
+
"beginCaptures": {
|
|
1473
|
+
"0": {
|
|
1474
|
+
"name": "punctuation.definition.string.begin.stata"
|
|
1475
|
+
}
|
|
1476
|
+
},
|
|
1477
|
+
"end": "\"\"\"",
|
|
1478
|
+
"endCaptures": {
|
|
1479
|
+
"0": {
|
|
1480
|
+
"name": "punctuation.definition.string.begin.stata"
|
|
1481
|
+
}
|
|
1482
|
+
},
|
|
1483
|
+
"name": "string.quoted.docstring.stata"
|
|
1484
|
+
}
|
|
1485
|
+
]
|
|
1486
|
+
},
|
|
1487
|
+
"factorvariables": {
|
|
1488
|
+
"patterns": [
|
|
1489
|
+
{
|
|
1490
|
+
"match": "\\b(i|c|o)\\.(?=[\\w&&[^0-9]]|\\([\\w&&[^0-9]])",
|
|
1491
|
+
"name": "constant.language.factorvars.stata"
|
|
1492
|
+
},
|
|
1493
|
+
{
|
|
1494
|
+
"captures": {
|
|
1495
|
+
"0": {
|
|
1496
|
+
"name": "constant.language.factorvars.stata"
|
|
1497
|
+
},
|
|
1498
|
+
"3": {
|
|
1499
|
+
"patterns": [
|
|
1500
|
+
{
|
|
1501
|
+
"include": "#constants"
|
|
1502
|
+
}
|
|
1503
|
+
]
|
|
1504
|
+
}
|
|
1505
|
+
},
|
|
1506
|
+
"match": "\\b(i?b)((\\d+)|n)\\.(?=[\\w&&[^0-9]]|\\([\\w&&[^0-9]])"
|
|
1507
|
+
},
|
|
1508
|
+
{
|
|
1509
|
+
"captures": {
|
|
1510
|
+
"0": {
|
|
1511
|
+
"name": "constant.language.factorvars.stata"
|
|
1512
|
+
},
|
|
1513
|
+
"2": {
|
|
1514
|
+
"name": "keyword.operator.parentheses.stata"
|
|
1515
|
+
},
|
|
1516
|
+
"3": {
|
|
1517
|
+
"patterns": [
|
|
1518
|
+
{
|
|
1519
|
+
"include": "#constants"
|
|
1520
|
+
},
|
|
1521
|
+
{
|
|
1522
|
+
"include": "#operators"
|
|
1523
|
+
}
|
|
1524
|
+
]
|
|
1525
|
+
},
|
|
1526
|
+
"4": {
|
|
1527
|
+
"name": "keyword.operator.parentheses.stata"
|
|
1528
|
+
}
|
|
1529
|
+
},
|
|
1530
|
+
"match": "\\b(i?b)(\\()(#\\d+|first|last|freq)(\\))\\.(?=[\\w&&[^0-9]]|\\([\\w&&[^0-9]])"
|
|
1531
|
+
},
|
|
1532
|
+
{
|
|
1533
|
+
"captures": {
|
|
1534
|
+
"0": {
|
|
1535
|
+
"name": "constant.language.factorvars.stata"
|
|
1536
|
+
},
|
|
1537
|
+
"2": {
|
|
1538
|
+
"patterns": [
|
|
1539
|
+
{
|
|
1540
|
+
"include": "#constants"
|
|
1541
|
+
}
|
|
1542
|
+
]
|
|
1543
|
+
}
|
|
1544
|
+
},
|
|
1545
|
+
"match": "\\b(i?o?)(\\d+)\\.(?=[\\w&&[^0-9]]|\\([\\w&&[^0-9]])"
|
|
1546
|
+
},
|
|
1547
|
+
{
|
|
1548
|
+
"captures": {
|
|
1549
|
+
"1": {
|
|
1550
|
+
"name": "constant.language.factorvars.stata"
|
|
1551
|
+
},
|
|
1552
|
+
"2": {
|
|
1553
|
+
"name": "keyword.operator.parentheses.stata"
|
|
1554
|
+
},
|
|
1555
|
+
"3": {
|
|
1556
|
+
"patterns": [
|
|
1557
|
+
{
|
|
1558
|
+
"include": "$self"
|
|
1559
|
+
}
|
|
1560
|
+
]
|
|
1561
|
+
},
|
|
1562
|
+
"4": {
|
|
1563
|
+
"name": "keyword.operator.parentheses.stata"
|
|
1564
|
+
},
|
|
1565
|
+
"5": {
|
|
1566
|
+
"name": "constant.language.factorvars.stata"
|
|
1567
|
+
}
|
|
1568
|
+
},
|
|
1569
|
+
"match": "\\b(i?o?)(\\()(.*?)(\\))(\\.)(?=[\\w&&[^0-9]]|\\([\\w&&[^0-9]])"
|
|
1570
|
+
}
|
|
1571
|
+
]
|
|
1572
|
+
},
|
|
1573
|
+
"functions": {
|
|
1574
|
+
"patterns": [
|
|
1575
|
+
{
|
|
1576
|
+
"begin": "\\b((abbrev|abs|acos|acosh|asin|asinh|atan|atan2|atanh|autocode|betaden|binomial|binomialp|binomialtail|binormalbofd|byteorder|c|cauchy|cauchyden|cauchytail|Cdhms|ceil|char|chi2|chi2den|chi2tail|Chms|cholesky|chop|clip|clock|Clock|cloglog|Cmdyhms|cofC|Cofc|cofd|Cofd|coleqnumb|collatorlocale|collatorversion|colnfreeparms|colnumb|colsof|comb|cond|corr|cos|cosh|daily|date|day|det|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|dhms|diag|diag0cnt|digamma|dofb|dofc|dofC|dofh|dofm|dofq|dofw|dofy|dow|doy|dunnettprob|e|el|epsdouble|epsfloat|exp|exponential|exponentialden|exponentialtail|F|Fden|fileexists|fileread|filereaderror|filewrite|float|floor|fmtwidth|Ftail|gammaden|gammap|gammaptail|get|hadamard|halfyear|halfyearly|hh|hhC|hms|hofd|hours|hypergeometric|hypergeometricp|I|ibeta|ibetatail|igaussian|igaussianden|igaussiantail|indexnot|inlist|inrange|int|inv|invbinomial|invbinomialtail|invcauchy|invcauchytail|invchi2|invchi2tail|invcloglog|invdunnettprob|invexponential|invexponentialtail|invF|invFtail|invgammap|invgammaptail|invibeta|invibetatail|invigaussian|invigaussiantail|invlaplace|invlaplacetail|invlogistic|invlogistictail|invlogit|invnbinomial|invnbinomialtail|invnchi2|invnchi2tail|invnF|invnFtail|invnibeta|invnormal|invnt|invnttail|invpoisson|invpoissontail|invsym|invt|invttail|invtukeyprob|invweibull|invweibullph|invweibullphtail|invweibulltail|irecode|issymmetric|itrim|J|laplace|laplaceden|laplacetail|length|ln|lncauchyden|lnfactorial|lngamma|lnigammaden|lnigaussianden|lniwishartden|lnlaplaceden|lnmvnormalden|lnnormal|lnnormalden|lnwishartden|log|log10|logistic|logisticden|logistictail|logit|lower|ltrim|matmissing|matrix|matuniform|max|maxbyte|maxdouble|maxfloat|maxint|maxlong|mdy|mdyhms|mi|min|minbyte|mindouble|minfloat|minint|minlong|minutes|missing|mm|mmC|mod|mofd|month|monthly|mreldif|msofhours|msofminutes|msofseconds|nbetaden|nbinomial|nbinomialp|nbinomialtail|nchi2|nchi2den|nchi2tail|nF|nFden|nFtail|nibeta|normal|normalden|npnchi2|npnF|npnt|nt|ntden|nttail|nullmat|plural|poisson|poissonp|poissontail|proper|qofd|quarter|quarterly|r|rbeta|rbinomial|rcauchy|rchi2|real|recode|regexs|reldif|replay|return|reverse|rexponential|rgamma|rhypergeometric|rigaussian|rlaplace|rlogistic|rnbinomial|rnormal|round|roweqnumb|rownfreeparms|rownumb|rowsof|rpoisson|rt|rtrim|runiform|runiformint|rweibull|rweibullph|s|scalar|seconds|sign|sin|sinh|smallestdouble|soundex|sqrt|ss|ssC|string|stritrim|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrpos|strrtrim|strtoname|strtrim|strupper|subinstr|subinword|substr|sum|sweep|t|tan|tanh|tc|tC|td|tden|th|tin|tm|tobytes|tq|trace|trigamma|trim|trunc|ttail|tukeyprob|tw|twithin|uchar|udstrlen|udsubstr|uisdigit|uisletter|upper|ustrcompare|ustrcompareex|ustrfix|ustrfrom|ustrinvalidcnt|ustrleft|ustrlen|ustrlower|ustrltrim|ustrnormalize|ustrpos|ustrregexs|ustrreverse|ustrright|ustrrpos|ustrrtrim|ustrsortkey|ustrsortkeyex|ustrtitle|ustrto|ustrtohex|ustrtoname|ustrtrim|ustrunescape|ustrupper|ustrword|ustrwordcount|usubinstr|usubstr|vec|vecdiag|week|weekly|weibull|weibullden|weibullph|weibullphden|weibullphtail|weibulltail|wofd|word|wordbreaklocale|wordcount|year|yearly|yh|ym|yofd|yq|yw)|([\\w&&[^0-9]]\\w{0,31}))(\\()",
|
|
1577
|
+
"beginCaptures": {
|
|
1578
|
+
"2": {
|
|
1579
|
+
"name": "support.function.builtin.stata"
|
|
1580
|
+
},
|
|
1581
|
+
"3": {
|
|
1582
|
+
"name": "support.function.custom.stata"
|
|
1583
|
+
},
|
|
1584
|
+
"4": {
|
|
1585
|
+
"name": "punctuation.definition.parameters.begin.stata"
|
|
1586
|
+
}
|
|
1587
|
+
},
|
|
1588
|
+
"end": "(\\))",
|
|
1589
|
+
"endCaptures": {
|
|
1590
|
+
"1": {
|
|
1591
|
+
"name": "punctuation.definition.parameters.end.stata"
|
|
1592
|
+
}
|
|
1593
|
+
},
|
|
1594
|
+
"patterns": [
|
|
1595
|
+
{
|
|
1596
|
+
"match": "[\\w&&[^0-9]]\\w{0,31}",
|
|
1597
|
+
"name": "variable.parameter.function.stata"
|
|
1598
|
+
},
|
|
1599
|
+
{
|
|
1600
|
+
"begin": "\\(",
|
|
1601
|
+
"beginCaptures": {
|
|
1602
|
+
"0": {
|
|
1603
|
+
"name": "keyword.operator.parentheses.stata"
|
|
1604
|
+
}
|
|
1605
|
+
},
|
|
1606
|
+
"end": "\\)",
|
|
1607
|
+
"endCaptures": {
|
|
1608
|
+
"0": {
|
|
1609
|
+
"name": "keyword.operator.parentheses.stata"
|
|
1610
|
+
}
|
|
1611
|
+
},
|
|
1612
|
+
"patterns": [
|
|
1613
|
+
{
|
|
1614
|
+
"include": "#ascii-regex-functions"
|
|
1615
|
+
},
|
|
1616
|
+
{
|
|
1617
|
+
"include": "#unicode-regex-functions"
|
|
1618
|
+
},
|
|
1619
|
+
{
|
|
1620
|
+
"include": "#functions"
|
|
1621
|
+
},
|
|
1622
|
+
{
|
|
1623
|
+
"include": "#subscripts"
|
|
1624
|
+
},
|
|
1625
|
+
{
|
|
1626
|
+
"include": "#constants"
|
|
1627
|
+
},
|
|
1628
|
+
{
|
|
1629
|
+
"include": "#comments"
|
|
1630
|
+
},
|
|
1631
|
+
{
|
|
1632
|
+
"include": "#operators"
|
|
1633
|
+
},
|
|
1634
|
+
{
|
|
1635
|
+
"include": "#macro-local"
|
|
1636
|
+
},
|
|
1637
|
+
{
|
|
1638
|
+
"include": "#macro-global"
|
|
1639
|
+
},
|
|
1640
|
+
{
|
|
1641
|
+
"include": "#string-compound"
|
|
1642
|
+
},
|
|
1643
|
+
{
|
|
1644
|
+
"include": "#string-regular"
|
|
1645
|
+
},
|
|
1646
|
+
{
|
|
1647
|
+
"include": "#builtin_variables"
|
|
1648
|
+
},
|
|
1649
|
+
{
|
|
1650
|
+
"include": "#macro-commands"
|
|
1651
|
+
},
|
|
1652
|
+
{
|
|
1653
|
+
"include": "#braces-without-error"
|
|
1654
|
+
},
|
|
1655
|
+
{
|
|
1656
|
+
"match": "[\\w&&[^0-9]]\\w{0,31}",
|
|
1657
|
+
"name": "variable.parameter.function.stata"
|
|
1658
|
+
}
|
|
1659
|
+
]
|
|
1660
|
+
},
|
|
1661
|
+
{
|
|
1662
|
+
"include": "#ascii-regex-functions"
|
|
1663
|
+
},
|
|
1664
|
+
{
|
|
1665
|
+
"include": "#unicode-regex-functions"
|
|
1666
|
+
},
|
|
1667
|
+
{
|
|
1668
|
+
"include": "#functions"
|
|
1669
|
+
},
|
|
1670
|
+
{
|
|
1671
|
+
"include": "#subscripts"
|
|
1672
|
+
},
|
|
1673
|
+
{
|
|
1674
|
+
"include": "#constants"
|
|
1675
|
+
},
|
|
1676
|
+
{
|
|
1677
|
+
"include": "#comments"
|
|
1678
|
+
},
|
|
1679
|
+
{
|
|
1680
|
+
"include": "#operators"
|
|
1681
|
+
},
|
|
1682
|
+
{
|
|
1683
|
+
"include": "#macro-local"
|
|
1684
|
+
},
|
|
1685
|
+
{
|
|
1686
|
+
"include": "#macro-global"
|
|
1687
|
+
},
|
|
1688
|
+
{
|
|
1689
|
+
"include": "#string-compound"
|
|
1690
|
+
},
|
|
1691
|
+
{
|
|
1692
|
+
"include": "#string-regular"
|
|
1693
|
+
},
|
|
1694
|
+
{
|
|
1695
|
+
"include": "#builtin_variables"
|
|
1696
|
+
},
|
|
1697
|
+
{
|
|
1698
|
+
"include": "#macro-commands"
|
|
1699
|
+
},
|
|
1700
|
+
{
|
|
1701
|
+
"include": "#braces-without-error"
|
|
1702
|
+
}
|
|
1703
|
+
]
|
|
1704
|
+
}
|
|
1705
|
+
]
|
|
1706
|
+
},
|
|
1707
|
+
"macro-commands": {
|
|
1708
|
+
"patterns": [
|
|
1709
|
+
{
|
|
1710
|
+
"begin": "\\b(loc(al|a)?)\\s+([\\w'`\\$\\(\\)\\{\\}]+)\\s*(?=:|=)",
|
|
1711
|
+
"beginCaptures": {
|
|
1712
|
+
"1": {
|
|
1713
|
+
"name": "keyword.macro.stata"
|
|
1714
|
+
},
|
|
1715
|
+
"3": {
|
|
1716
|
+
"patterns": [
|
|
1717
|
+
{
|
|
1718
|
+
"include": "#macro-local-identifiers"
|
|
1719
|
+
},
|
|
1720
|
+
{
|
|
1721
|
+
"include": "#macro-local"
|
|
1722
|
+
},
|
|
1723
|
+
{
|
|
1724
|
+
"include": "#macro-global"
|
|
1725
|
+
}
|
|
1726
|
+
]
|
|
1727
|
+
}
|
|
1728
|
+
},
|
|
1729
|
+
"end": "\\n",
|
|
1730
|
+
"patterns": [
|
|
1731
|
+
{
|
|
1732
|
+
"begin": "=",
|
|
1733
|
+
"beginCaptures": {
|
|
1734
|
+
"0": {
|
|
1735
|
+
"name": "keyword.operator.arithmetic.stata"
|
|
1736
|
+
}
|
|
1737
|
+
},
|
|
1738
|
+
"end": "(?=\\n)",
|
|
1739
|
+
"patterns": [
|
|
1740
|
+
{
|
|
1741
|
+
"include": "$self"
|
|
1742
|
+
}
|
|
1743
|
+
]
|
|
1744
|
+
},
|
|
1745
|
+
{
|
|
1746
|
+
"begin": ":",
|
|
1747
|
+
"beginCaptures": {
|
|
1748
|
+
"0": {
|
|
1749
|
+
"name": "keyword.operator.arithmetic.stata"
|
|
1750
|
+
}
|
|
1751
|
+
},
|
|
1752
|
+
"end": "(?=\\n)",
|
|
1753
|
+
"patterns": [
|
|
1754
|
+
{
|
|
1755
|
+
"include": "#macro-extended-functions"
|
|
1756
|
+
}
|
|
1757
|
+
]
|
|
1758
|
+
}
|
|
1759
|
+
]
|
|
1760
|
+
},
|
|
1761
|
+
{
|
|
1762
|
+
"begin": "\\b(gl(obal|oba|ob|o)?)\\s+(?=[\\w`\\$])",
|
|
1763
|
+
"beginCaptures": {
|
|
1764
|
+
"1": {
|
|
1765
|
+
"name": "keyword.macro.stata"
|
|
1766
|
+
}
|
|
1767
|
+
},
|
|
1768
|
+
"end": "(\\})|(?=\\\"|\\s|\\n|/|,|=)",
|
|
1769
|
+
"patterns": [
|
|
1770
|
+
{
|
|
1771
|
+
"include": "#reserved-names"
|
|
1772
|
+
},
|
|
1773
|
+
{
|
|
1774
|
+
"match": "[\\w&&[^0-9_]]\\w{0,31}",
|
|
1775
|
+
"name": "entity.name.type.class.stata"
|
|
1776
|
+
},
|
|
1777
|
+
{
|
|
1778
|
+
"include": "#macro-local"
|
|
1779
|
+
},
|
|
1780
|
+
{
|
|
1781
|
+
"include": "#macro-global"
|
|
1782
|
+
}
|
|
1783
|
+
]
|
|
1784
|
+
},
|
|
1785
|
+
{
|
|
1786
|
+
"begin": "\\b(loc(al|a)?)\\s+(\\+\\+|\\-\\-)?(?=[\\w`\\$])",
|
|
1787
|
+
"beginCaptures": {
|
|
1788
|
+
"1": {
|
|
1789
|
+
"name": "keyword.macro.stata"
|
|
1790
|
+
},
|
|
1791
|
+
"3": {
|
|
1792
|
+
"name": "keyword.operator.arithmetic.stata"
|
|
1793
|
+
}
|
|
1794
|
+
},
|
|
1795
|
+
"end": "(?=\\\"|\\s|\\n|/|,|=)",
|
|
1796
|
+
"patterns": [
|
|
1797
|
+
{
|
|
1798
|
+
"include": "#macro-local-identifiers"
|
|
1799
|
+
},
|
|
1800
|
+
{
|
|
1801
|
+
"include": "#macro-local"
|
|
1802
|
+
},
|
|
1803
|
+
{
|
|
1804
|
+
"include": "#macro-global"
|
|
1805
|
+
}
|
|
1806
|
+
]
|
|
1807
|
+
},
|
|
1808
|
+
{
|
|
1809
|
+
"begin": "\\b(tempvar|tempname|tempfile)\\s*(?=\\s)",
|
|
1810
|
+
"beginCaptures": {
|
|
1811
|
+
"1": {
|
|
1812
|
+
"name": "keyword.macro.stata"
|
|
1813
|
+
}
|
|
1814
|
+
},
|
|
1815
|
+
"end": "\\n",
|
|
1816
|
+
"patterns": [
|
|
1817
|
+
{
|
|
1818
|
+
"begin": "///",
|
|
1819
|
+
"end": "\\n",
|
|
1820
|
+
"name": "comment.block.stata"
|
|
1821
|
+
},
|
|
1822
|
+
{
|
|
1823
|
+
"include": "#macro-local-identifiers"
|
|
1824
|
+
},
|
|
1825
|
+
{
|
|
1826
|
+
"include": "#macro-local"
|
|
1827
|
+
},
|
|
1828
|
+
{
|
|
1829
|
+
"include": "#macro-global"
|
|
1830
|
+
}
|
|
1831
|
+
]
|
|
1832
|
+
},
|
|
1833
|
+
{
|
|
1834
|
+
"begin": "\\b(ma(cro|cr|c)?)\\s+(drop|l(ist|is|i)?)\\s*(?=\\s)",
|
|
1835
|
+
"beginCaptures": {
|
|
1836
|
+
"0": {
|
|
1837
|
+
"name": "keyword.macro.stata"
|
|
1838
|
+
}
|
|
1839
|
+
},
|
|
1840
|
+
"end": "\\n",
|
|
1841
|
+
"patterns": [
|
|
1842
|
+
{
|
|
1843
|
+
"begin": "///",
|
|
1844
|
+
"end": "\\n",
|
|
1845
|
+
"name": "comment.block.stata"
|
|
1846
|
+
},
|
|
1847
|
+
{
|
|
1848
|
+
"match": "\\*",
|
|
1849
|
+
"name": "keyword.operator.arithmetic.stata"
|
|
1850
|
+
},
|
|
1851
|
+
{
|
|
1852
|
+
"include": "#constants"
|
|
1853
|
+
},
|
|
1854
|
+
{
|
|
1855
|
+
"include": "#macro-global"
|
|
1856
|
+
},
|
|
1857
|
+
{
|
|
1858
|
+
"include": "#macro-local"
|
|
1859
|
+
},
|
|
1860
|
+
{
|
|
1861
|
+
"include": "#comments"
|
|
1862
|
+
},
|
|
1863
|
+
{
|
|
1864
|
+
"match": "\\w{1,31}",
|
|
1865
|
+
"name": "entity.name.type.class.stata"
|
|
1866
|
+
}
|
|
1867
|
+
]
|
|
1868
|
+
}
|
|
1869
|
+
]
|
|
1870
|
+
},
|
|
1871
|
+
"macro-extended-functions": {
|
|
1872
|
+
"patterns": [
|
|
1873
|
+
{
|
|
1874
|
+
"match": "\\b(properties)\\b",
|
|
1875
|
+
"name": "keyword.macro.extendedfcn.stata"
|
|
1876
|
+
},
|
|
1877
|
+
{
|
|
1878
|
+
"match": "\\b(t(ype|yp|y)?|f(ormat|orma|orm|or|o)?|val(ue|u)?\\s+l(able|abl|ab|a)?|var(iable|iabl|iab|ia|i)?\\s+l(abel|abe|ab|a)?|data\\s+l(able|abl|ab|a)?|sort(edby|edb|ed|e)?|lab(el|e)?|maxlength|constraint|char)\\b",
|
|
1879
|
+
"name": "keyword.macro.extendedfcn.stata"
|
|
1880
|
+
},
|
|
1881
|
+
{
|
|
1882
|
+
"match": "\\b(permname)\\b",
|
|
1883
|
+
"name": "keyword.macro.extendedfcn.stata"
|
|
1884
|
+
},
|
|
1885
|
+
{
|
|
1886
|
+
"match": "\\b(adosubdir|dir|files?|dirs?|other|sysdir)\\b",
|
|
1887
|
+
"name": "keyword.macro.extendedfcn.stata"
|
|
1888
|
+
},
|
|
1889
|
+
{
|
|
1890
|
+
"match": "\\b(env(ironment|ironmen|ironme|ironm|iron|iro|ir|i)?)\\b",
|
|
1891
|
+
"name": "keyword.macro.extendedfcn.stata"
|
|
1892
|
+
},
|
|
1893
|
+
{
|
|
1894
|
+
"match": "\\b(all\\s+(globals|scalars|matrices)|((numeric|string)\\s+scalars))\\b",
|
|
1895
|
+
"name": "keyword.macro.extendedfcn.stata"
|
|
1896
|
+
},
|
|
1897
|
+
{
|
|
1898
|
+
"captures": {
|
|
1899
|
+
"1": {
|
|
1900
|
+
"name": "keyword.macro.extendedfcn.stata"
|
|
1901
|
+
},
|
|
1902
|
+
"2": {
|
|
1903
|
+
"name": "keyword.macro.extendedfcn.stata"
|
|
1904
|
+
},
|
|
1905
|
+
"3": {
|
|
1906
|
+
"name": "entity.name.type.class.stata"
|
|
1907
|
+
}
|
|
1908
|
+
},
|
|
1909
|
+
"match": "\\b(list)\\s+(uniq|dups|sort|clean|retok(enize|eniz|eni|en|e)?|sizeof)\\s+(\\w{1,32})"
|
|
1910
|
+
},
|
|
1911
|
+
{
|
|
1912
|
+
"captures": {
|
|
1913
|
+
"1": {
|
|
1914
|
+
"name": "keyword.macro.extendedfcn.stata"
|
|
1915
|
+
},
|
|
1916
|
+
"2": {
|
|
1917
|
+
"name": "entity.name.type.class.stata"
|
|
1918
|
+
},
|
|
1919
|
+
"3": {
|
|
1920
|
+
"name": "keyword.operator.list.stata"
|
|
1921
|
+
},
|
|
1922
|
+
"4": {
|
|
1923
|
+
"name": "entity.name.type.class.stata"
|
|
1924
|
+
}
|
|
1925
|
+
},
|
|
1926
|
+
"match": "\\b(list)\\s+(\\w{1,32})\\s+(\\||&|\\-|===|==|in)\\s+(\\w{1,32})"
|
|
1927
|
+
},
|
|
1928
|
+
{
|
|
1929
|
+
"captures": {
|
|
1930
|
+
"1": {
|
|
1931
|
+
"name": "keyword.macro.extendedfcn.stata"
|
|
1932
|
+
},
|
|
1933
|
+
"2": {
|
|
1934
|
+
"name": "punctuation.definition.string.begin.stata"
|
|
1935
|
+
},
|
|
1936
|
+
"3": {
|
|
1937
|
+
"name": "string.quoted.double.stata"
|
|
1938
|
+
},
|
|
1939
|
+
"4": {
|
|
1940
|
+
"name": "punctuation.definition.string.end.stata"
|
|
1941
|
+
},
|
|
1942
|
+
"5": {
|
|
1943
|
+
"name": "keyword.macro.extendedfcn.stata"
|
|
1944
|
+
},
|
|
1945
|
+
"6": {
|
|
1946
|
+
"name": "entity.name.type.class.stata"
|
|
1947
|
+
}
|
|
1948
|
+
},
|
|
1949
|
+
"match": "\\b(list\\s+posof)\\s+(\")(\\w+)(\")\\s+(in)\\s+(\\w{1,32})"
|
|
1950
|
+
},
|
|
1951
|
+
{
|
|
1952
|
+
"match": "\\b(rown(ames|ame|am|a)?|coln(ames|ame|am|a)?|rowf(ullnames|ullname|ullnam|ullna|ulln|ull|ul|u)?|colf(ullnames|ullname|ullnam|ullna|ulln|ull|ul|u)?|roweq?|coleq?|rownumb|colnumb|roweqnumb|coleqnumb|rownfreeparms|colnfreeparms|rownlfs|colnlfs|rowsof|colsof|rowvarlist|colvarlist|rowlfnames|collfnames)\\b",
|
|
1953
|
+
"name": "keyword.macro.extendedfcn.stata"
|
|
1954
|
+
},
|
|
1955
|
+
{
|
|
1956
|
+
"match": "\\b(tsnorm)\\b",
|
|
1957
|
+
"name": "keyword.macro.extendedfcn.stata"
|
|
1958
|
+
},
|
|
1959
|
+
{
|
|
1960
|
+
"captures": {
|
|
1961
|
+
"1": {
|
|
1962
|
+
"name": "keyword.macro.extendedfcn.stata"
|
|
1963
|
+
},
|
|
1964
|
+
"7": {
|
|
1965
|
+
"patterns": [
|
|
1966
|
+
{
|
|
1967
|
+
"include": "#macro-local"
|
|
1968
|
+
},
|
|
1969
|
+
{
|
|
1970
|
+
"include": "#macro-global"
|
|
1971
|
+
}
|
|
1972
|
+
]
|
|
1973
|
+
}
|
|
1974
|
+
},
|
|
1975
|
+
"match": "\\b((copy|(ud|u)?strlen)\\s+(loc(al|a)?|gl(obal|oba|ob|o)?))\\s+([^']+)"
|
|
1976
|
+
},
|
|
1977
|
+
{
|
|
1978
|
+
"captures": {
|
|
1979
|
+
"1": {
|
|
1980
|
+
"name": "keyword.macro.extendedfcn.stata"
|
|
1981
|
+
}
|
|
1982
|
+
},
|
|
1983
|
+
"match": "\\b(word\\s+count)"
|
|
1984
|
+
},
|
|
1985
|
+
{
|
|
1986
|
+
"captures": {
|
|
1987
|
+
"1": {
|
|
1988
|
+
"name": "keyword.macro.extendedfcn.stata"
|
|
1989
|
+
},
|
|
1990
|
+
"2": {
|
|
1991
|
+
"patterns": [
|
|
1992
|
+
{
|
|
1993
|
+
"include": "#macro-local"
|
|
1994
|
+
},
|
|
1995
|
+
{
|
|
1996
|
+
"include": "#constants"
|
|
1997
|
+
}
|
|
1998
|
+
]
|
|
1999
|
+
},
|
|
2000
|
+
"3": {
|
|
2001
|
+
"name": "keyword.macro.extendedfcn.stata"
|
|
2002
|
+
}
|
|
2003
|
+
},
|
|
2004
|
+
"match": "(word|piece)\\s+([\\s`'\\w]+)\\s+(of)"
|
|
2005
|
+
},
|
|
2006
|
+
{
|
|
2007
|
+
"begin": "\\b(subinstr\\s+(loc(al|a)?|gl(obal|oba|ob|o)?))\\s+(\\w{1,32})",
|
|
2008
|
+
"beginCaptures": {
|
|
2009
|
+
"1": {
|
|
2010
|
+
"name": "keyword.macro.extendedfcn.stata"
|
|
2011
|
+
},
|
|
2012
|
+
"5": {
|
|
2013
|
+
"name": "entity.name.type.class.stata"
|
|
2014
|
+
}
|
|
2015
|
+
},
|
|
2016
|
+
"end": "(?=//|\\n)",
|
|
2017
|
+
"patterns": [
|
|
2018
|
+
{
|
|
2019
|
+
"include": "#macro-local"
|
|
2020
|
+
},
|
|
2021
|
+
{
|
|
2022
|
+
"include": "#macro-global"
|
|
2023
|
+
},
|
|
2024
|
+
{
|
|
2025
|
+
"include": "#string-compound"
|
|
2026
|
+
},
|
|
2027
|
+
{
|
|
2028
|
+
"include": "#string-regular"
|
|
2029
|
+
},
|
|
2030
|
+
{
|
|
2031
|
+
"captures": {
|
|
2032
|
+
"1": {
|
|
2033
|
+
"name": "support.function.builtin.stata"
|
|
2034
|
+
},
|
|
2035
|
+
"2": {
|
|
2036
|
+
"name": "punctuation.definition.parameters.begin.stata"
|
|
2037
|
+
},
|
|
2038
|
+
"3": {
|
|
2039
|
+
"name": "keyword.macro.extendedfcn.stata"
|
|
2040
|
+
},
|
|
2041
|
+
"4": {
|
|
2042
|
+
"name": "entity.name.type.class.stata"
|
|
2043
|
+
},
|
|
2044
|
+
"5": {
|
|
2045
|
+
"name": "punctuation.definition.parameters.end.stata"
|
|
2046
|
+
}
|
|
2047
|
+
},
|
|
2048
|
+
"match": "(count|coun|cou|co|c)(\\()(local|loca|loc|global|globa|glob|glo|gl)\\s+(\\w{1,32})(\\))"
|
|
2049
|
+
}
|
|
2050
|
+
]
|
|
2051
|
+
},
|
|
2052
|
+
{
|
|
2053
|
+
"include": "#comments"
|
|
2054
|
+
},
|
|
2055
|
+
{
|
|
2056
|
+
"include": "#macro-local"
|
|
2057
|
+
},
|
|
2058
|
+
{
|
|
2059
|
+
"include": "#macro-global"
|
|
2060
|
+
},
|
|
2061
|
+
{
|
|
2062
|
+
"include": "$self"
|
|
2063
|
+
}
|
|
2064
|
+
]
|
|
2065
|
+
},
|
|
2066
|
+
"macro-global": {
|
|
2067
|
+
"patterns": [
|
|
2068
|
+
{
|
|
2069
|
+
"begin": "(\\$)(\\{)",
|
|
2070
|
+
"beginCaptures": {
|
|
2071
|
+
"0": {
|
|
2072
|
+
"name": "punctuation.definition.string.begin.stata"
|
|
2073
|
+
}
|
|
2074
|
+
},
|
|
2075
|
+
"end": "\\}",
|
|
2076
|
+
"endCaptures": {
|
|
2077
|
+
"0": {
|
|
2078
|
+
"name": "punctuation.definition.string.end.stata"
|
|
2079
|
+
}
|
|
2080
|
+
},
|
|
2081
|
+
"patterns": [
|
|
2082
|
+
{
|
|
2083
|
+
"include": "#macro-local"
|
|
2084
|
+
},
|
|
2085
|
+
{
|
|
2086
|
+
"include": "#macro-global"
|
|
2087
|
+
},
|
|
2088
|
+
{
|
|
2089
|
+
"include": "#comments-block"
|
|
2090
|
+
},
|
|
2091
|
+
{
|
|
2092
|
+
"begin": "[^\\w]",
|
|
2093
|
+
"end": "\\n|(?=})",
|
|
2094
|
+
"name": "comment.line.stata"
|
|
2095
|
+
},
|
|
2096
|
+
{
|
|
2097
|
+
"match": "\\w{1,32}",
|
|
2098
|
+
"name": "entity.name.type.class.stata"
|
|
2099
|
+
}
|
|
2100
|
+
]
|
|
2101
|
+
},
|
|
2102
|
+
{
|
|
2103
|
+
"begin": "\\$",
|
|
2104
|
+
"beginCaptures": {
|
|
2105
|
+
"0": {
|
|
2106
|
+
"name": "punctuation.definition.string.begin.stata"
|
|
2107
|
+
}
|
|
2108
|
+
},
|
|
2109
|
+
"end": "(?!\\w)",
|
|
2110
|
+
"endCaptures": {
|
|
2111
|
+
"1": {
|
|
2112
|
+
"name": "punctuation.definition.string.end.stata"
|
|
2113
|
+
}
|
|
2114
|
+
},
|
|
2115
|
+
"patterns": [
|
|
2116
|
+
{
|
|
2117
|
+
"include": "#macro-local"
|
|
2118
|
+
},
|
|
2119
|
+
{
|
|
2120
|
+
"include": "#macro-global"
|
|
2121
|
+
},
|
|
2122
|
+
{
|
|
2123
|
+
"match": "[\\w&&[^0-9_]]\\w{0,31}|_\\w{1,31}",
|
|
2124
|
+
"name": "entity.name.type.class.stata"
|
|
2125
|
+
}
|
|
2126
|
+
]
|
|
2127
|
+
}
|
|
2128
|
+
]
|
|
2129
|
+
},
|
|
2130
|
+
"macro-global-escaped": {
|
|
2131
|
+
"patterns": [
|
|
2132
|
+
{
|
|
2133
|
+
"begin": "(\\\\\\$)(\\\\\\{)?",
|
|
2134
|
+
"beginCaptures": {
|
|
2135
|
+
"0": {
|
|
2136
|
+
"name": "punctuation.definition.string.begin.stata"
|
|
2137
|
+
}
|
|
2138
|
+
},
|
|
2139
|
+
"end": "(\\\\\\})|(?=\\\"|\\s|\\n|/|,)",
|
|
2140
|
+
"endCaptures": {
|
|
2141
|
+
"1": {
|
|
2142
|
+
"name": "punctuation.definition.string.end.stata"
|
|
2143
|
+
}
|
|
2144
|
+
},
|
|
2145
|
+
"patterns": [
|
|
2146
|
+
{
|
|
2147
|
+
"include": "#macro-local"
|
|
2148
|
+
},
|
|
2149
|
+
{
|
|
2150
|
+
"include": "#macro-global"
|
|
2151
|
+
},
|
|
2152
|
+
{
|
|
2153
|
+
"match": "[\\w&&[^0-9_]]\\w{0,31}|_\\w{1,31}",
|
|
2154
|
+
"name": "entity.name.type.class.stata"
|
|
2155
|
+
}
|
|
2156
|
+
]
|
|
2157
|
+
}
|
|
2158
|
+
]
|
|
2159
|
+
},
|
|
2160
|
+
"macro-local": {
|
|
2161
|
+
"patterns": [
|
|
2162
|
+
{
|
|
2163
|
+
"begin": "(`)(=)",
|
|
2164
|
+
"beginCaptures": {
|
|
2165
|
+
"1": {
|
|
2166
|
+
"name": "punctuation.definition.string.begin.stata"
|
|
2167
|
+
},
|
|
2168
|
+
"2": {
|
|
2169
|
+
"name": "keyword.operator.comparison.stata"
|
|
2170
|
+
}
|
|
2171
|
+
},
|
|
2172
|
+
"end": "'",
|
|
2173
|
+
"endCaptures": {
|
|
2174
|
+
"0": {
|
|
2175
|
+
"name": "punctuation.definition.string.end.stata"
|
|
2176
|
+
}
|
|
2177
|
+
},
|
|
2178
|
+
"patterns": [
|
|
2179
|
+
{
|
|
2180
|
+
"include": "$self"
|
|
2181
|
+
}
|
|
2182
|
+
]
|
|
2183
|
+
},
|
|
2184
|
+
{
|
|
2185
|
+
"begin": "(`)(:)",
|
|
2186
|
+
"beginCaptures": {
|
|
2187
|
+
"1": {
|
|
2188
|
+
"name": "punctuation.definition.string.begin.stata"
|
|
2189
|
+
},
|
|
2190
|
+
"2": {
|
|
2191
|
+
"name": "keyword.operator.comparison.stata"
|
|
2192
|
+
}
|
|
2193
|
+
},
|
|
2194
|
+
"contentName": "meta.macro-extended-function.stata",
|
|
2195
|
+
"end": "'",
|
|
2196
|
+
"endCaptures": {
|
|
2197
|
+
"0": {
|
|
2198
|
+
"name": "punctuation.definition.string.end.stata"
|
|
2199
|
+
}
|
|
2200
|
+
},
|
|
2201
|
+
"patterns": [
|
|
2202
|
+
{
|
|
2203
|
+
"include": "#macro-local"
|
|
2204
|
+
},
|
|
2205
|
+
{
|
|
2206
|
+
"include": "#macro-extended-functions"
|
|
2207
|
+
},
|
|
2208
|
+
{
|
|
2209
|
+
"include": "#constants"
|
|
2210
|
+
},
|
|
2211
|
+
{
|
|
2212
|
+
"include": "#string-compound"
|
|
2213
|
+
},
|
|
2214
|
+
{
|
|
2215
|
+
"include": "#string-regular"
|
|
2216
|
+
}
|
|
2217
|
+
]
|
|
2218
|
+
},
|
|
2219
|
+
{
|
|
2220
|
+
"begin": "(`)(macval)(\\()",
|
|
2221
|
+
"beginCaptures": {
|
|
2222
|
+
"1": {
|
|
2223
|
+
"name": "punctuation.definition.string.begin.stata"
|
|
2224
|
+
},
|
|
2225
|
+
"2": {
|
|
2226
|
+
"name": "support.function.builtin.stata"
|
|
2227
|
+
},
|
|
2228
|
+
"3": {
|
|
2229
|
+
"name": "punctuation.definition.parameters.begin.stata"
|
|
2230
|
+
}
|
|
2231
|
+
},
|
|
2232
|
+
"contentName": "meta.macro-extended-function.stata",
|
|
2233
|
+
"end": "(\\))(')",
|
|
2234
|
+
"endCaptures": {
|
|
2235
|
+
"1": {
|
|
2236
|
+
"name": "punctuation.definition.parameters.begin.stata"
|
|
2237
|
+
},
|
|
2238
|
+
"2": {
|
|
2239
|
+
"name": "punctuation.definition.string.end.stata"
|
|
2240
|
+
}
|
|
2241
|
+
},
|
|
2242
|
+
"patterns": [
|
|
2243
|
+
{
|
|
2244
|
+
"include": "#macro-local"
|
|
2245
|
+
},
|
|
2246
|
+
{
|
|
2247
|
+
"include": "#macro-global"
|
|
2248
|
+
},
|
|
2249
|
+
{
|
|
2250
|
+
"match": "\\w{1,31}",
|
|
2251
|
+
"name": "entity.name.type.class.stata"
|
|
2252
|
+
}
|
|
2253
|
+
]
|
|
2254
|
+
},
|
|
2255
|
+
{
|
|
2256
|
+
"begin": "`(?!\")",
|
|
2257
|
+
"beginCaptures": {
|
|
2258
|
+
"0": {
|
|
2259
|
+
"name": "punctuation.definition.string.begin.stata"
|
|
2260
|
+
}
|
|
2261
|
+
},
|
|
2262
|
+
"end": "'",
|
|
2263
|
+
"endCaptures": {
|
|
2264
|
+
"0": {
|
|
2265
|
+
"name": "punctuation.definition.string.end.stata"
|
|
2266
|
+
}
|
|
2267
|
+
},
|
|
2268
|
+
"patterns": [
|
|
2269
|
+
{
|
|
2270
|
+
"match": "\\+\\+|\\-\\-",
|
|
2271
|
+
"name": "keyword.operator.arithmetic.stata"
|
|
2272
|
+
},
|
|
2273
|
+
{
|
|
2274
|
+
"include": "#macro-local"
|
|
2275
|
+
},
|
|
2276
|
+
{
|
|
2277
|
+
"include": "#macro-global"
|
|
2278
|
+
},
|
|
2279
|
+
{
|
|
2280
|
+
"include": "#comments-block"
|
|
2281
|
+
},
|
|
2282
|
+
{
|
|
2283
|
+
"begin": "[^\\w]",
|
|
2284
|
+
"end": "\\n|(?=')",
|
|
2285
|
+
"name": "comment.line.stata"
|
|
2286
|
+
},
|
|
2287
|
+
{
|
|
2288
|
+
"match": "\\w{1,31}",
|
|
2289
|
+
"name": "entity.name.type.class.stata"
|
|
2290
|
+
}
|
|
2291
|
+
]
|
|
2292
|
+
}
|
|
2293
|
+
]
|
|
2294
|
+
},
|
|
2295
|
+
"macro-local-escaped": {
|
|
2296
|
+
"patterns": [
|
|
2297
|
+
{
|
|
2298
|
+
"begin": "\\\\`(?!\")",
|
|
2299
|
+
"beginCaptures": {
|
|
2300
|
+
"0": {
|
|
2301
|
+
"name": "punctuation.definition.string.begin.stata"
|
|
2302
|
+
}
|
|
2303
|
+
},
|
|
2304
|
+
"comment": "appropriately color macros that have embedded escaped `,', and $ characters for lazy evaluation",
|
|
2305
|
+
"end": "\\\\'|'",
|
|
2306
|
+
"endCaptures": {
|
|
2307
|
+
"0": {
|
|
2308
|
+
"name": "punctuation.definition.string.end.stata"
|
|
2309
|
+
}
|
|
2310
|
+
},
|
|
2311
|
+
"patterns": [
|
|
2312
|
+
{
|
|
2313
|
+
"include": "#macro-local"
|
|
2314
|
+
},
|
|
2315
|
+
{
|
|
2316
|
+
"include": "#macro-global"
|
|
2317
|
+
},
|
|
2318
|
+
{
|
|
2319
|
+
"match": "\\w{1,31}",
|
|
2320
|
+
"name": "entity.name.type.class.stata"
|
|
2321
|
+
}
|
|
2322
|
+
]
|
|
2323
|
+
}
|
|
2324
|
+
]
|
|
2325
|
+
},
|
|
2326
|
+
"macro-local-identifiers": {
|
|
2327
|
+
"patterns": [
|
|
2328
|
+
{
|
|
2329
|
+
"match": "[^\\w'`\\$\\(\\)\\s]",
|
|
2330
|
+
"name": "invalid.illegal.name.stata"
|
|
2331
|
+
},
|
|
2332
|
+
{
|
|
2333
|
+
"match": "\\w{32,}",
|
|
2334
|
+
"name": "invalid.illegal.name.stata"
|
|
2335
|
+
},
|
|
2336
|
+
{
|
|
2337
|
+
"match": "\\w{1,31}",
|
|
2338
|
+
"name": "entity.name.type.class.stata"
|
|
2339
|
+
}
|
|
2340
|
+
]
|
|
2341
|
+
},
|
|
2342
|
+
"operators": {
|
|
2343
|
+
"patterns": [
|
|
2344
|
+
{
|
|
2345
|
+
"comment": "++ and -- must come first to support ligatures",
|
|
2346
|
+
"match": "\\+\\+|\\-\\-|\\+|\\-|\\*|\\^",
|
|
2347
|
+
"name": "keyword.operator.arithmetic.stata"
|
|
2348
|
+
},
|
|
2349
|
+
{
|
|
2350
|
+
"comment": "match division operator but not path separator",
|
|
2351
|
+
"match": "(?<![\\w.&&[^0-9]])/(?![\\w.&&[^0-9]]|$)",
|
|
2352
|
+
"name": "keyword.operator.arithmetic.stata"
|
|
2353
|
+
},
|
|
2354
|
+
{
|
|
2355
|
+
"comment": "match division operator but not path separator",
|
|
2356
|
+
"match": "(?<![\\w.&&[^0-9]])\\\\(?![\\w.&&[^0-9]]|$)",
|
|
2357
|
+
"name": "keyword.operator.matrix.addrow.stata"
|
|
2358
|
+
},
|
|
2359
|
+
{
|
|
2360
|
+
"match": "\\|\\|",
|
|
2361
|
+
"name": "keyword.operator.graphcombine.stata"
|
|
2362
|
+
},
|
|
2363
|
+
{
|
|
2364
|
+
"match": "\\&|\\|",
|
|
2365
|
+
"name": "keyword.operator.logical.stata"
|
|
2366
|
+
},
|
|
2367
|
+
{
|
|
2368
|
+
"match": "(?:<=|>=|:=|==|!=|~=|<|>|=|!!|!)",
|
|
2369
|
+
"name": "keyword.operator.comparison.stata"
|
|
2370
|
+
},
|
|
2371
|
+
{
|
|
2372
|
+
"match": "\\(|\\)",
|
|
2373
|
+
"name": "keyword.operator.parentheses.stata"
|
|
2374
|
+
},
|
|
2375
|
+
{
|
|
2376
|
+
"match": "(##|#)",
|
|
2377
|
+
"name": "keyword.operator.factor-variables.stata"
|
|
2378
|
+
},
|
|
2379
|
+
{
|
|
2380
|
+
"match": "%",
|
|
2381
|
+
"name": "keyword.operator.format.stata"
|
|
2382
|
+
},
|
|
2383
|
+
{
|
|
2384
|
+
"match": ":",
|
|
2385
|
+
"name": "punctuation.separator.key-value"
|
|
2386
|
+
},
|
|
2387
|
+
{
|
|
2388
|
+
"match": "\\[",
|
|
2389
|
+
"name": "punctuation.definition.parameters.begin.stata"
|
|
2390
|
+
},
|
|
2391
|
+
{
|
|
2392
|
+
"match": "\\]",
|
|
2393
|
+
"name": "punctuation.definition.parameters.end.stata"
|
|
2394
|
+
},
|
|
2395
|
+
{
|
|
2396
|
+
"match": ",",
|
|
2397
|
+
"name": "punctuation.definition.variable.begin.stata"
|
|
2398
|
+
},
|
|
2399
|
+
{
|
|
2400
|
+
"match": ";",
|
|
2401
|
+
"name": "keyword.operator.delimiter.stata"
|
|
2402
|
+
}
|
|
2403
|
+
]
|
|
2404
|
+
},
|
|
2405
|
+
"reserved-names": {
|
|
2406
|
+
"patterns": [
|
|
2407
|
+
{
|
|
2408
|
+
"match": "\\b(_all|_b|byte|_coef|_cons|double|float|if|in|int|long|_n|_N|_pi|_pred|_rc|_skip|str[0-9]+|strL|using|with)\\b",
|
|
2409
|
+
"name": "invalid.illegal.name.stata"
|
|
2410
|
+
},
|
|
2411
|
+
{
|
|
2412
|
+
"match": "[^\\w'`\\$\\(\\)\\s]",
|
|
2413
|
+
"name": "invalid.illegal.name.stata"
|
|
2414
|
+
},
|
|
2415
|
+
{
|
|
2416
|
+
"match": "[0-9][\\w]{31,}",
|
|
2417
|
+
"name": "invalid.illegal.name.stata"
|
|
2418
|
+
},
|
|
2419
|
+
{
|
|
2420
|
+
"match": "\\w{33,}",
|
|
2421
|
+
"name": "invalid.illegal.name.stata"
|
|
2422
|
+
}
|
|
2423
|
+
]
|
|
2424
|
+
},
|
|
2425
|
+
"string-compound": {
|
|
2426
|
+
"patterns": [
|
|
2427
|
+
{
|
|
2428
|
+
"begin": "`\"",
|
|
2429
|
+
"beginCaptures": {
|
|
2430
|
+
"0": {
|
|
2431
|
+
"name": "punctuation.definition.string.begin.stata"
|
|
2432
|
+
}
|
|
2433
|
+
},
|
|
2434
|
+
"end": "\"'|(?=\n)",
|
|
2435
|
+
"endCaptures": {
|
|
2436
|
+
"0": {
|
|
2437
|
+
"name": "punctuation.definition.string.end.stata"
|
|
2438
|
+
}
|
|
2439
|
+
},
|
|
2440
|
+
"name": "string.quoted.double.compound.stata",
|
|
2441
|
+
"patterns": [
|
|
2442
|
+
{
|
|
2443
|
+
"comment": "This must come before #string-regular and #string-compound to accurately color `\"\"\"' in strings",
|
|
2444
|
+
"match": "\"",
|
|
2445
|
+
"name": "string.quoted.double.compound.stata"
|
|
2446
|
+
},
|
|
2447
|
+
{
|
|
2448
|
+
"comment": "see https://github.com/kylebarron/language-stata/issues/53",
|
|
2449
|
+
"match": "```(?=[^']*\")",
|
|
2450
|
+
"name": "meta.markdown.code.block.stata"
|
|
2451
|
+
},
|
|
2452
|
+
{
|
|
2453
|
+
"include": "#string-regular"
|
|
2454
|
+
},
|
|
2455
|
+
{
|
|
2456
|
+
"include": "#string-compound"
|
|
2457
|
+
},
|
|
2458
|
+
{
|
|
2459
|
+
"include": "#macro-local-escaped"
|
|
2460
|
+
},
|
|
2461
|
+
{
|
|
2462
|
+
"include": "#macro-global-escaped"
|
|
2463
|
+
},
|
|
2464
|
+
{
|
|
2465
|
+
"include": "#macro-local"
|
|
2466
|
+
},
|
|
2467
|
+
{
|
|
2468
|
+
"include": "#macro-global"
|
|
2469
|
+
}
|
|
2470
|
+
]
|
|
2471
|
+
}
|
|
2472
|
+
]
|
|
2473
|
+
},
|
|
2474
|
+
"string-regular": {
|
|
2475
|
+
"patterns": [
|
|
2476
|
+
{
|
|
2477
|
+
"begin": "(?<!`)\"",
|
|
2478
|
+
"beginCaptures": {
|
|
2479
|
+
"0": {
|
|
2480
|
+
"name": "punctuation.definition.string.begin.stata"
|
|
2481
|
+
}
|
|
2482
|
+
},
|
|
2483
|
+
"end": "(\")(')?|(?=\n)",
|
|
2484
|
+
"endCaptures": {
|
|
2485
|
+
"1": {
|
|
2486
|
+
"name": "punctuation.definition.string.end.stata"
|
|
2487
|
+
},
|
|
2488
|
+
"2": {
|
|
2489
|
+
"name": "invalid.illegal.punctuation.stata"
|
|
2490
|
+
}
|
|
2491
|
+
},
|
|
2492
|
+
"name": "string.quoted.double.stata",
|
|
2493
|
+
"patterns": [
|
|
2494
|
+
{
|
|
2495
|
+
"comment": "see https://github.com/kylebarron/language-stata/issues/53",
|
|
2496
|
+
"match": "```(?=[^']*\")",
|
|
2497
|
+
"name": "meta.markdown.code.block.stata"
|
|
2498
|
+
},
|
|
2499
|
+
{
|
|
2500
|
+
"include": "#macro-local-escaped"
|
|
2501
|
+
},
|
|
2502
|
+
{
|
|
2503
|
+
"include": "#macro-global-escaped"
|
|
2504
|
+
},
|
|
2505
|
+
{
|
|
2506
|
+
"include": "#macro-local"
|
|
2507
|
+
},
|
|
2508
|
+
{
|
|
2509
|
+
"include": "#macro-global"
|
|
2510
|
+
}
|
|
2511
|
+
]
|
|
2512
|
+
}
|
|
2513
|
+
]
|
|
2514
|
+
},
|
|
2515
|
+
"subscripts": {
|
|
2516
|
+
"patterns": [
|
|
2517
|
+
{
|
|
2518
|
+
"begin": "(?<=[\\w'])(\\[)",
|
|
2519
|
+
"beginCaptures": {
|
|
2520
|
+
"1": {
|
|
2521
|
+
"name": "punctuation.definition.parameters.begin.stata"
|
|
2522
|
+
}
|
|
2523
|
+
},
|
|
2524
|
+
"comment": "highlight expressions, like [_n], when using subscripts on a variable",
|
|
2525
|
+
"end": "(\\])",
|
|
2526
|
+
"endCaptures": {
|
|
2527
|
+
"1": {
|
|
2528
|
+
"name": "punctuation.definition.parameters.end.stata"
|
|
2529
|
+
}
|
|
2530
|
+
},
|
|
2531
|
+
"name": "meta.subscripts.stata",
|
|
2532
|
+
"patterns": [
|
|
2533
|
+
{
|
|
2534
|
+
"include": "#macro-local"
|
|
2535
|
+
},
|
|
2536
|
+
{
|
|
2537
|
+
"include": "#macro-global"
|
|
2538
|
+
},
|
|
2539
|
+
{
|
|
2540
|
+
"include": "#builtin_variables"
|
|
2541
|
+
},
|
|
2542
|
+
{
|
|
2543
|
+
"include": "#operators"
|
|
2544
|
+
},
|
|
2545
|
+
{
|
|
2546
|
+
"include": "#constants"
|
|
2547
|
+
},
|
|
2548
|
+
{
|
|
2549
|
+
"include": "#functions"
|
|
2550
|
+
}
|
|
2551
|
+
]
|
|
2552
|
+
}
|
|
2553
|
+
]
|
|
2554
|
+
},
|
|
2555
|
+
"unicode-regex-character-class": {
|
|
2556
|
+
"patterns": [
|
|
2557
|
+
{
|
|
2558
|
+
"match": "\\\\[wWsSdD]|\\.",
|
|
2559
|
+
"name": "constant.character.character-class.stata"
|
|
2560
|
+
},
|
|
2561
|
+
{
|
|
2562
|
+
"match": "\\\\.",
|
|
2563
|
+
"name": "constant.character.escape.backslash.stata"
|
|
2564
|
+
},
|
|
2565
|
+
{
|
|
2566
|
+
"begin": "(\\[)(\\^)?",
|
|
2567
|
+
"beginCaptures": {
|
|
2568
|
+
"1": {
|
|
2569
|
+
"name": "punctuation.definition.character-class.stata"
|
|
2570
|
+
},
|
|
2571
|
+
"2": {
|
|
2572
|
+
"name": "keyword.operator.negation.stata"
|
|
2573
|
+
}
|
|
2574
|
+
},
|
|
2575
|
+
"end": "(\\])",
|
|
2576
|
+
"endCaptures": {
|
|
2577
|
+
"1": {
|
|
2578
|
+
"name": "punctuation.definition.character-class.stata"
|
|
2579
|
+
}
|
|
2580
|
+
},
|
|
2581
|
+
"name": "constant.other.character-class.set.stata",
|
|
2582
|
+
"patterns": [
|
|
2583
|
+
{
|
|
2584
|
+
"include": "#unicode-regex-character-class"
|
|
2585
|
+
},
|
|
2586
|
+
{
|
|
2587
|
+
"captures": {
|
|
2588
|
+
"2": {
|
|
2589
|
+
"name": "constant.character.escape.backslash.stata"
|
|
2590
|
+
},
|
|
2591
|
+
"4": {
|
|
2592
|
+
"name": "constant.character.escape.backslash.stata"
|
|
2593
|
+
}
|
|
2594
|
+
},
|
|
2595
|
+
"match": "((\\\\.)|.)\\-((\\\\.)|[^\\]])",
|
|
2596
|
+
"name": "constant.other.character-class.range.stata"
|
|
2597
|
+
}
|
|
2598
|
+
]
|
|
2599
|
+
}
|
|
2600
|
+
]
|
|
2601
|
+
},
|
|
2602
|
+
"unicode-regex-functions": {
|
|
2603
|
+
"patterns": [
|
|
2604
|
+
{
|
|
2605
|
+
"captures": {
|
|
2606
|
+
"1": {
|
|
2607
|
+
"name": "support.function.builtin.stata"
|
|
2608
|
+
},
|
|
2609
|
+
"10": {
|
|
2610
|
+
"name": "punctuation.definition.parameters.end.stata"
|
|
2611
|
+
},
|
|
2612
|
+
"2": {
|
|
2613
|
+
"name": "punctuation.definition.parameters.begin.stata"
|
|
2614
|
+
},
|
|
2615
|
+
"3": {
|
|
2616
|
+
"patterns": [
|
|
2617
|
+
{
|
|
2618
|
+
"include": "#string-compound"
|
|
2619
|
+
},
|
|
2620
|
+
{
|
|
2621
|
+
"include": "#string-regular"
|
|
2622
|
+
},
|
|
2623
|
+
{
|
|
2624
|
+
"include": "#macro-local"
|
|
2625
|
+
},
|
|
2626
|
+
{
|
|
2627
|
+
"include": "#macro-global"
|
|
2628
|
+
},
|
|
2629
|
+
{
|
|
2630
|
+
"include": "#functions"
|
|
2631
|
+
},
|
|
2632
|
+
{
|
|
2633
|
+
"match": "[\\w&&[^0-9]]\\w{0,31}",
|
|
2634
|
+
"name": "variable.parameter.function.stata"
|
|
2635
|
+
},
|
|
2636
|
+
{
|
|
2637
|
+
"include": "#comments-triple-slash"
|
|
2638
|
+
}
|
|
2639
|
+
]
|
|
2640
|
+
},
|
|
2641
|
+
"4": {
|
|
2642
|
+
"name": "punctuation.definition.variable.begin.stata"
|
|
2643
|
+
},
|
|
2644
|
+
"5": {
|
|
2645
|
+
"name": "punctuation.definition.string.begin.stata"
|
|
2646
|
+
},
|
|
2647
|
+
"6": {
|
|
2648
|
+
"patterns": [
|
|
2649
|
+
{
|
|
2650
|
+
"include": "#unicode-regex-internals"
|
|
2651
|
+
}
|
|
2652
|
+
]
|
|
2653
|
+
},
|
|
2654
|
+
"7": {
|
|
2655
|
+
"name": "punctuation.definition.string.end.stata"
|
|
2656
|
+
},
|
|
2657
|
+
"8": {
|
|
2658
|
+
"name": "invalid.illegal.punctuation.stata"
|
|
2659
|
+
},
|
|
2660
|
+
"9": {
|
|
2661
|
+
"patterns": [
|
|
2662
|
+
{
|
|
2663
|
+
"include": "#constants"
|
|
2664
|
+
},
|
|
2665
|
+
{
|
|
2666
|
+
"match": ",",
|
|
2667
|
+
"name": "punctuation.definition.variable.begin.stata"
|
|
2668
|
+
}
|
|
2669
|
+
]
|
|
2670
|
+
}
|
|
2671
|
+
},
|
|
2672
|
+
"comment": "color regexm with regular quotes i.e. \" ",
|
|
2673
|
+
"match": "\\b(ustrregexm)(\\()([^,]+)(,)\\s*(\")([^\"]+)(\"(')?)([,0-9\\s]*)?\\s*(\\))"
|
|
2674
|
+
},
|
|
2675
|
+
{
|
|
2676
|
+
"captures": {
|
|
2677
|
+
"1": {
|
|
2678
|
+
"name": "support.function.builtin.stata"
|
|
2679
|
+
},
|
|
2680
|
+
"2": {
|
|
2681
|
+
"name": "punctuation.definition.parameters.begin.stata"
|
|
2682
|
+
},
|
|
2683
|
+
"3": {
|
|
2684
|
+
"patterns": [
|
|
2685
|
+
{
|
|
2686
|
+
"include": "#string-compound"
|
|
2687
|
+
},
|
|
2688
|
+
{
|
|
2689
|
+
"include": "#string-regular"
|
|
2690
|
+
},
|
|
2691
|
+
{
|
|
2692
|
+
"include": "#macro-local"
|
|
2693
|
+
},
|
|
2694
|
+
{
|
|
2695
|
+
"include": "#macro-global"
|
|
2696
|
+
},
|
|
2697
|
+
{
|
|
2698
|
+
"include": "#functions"
|
|
2699
|
+
},
|
|
2700
|
+
{
|
|
2701
|
+
"match": "[\\w&&[^0-9]]\\w{0,31}",
|
|
2702
|
+
"name": "variable.parameter.function.stata"
|
|
2703
|
+
},
|
|
2704
|
+
{
|
|
2705
|
+
"include": "#comments-triple-slash"
|
|
2706
|
+
}
|
|
2707
|
+
]
|
|
2708
|
+
},
|
|
2709
|
+
"4": {
|
|
2710
|
+
"name": "punctuation.definition.variable.begin.stata"
|
|
2711
|
+
},
|
|
2712
|
+
"5": {
|
|
2713
|
+
"name": "punctuation.definition.string.begin.stata"
|
|
2714
|
+
},
|
|
2715
|
+
"6": {
|
|
2716
|
+
"patterns": [
|
|
2717
|
+
{
|
|
2718
|
+
"include": "#unicode-regex-internals"
|
|
2719
|
+
}
|
|
2720
|
+
]
|
|
2721
|
+
},
|
|
2722
|
+
"7": {
|
|
2723
|
+
"name": "punctuation.definition.string.end.stata"
|
|
2724
|
+
},
|
|
2725
|
+
"8": {
|
|
2726
|
+
"patterns": [
|
|
2727
|
+
{
|
|
2728
|
+
"include": "#constants"
|
|
2729
|
+
},
|
|
2730
|
+
{
|
|
2731
|
+
"match": ",",
|
|
2732
|
+
"name": "punctuation.definition.variable.begin.stata"
|
|
2733
|
+
}
|
|
2734
|
+
]
|
|
2735
|
+
},
|
|
2736
|
+
"9": {
|
|
2737
|
+
"name": "punctuation.definition.parameters.end.stata"
|
|
2738
|
+
}
|
|
2739
|
+
},
|
|
2740
|
+
"comment": "color regexm with compound quotes",
|
|
2741
|
+
"match": "\\b(ustrregexm)(\\()([^,]+)(,)\\s*(`\")([^\"]+)(\"')([,0-9\\s]*)?\\s*(\\))"
|
|
2742
|
+
},
|
|
2743
|
+
{
|
|
2744
|
+
"captures": {
|
|
2745
|
+
"1": {
|
|
2746
|
+
"name": "support.function.builtin.stata"
|
|
2747
|
+
},
|
|
2748
|
+
"10": {
|
|
2749
|
+
"name": "punctuation.definition.parameters.end.stata"
|
|
2750
|
+
},
|
|
2751
|
+
"2": {
|
|
2752
|
+
"name": "punctuation.definition.parameters.begin.stata"
|
|
2753
|
+
},
|
|
2754
|
+
"3": {
|
|
2755
|
+
"patterns": [
|
|
2756
|
+
{
|
|
2757
|
+
"include": "#string-compound"
|
|
2758
|
+
},
|
|
2759
|
+
{
|
|
2760
|
+
"include": "#string-regular"
|
|
2761
|
+
},
|
|
2762
|
+
{
|
|
2763
|
+
"include": "#macro-local"
|
|
2764
|
+
},
|
|
2765
|
+
{
|
|
2766
|
+
"include": "#macro-global"
|
|
2767
|
+
},
|
|
2768
|
+
{
|
|
2769
|
+
"include": "#functions"
|
|
2770
|
+
},
|
|
2771
|
+
{
|
|
2772
|
+
"match": "[\\w&&[^0-9]]\\w{0,31}",
|
|
2773
|
+
"name": "variable.parameter.function.stata"
|
|
2774
|
+
},
|
|
2775
|
+
{
|
|
2776
|
+
"include": "#comments"
|
|
2777
|
+
}
|
|
2778
|
+
]
|
|
2779
|
+
},
|
|
2780
|
+
"4": {
|
|
2781
|
+
"name": "punctuation.definition.variable.begin.stata"
|
|
2782
|
+
},
|
|
2783
|
+
"5": {
|
|
2784
|
+
"name": "punctuation.definition.string.begin.stata"
|
|
2785
|
+
},
|
|
2786
|
+
"6": {
|
|
2787
|
+
"patterns": [
|
|
2788
|
+
{
|
|
2789
|
+
"include": "#unicode-regex-internals"
|
|
2790
|
+
}
|
|
2791
|
+
]
|
|
2792
|
+
},
|
|
2793
|
+
"7": {
|
|
2794
|
+
"name": "punctuation.definition.string.end.stata"
|
|
2795
|
+
},
|
|
2796
|
+
"8": {
|
|
2797
|
+
"name": "invalid.illegal.punctuation.stata"
|
|
2798
|
+
},
|
|
2799
|
+
"9": {
|
|
2800
|
+
"patterns": [
|
|
2801
|
+
{
|
|
2802
|
+
"match": ",",
|
|
2803
|
+
"name": "punctuation.definition.variable.begin.stata"
|
|
2804
|
+
},
|
|
2805
|
+
{
|
|
2806
|
+
"include": "#string-compound"
|
|
2807
|
+
},
|
|
2808
|
+
{
|
|
2809
|
+
"include": "#string-regular"
|
|
2810
|
+
},
|
|
2811
|
+
{
|
|
2812
|
+
"include": "#macro-local"
|
|
2813
|
+
},
|
|
2814
|
+
{
|
|
2815
|
+
"include": "#macro-global"
|
|
2816
|
+
},
|
|
2817
|
+
{
|
|
2818
|
+
"include": "#functions"
|
|
2819
|
+
},
|
|
2820
|
+
{
|
|
2821
|
+
"match": "[\\w&&[^0-9]]\\w{0,31}",
|
|
2822
|
+
"name": "variable.parameter.function.stata"
|
|
2823
|
+
},
|
|
2824
|
+
{
|
|
2825
|
+
"include": "#comments-triple-slash"
|
|
2826
|
+
},
|
|
2827
|
+
{
|
|
2828
|
+
"include": "#constants"
|
|
2829
|
+
}
|
|
2830
|
+
]
|
|
2831
|
+
}
|
|
2832
|
+
},
|
|
2833
|
+
"comment": "color regexr with regular quotes i.e. \" ",
|
|
2834
|
+
"match": "\\b(ustrregexrf|ustrregexra)(\\()([^,]+)(,)\\s*(\")([^\"]+)(\"(')?)\\s*([^\\)]*)(\\))"
|
|
2835
|
+
},
|
|
2836
|
+
{
|
|
2837
|
+
"captures": {
|
|
2838
|
+
"1": {
|
|
2839
|
+
"name": "support.function.builtin.stata"
|
|
2840
|
+
},
|
|
2841
|
+
"2": {
|
|
2842
|
+
"name": "punctuation.definition.parameters.begin.stata"
|
|
2843
|
+
},
|
|
2844
|
+
"3": {
|
|
2845
|
+
"patterns": [
|
|
2846
|
+
{
|
|
2847
|
+
"include": "#string-compound"
|
|
2848
|
+
},
|
|
2849
|
+
{
|
|
2850
|
+
"include": "#string-regular"
|
|
2851
|
+
},
|
|
2852
|
+
{
|
|
2853
|
+
"include": "#macro-local"
|
|
2854
|
+
},
|
|
2855
|
+
{
|
|
2856
|
+
"include": "#macro-global"
|
|
2857
|
+
},
|
|
2858
|
+
{
|
|
2859
|
+
"include": "#functions"
|
|
2860
|
+
},
|
|
2861
|
+
{
|
|
2862
|
+
"match": "[\\w&&[^0-9]]\\w{0,31}",
|
|
2863
|
+
"name": "variable.parameter.function.stata"
|
|
2864
|
+
},
|
|
2865
|
+
{
|
|
2866
|
+
"include": "#comments"
|
|
2867
|
+
}
|
|
2868
|
+
]
|
|
2869
|
+
},
|
|
2870
|
+
"4": {
|
|
2871
|
+
"name": "punctuation.definition.variable.begin.stata"
|
|
2872
|
+
},
|
|
2873
|
+
"5": {
|
|
2874
|
+
"name": "punctuation.definition.string.begin.stata"
|
|
2875
|
+
},
|
|
2876
|
+
"6": {
|
|
2877
|
+
"patterns": [
|
|
2878
|
+
{
|
|
2879
|
+
"include": "#unicode-regex-internals"
|
|
2880
|
+
}
|
|
2881
|
+
]
|
|
2882
|
+
},
|
|
2883
|
+
"7": {
|
|
2884
|
+
"name": "punctuation.definition.string.end.stata"
|
|
2885
|
+
},
|
|
2886
|
+
"8": {
|
|
2887
|
+
"patterns": [
|
|
2888
|
+
{
|
|
2889
|
+
"match": ",",
|
|
2890
|
+
"name": "punctuation.definition.variable.begin.stata"
|
|
2891
|
+
},
|
|
2892
|
+
{
|
|
2893
|
+
"include": "#string-compound"
|
|
2894
|
+
},
|
|
2895
|
+
{
|
|
2896
|
+
"include": "#string-regular"
|
|
2897
|
+
},
|
|
2898
|
+
{
|
|
2899
|
+
"include": "#macro-local"
|
|
2900
|
+
},
|
|
2901
|
+
{
|
|
2902
|
+
"include": "#macro-global"
|
|
2903
|
+
},
|
|
2904
|
+
{
|
|
2905
|
+
"include": "#functions"
|
|
2906
|
+
},
|
|
2907
|
+
{
|
|
2908
|
+
"match": "[\\w&&[^0-9]]\\w{0,31}",
|
|
2909
|
+
"name": "variable.parameter.function.stata"
|
|
2910
|
+
},
|
|
2911
|
+
{
|
|
2912
|
+
"include": "#comments-triple-slash"
|
|
2913
|
+
},
|
|
2914
|
+
{
|
|
2915
|
+
"include": "#constants"
|
|
2916
|
+
}
|
|
2917
|
+
]
|
|
2918
|
+
},
|
|
2919
|
+
"9": {
|
|
2920
|
+
"name": "punctuation.definition.parameters.end.stata"
|
|
2921
|
+
}
|
|
2922
|
+
},
|
|
2923
|
+
"comment": "color regexr with compound quotes i.e. `\"text\"' ",
|
|
2924
|
+
"match": "\\b(ustrregexrf|ustrregexra)(\\()([^,]+)(,)\\s*(`\")([^\"]+)(\"')\\s*([^\\)]*)(\\))"
|
|
2925
|
+
}
|
|
2926
|
+
]
|
|
2927
|
+
},
|
|
2928
|
+
"unicode-regex-internals": {
|
|
2929
|
+
"patterns": [
|
|
2930
|
+
{
|
|
2931
|
+
"match": "\\\\[bBAZzG]|\\^",
|
|
2932
|
+
"name": "keyword.control.anchor.stata"
|
|
2933
|
+
},
|
|
2934
|
+
{
|
|
2935
|
+
"comment": "matched when not a global",
|
|
2936
|
+
"match": "\\$(?![[\\w&&[^0-9_]][\\w]{0,31}|_[\\w]{1,31}\\{])",
|
|
2937
|
+
"name": "keyword.control.anchor.stata"
|
|
2938
|
+
},
|
|
2939
|
+
{
|
|
2940
|
+
"match": "\\\\[1-9][0-9]?",
|
|
2941
|
+
"name": "keyword.other.back-reference.stata"
|
|
2942
|
+
},
|
|
2943
|
+
{
|
|
2944
|
+
"match": "[?+*][?+]?|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??",
|
|
2945
|
+
"name": "keyword.operator.quantifier.stata"
|
|
2946
|
+
},
|
|
2947
|
+
{
|
|
2948
|
+
"match": "\\|",
|
|
2949
|
+
"name": "keyword.operator.or.stata"
|
|
2950
|
+
},
|
|
2951
|
+
{
|
|
2952
|
+
"begin": "\\((?!\\?\\#|\\?=|\\?!|\\?<=|\\?<!)",
|
|
2953
|
+
"end": "\\)",
|
|
2954
|
+
"name": "keyword.operator.group.stata",
|
|
2955
|
+
"patterns": [
|
|
2956
|
+
{
|
|
2957
|
+
"include": "#unicode-regex-internals"
|
|
2958
|
+
}
|
|
2959
|
+
]
|
|
2960
|
+
},
|
|
2961
|
+
{
|
|
2962
|
+
"begin": "\\(\\?\\#",
|
|
2963
|
+
"end": "\\)",
|
|
2964
|
+
"name": "comment.block.stata"
|
|
2965
|
+
},
|
|
2966
|
+
{
|
|
2967
|
+
"comment": "We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.",
|
|
2968
|
+
"match": "(?<=^|\\s)#\\s[[a-zA-Z0-9,. \\t?!-:][^\\x{00}-\\x{7F}]]*$",
|
|
2969
|
+
"name": "comment.line.number-sign.stata"
|
|
2970
|
+
},
|
|
2971
|
+
{
|
|
2972
|
+
"match": "\\(\\?[iLmsux]+\\)",
|
|
2973
|
+
"name": "keyword.other.option-toggle.stata"
|
|
2974
|
+
},
|
|
2975
|
+
{
|
|
2976
|
+
"begin": "(\\()((\\?=)|(\\?!)|(\\?<=)|(\\?<!))",
|
|
2977
|
+
"beginCaptures": {
|
|
2978
|
+
"1": {
|
|
2979
|
+
"name": "keyword.operator.group.stata"
|
|
2980
|
+
},
|
|
2981
|
+
"2": {
|
|
2982
|
+
"name": "punctuation.definition.group.assertion.stata"
|
|
2983
|
+
},
|
|
2984
|
+
"3": {
|
|
2985
|
+
"name": "keyword.assertion.look-ahead.stata"
|
|
2986
|
+
},
|
|
2987
|
+
"4": {
|
|
2988
|
+
"name": "keyword.assertion.negative-look-ahead.stata"
|
|
2989
|
+
},
|
|
2990
|
+
"5": {
|
|
2991
|
+
"name": "keyword.assertion.look-behind.stata"
|
|
2992
|
+
},
|
|
2993
|
+
"6": {
|
|
2994
|
+
"name": "keyword.assertion.negative-look-behind.stata"
|
|
2995
|
+
}
|
|
2996
|
+
},
|
|
2997
|
+
"end": "(\\))",
|
|
2998
|
+
"endCaptures": {
|
|
2999
|
+
"1": {
|
|
3000
|
+
"name": "keyword.operator.group.stata"
|
|
3001
|
+
}
|
|
3002
|
+
},
|
|
3003
|
+
"name": "meta.group.assertion.stata",
|
|
3004
|
+
"patterns": [
|
|
3005
|
+
{
|
|
3006
|
+
"include": "#unicode-regex-internals"
|
|
3007
|
+
}
|
|
3008
|
+
]
|
|
3009
|
+
},
|
|
3010
|
+
{
|
|
3011
|
+
"begin": "(\\()(\\?\\(([1-9][0-9]?|[a-zA-Z_][a-zA-Z_0-9]*)\\))",
|
|
3012
|
+
"beginCaptures": {
|
|
3013
|
+
"1": {
|
|
3014
|
+
"name": "punctuation.definition.group.stata"
|
|
3015
|
+
},
|
|
3016
|
+
"2": {
|
|
3017
|
+
"name": "punctuation.definition.group.assertion.conditional.stata"
|
|
3018
|
+
},
|
|
3019
|
+
"3": {
|
|
3020
|
+
"name": "entity.name.section.back-reference.stata"
|
|
3021
|
+
}
|
|
3022
|
+
},
|
|
3023
|
+
"comment": "we can make this more sophisticated to match the | character that separates yes-pattern from no-pattern, but it's not really necessary.",
|
|
3024
|
+
"end": "(\\))",
|
|
3025
|
+
"name": "meta.group.assertion.conditional.stata",
|
|
3026
|
+
"patterns": [
|
|
3027
|
+
{
|
|
3028
|
+
"include": "#unicode-regex-internals"
|
|
3029
|
+
}
|
|
3030
|
+
]
|
|
3031
|
+
},
|
|
3032
|
+
{
|
|
3033
|
+
"include": "#unicode-regex-character-class"
|
|
3034
|
+
},
|
|
3035
|
+
{
|
|
3036
|
+
"include": "#macro-local"
|
|
3037
|
+
},
|
|
3038
|
+
{
|
|
3039
|
+
"include": "#macro-global"
|
|
3040
|
+
},
|
|
3041
|
+
{
|
|
3042
|
+
"comment": "NOTE: Error if I have .+ No idea why but it works fine it seems with just .",
|
|
3043
|
+
"match": ".",
|
|
3044
|
+
"name": "string.quoted.stata"
|
|
3045
|
+
}
|
|
3046
|
+
]
|
|
3047
|
+
}
|
|
3048
|
+
},
|
|
3049
|
+
"scopeName": "source.stata"
|
|
3050
|
+
}
|