github-linguist 4.8.6 → 4.8.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ca4e4876f8d94c20d5a03b0c90609345a63e77bf
4
- data.tar.gz: 048162073e84b93bf0eb8ca3a9e644ff811e7470
3
+ metadata.gz: 197e24227275debd6a5751caf11979e6008f61f9
4
+ data.tar.gz: 1ad5b389ed31f4321277dab8c583de38928f8100
5
5
  SHA512:
6
- metadata.gz: e9028d1d1f8a8651bf74cf12e87b9d6565e4030d57736064ba6af9ce2ab1af2fa17cf2ad0baa49aef3c2b78acbce6f9da2572b99387c7a8ab720487dc9650eeb
7
- data.tar.gz: 7c3523595dff24dd8e840d6061fd748e9af5098acedcce01857991bcbd982602f0628bf0e6b3081d0dbb23407f3b53c5960d1ec884c8f0efdeedd07a0e4639e3
6
+ metadata.gz: 477ca1aa713cd520a7892792d9f5882352b105880050daace210a2bd82b9f3307cbd28efd0000580fa09be0d2a8f73d4ddfb14adb28f127a29d88f2233a9e178
7
+ data.tar.gz: 409d7741fad3830d6df8b737800263ae606a9e9dd6f8c39fba2927a8dfcb4ddeeb92314236b49b6405fb12ff786fe843dce3b45b02956c8c57307dcbb125188c
@@ -5,7 +5,7 @@
5
5
  "apl",
6
6
  "dyalog"
7
7
  ],
8
- "firstLineMatch": "^#!.*\\b(apl|dyalog)",
8
+ "firstLineMatch": "^#!.*\\b(apl|dyalog)|⍝|(?i:-\\*-[^*]*(mode:\\s*)?apl(\\s*;.*?)?\\s*-\\*-|(?:vim?|ex):\\s*(?:set?.*\\s)?(?:syntax|filetype|ft)=apl\\s?(?:.*:)?)",
9
9
  "foldingStartMarker": "\\{",
10
10
  "foldingStopMarker": "\\}",
11
11
  "patterns": [
@@ -0,0 +1,204 @@
1
+ {
2
+ "name": "Clean",
3
+ "scopeName": "source.clean",
4
+ "fileTypes": [
5
+ "icl",
6
+ "dcl"
7
+ ],
8
+ "firstLineMatch": "^(definition|implementation|system) module",
9
+ "patterns": [
10
+ {
11
+ "include": "#marks"
12
+ },
13
+ {
14
+ "include": "#comments"
15
+ },
16
+ {
17
+ "include": "#keywords"
18
+ },
19
+ {
20
+ "include": "#literals"
21
+ },
22
+ {
23
+ "include": "#operators"
24
+ },
25
+ {
26
+ "include": "#delimiters"
27
+ }
28
+ ],
29
+ "repository": {
30
+ "marks": {
31
+ "patterns": [
32
+ {
33
+ "include": "#mark"
34
+ }
35
+ ]
36
+ },
37
+ "mark": {
38
+ "name": "markup.heading.clean",
39
+ "begin": "/// #+ ",
40
+ "end": "$",
41
+ "beginCaptures": {
42
+ "0": {
43
+ "name": "punctuation.definition.comment.clean"
44
+ }
45
+ }
46
+ },
47
+ "comments": {
48
+ "patterns": [
49
+ {
50
+ "include": "#commentBlock"
51
+ },
52
+ {
53
+ "include": "#commentLine"
54
+ }
55
+ ]
56
+ },
57
+ "commentBlock": {
58
+ "name": "comment.block.clean",
59
+ "begin": "/\\*",
60
+ "end": "\\*/",
61
+ "beginCaptures": {
62
+ "0": {
63
+ "name": "punctuation.definition.comment.begin.clean"
64
+ }
65
+ },
66
+ "endCaptures": {
67
+ "0": {
68
+ "name": "punctuation.definition.comment.end.clean"
69
+ }
70
+ },
71
+ "patterns": [
72
+ {
73
+ "include": "#comment"
74
+ }
75
+ ]
76
+ },
77
+ "commentLine": {
78
+ "name": "comment.line.double-slash.clean",
79
+ "begin": "//",
80
+ "end": "$",
81
+ "beginCaptures": {
82
+ "0": {
83
+ "name": "punctuation.definition.comment.clean"
84
+ }
85
+ }
86
+ },
87
+ "keywords": {
88
+ "patterns": [
89
+ {
90
+ "include": "#keywordGeneral"
91
+ },
92
+ {
93
+ "include": "#keywordImport"
94
+ },
95
+ {
96
+ "include": "#keywordReserved"
97
+ }
98
+ ]
99
+ },
100
+ "keywordGeneral": {
101
+ "name": "keyword.control.clean",
102
+ "match": "\\b(if|let|in|with|where|case|of|class|instance)\\b"
103
+ },
104
+ "keywordImport": {
105
+ "name": "keyword.control.import.clean",
106
+ "match": "\\b(implementation|definition|system|module|from|import|qualified|as)\\b"
107
+ },
108
+ "keywordReserved": {
109
+ "name": "keyword.reserved.clean",
110
+ "match": "\\b(special|code|inline|foreign|export|ccall|stdcall|generic|derive|infixl|infixr)\\b"
111
+ },
112
+ "literals": {
113
+ "patterns": [
114
+ {
115
+ "include": "#literalChar"
116
+ },
117
+ {
118
+ "include": "#literalInt"
119
+ },
120
+ {
121
+ "include": "#literalOct"
122
+ },
123
+ {
124
+ "include": "#literalHex"
125
+ },
126
+ {
127
+ "include": "#literalReal"
128
+ },
129
+ {
130
+ "include": "#literalBool"
131
+ },
132
+ {
133
+ "include": "#literalString"
134
+ }
135
+ ]
136
+ },
137
+ "literalChar": {
138
+ "name": "constant.character.clean",
139
+ "match": "'.'"
140
+ },
141
+ "literalInt": {
142
+ "name": "constant.numeric.integer.decimal.clean",
143
+ "match": "\\b[+-]?[0-9]+\\b"
144
+ },
145
+ "literalOct": {
146
+ "name": "constant.numeric.integer.octal.clean",
147
+ "match": "\\b0[0-7]+\\b"
148
+ },
149
+ "literalHex": {
150
+ "name": "constant.numeric.integer.hexadecimal.clean",
151
+ "match": "\\b0x[0-9A-Fa-f]+\\b"
152
+ },
153
+ "literalReal": {
154
+ "name": "constant.numeric.float.clean",
155
+ "match": "\\b[+-]?[0-9]+\\.[0-9]+([eE][+-]?[0-9]+)?\\b"
156
+ },
157
+ "literalBool": {
158
+ "name": "constant.language.boolean.clean",
159
+ "match": "\\b(True|False)\\b"
160
+ },
161
+ "literalString": {
162
+ "name": "string.quoted.double.clean",
163
+ "begin": "\"",
164
+ "end": "\"",
165
+ "beginCaptures": {
166
+ "0": {
167
+ "name": "punctuation.definition.string.begin.swift"
168
+ }
169
+ },
170
+ "endCaptures": {
171
+ "0": {
172
+ "name": "punctuation.definition.string.end.swift"
173
+ }
174
+ },
175
+ "patterns": [
176
+ {
177
+ "include": "#escaped_character"
178
+ }
179
+ ]
180
+ },
181
+ "operators": {
182
+ "patterns": [
183
+ {
184
+ "include": "#operatorGeneral"
185
+ },
186
+ {
187
+ "include": "#operatorComposition"
188
+ }
189
+ ]
190
+ },
191
+ "operatorGeneral": {
192
+ "name": "keyword.operator.clean",
193
+ "match": "[-~@#$%^?!+*<>/|&=:.]+"
194
+ },
195
+ "operatorComposition": {
196
+ "name": "keyword.operator.composition.clean",
197
+ "match": "\\s+o\\s+"
198
+ },
199
+ "delimiters": {
200
+ "name": "punctuation.separator",
201
+ "match": "[,;(){}]"
202
+ }
203
+ }
204
+ }
@@ -162,10 +162,18 @@
162
162
  }
163
163
  ]
164
164
  },
165
+ "escapeSequences": {
166
+ "patterns": [
167
+ {
168
+ "name": "constant.character.escape.csound",
169
+ "match": "\\\\(?:[abfnrtv\"\\\\]|[0-7]{1,3})"
170
+ }
171
+ ]
172
+ },
165
173
  "labels": {
166
174
  "patterns": [
167
175
  {
168
- "match": "\\b(\\w+)(:)",
176
+ "match": "^[ \\t]*(\\w+)(:)",
169
177
  "captures": {
170
178
  "1": {
171
179
  "name": "entity.name.label.csound"
@@ -223,14 +231,19 @@
223
231
  {
224
232
  "name": "string.braced.csound",
225
233
  "begin": "\\{\\{",
226
- "end": "\\}\\}"
234
+ "end": "\\}\\}",
235
+ "patterns": [
236
+ {
237
+ "include": "#escapeSequences"
238
+ }
239
+ ]
227
240
  },
228
241
  {
229
242
  "name": "keyword.control.csound",
230
243
  "match": "\\b(?:do|else(?:if)?|end(?:if|until)|fi|i(?:f|then)|kthen|od|r(?:ir)?eturn|then|until|while)\\b"
231
244
  },
232
245
  {
233
- "begin": "\\b((?:c(?:g|in?|k|n)goto)|goto|igoto|kgoto|loop_[gl][et]|r(?:einit|igoto)|ti(?:goto|mout))\\b",
246
+ "begin": "\\b((?:c(?:g|in?|k|nk?)goto)|goto|igoto|kgoto|loop_[gl][et]|r(?:einit|igoto)|ti(?:goto|mout))\\b",
234
247
  "beginCaptures": {
235
248
  "1": {
236
249
  "name": "keyword.control.csound"
@@ -362,7 +375,7 @@
362
375
  },
363
376
  {
364
377
  "name": "support.function.csound",
365
- "match": "\\b(ATS(?:add(?:(?:nz)?)|bufread|cross|in(?:fo|terpread)|partialtap|read(?:(?:nz)?)|sinnoi)|FL(?:b(?:ox|ut(?:Bank|ton))|c(?:loseButton|o(?:lor(?:(?:2)?)|unt))|execButton|g(?:etsnap|roup(?:(?:(?:E|_e)nd)?))|h(?:ide|vsBox(?:(?:SetValue)?))|joy|k(?:eyIn|nob)|l(?:abel|oadsnap)|mouse|p(?:a(?:ck(?:(?:(?:E|_e)nd)?)|nel(?:(?:(?:E|_e)nd)?))|rintk(?:(?:2)?))|r(?:oller|un)|s(?:avesnap|croll(?:(?:(?:E|_e)nd)?)|et(?:Align|Box|Color(?:(?:2)?)|Font|Position|S(?:ize|napGroup)|Text(?:(?:Color|(?:Siz|Typ)e)?)|Val(?:(?:(?:(?:_)?)i)?)|snap)|how|lid(?:Bnk(?:(?:2(?:(?:Set(?:(?:k)?))?)|GetHandle|Set(?:(?:k)?))?)|er))|t(?:abs(?:(?:(?:E|_e)nd)?)|ext)|update|v(?:alue|keybd|slidBnk(?:(?:2)?))|xyin)|Mixer(?:Clear|GetLevel|Receive|Se(?:nd|tLevel(?:(?:_i)?)))|OSC(?:init|listen|send)|a(?:bs|ctive|ds(?:r|yn(?:(?:t(?:(?:2)?))?))|ftouch|l(?:pass|wayson)|mp(?:db(?:(?:fs)?)|midi(?:(?:d)?))|r(?:eson(?:(?:k)?)|ray)|tone(?:[kx]?))|b(?:a(?:bo|lance|mboo|rmodel)|bcut[ms]|e(?:(?:tara|xpr)nd)|form(?:dec(?:(?:1)?)|enc(?:(?:1)?))|i(?:nit|quad(?:(?:a)?)|rnd)|qrez|u(?:chla|t(?:b[pr]|hp|lp|t(?:er(?:b[pr]|[hl]p)|on))|zz))|c(?:2r|a(?:basa|uchy(?:(?:i)?))|e(?:il|ll|nt(?:(?:roid)?)|ps)|h(?:an(?:ctrl|ged|[io])|e(?:byshevpoly|ckbox)|n(?:_[Sak]|clear|export|get|mix|params|set)|uap)|l(?:ear|filt|ip|ocko(?:ff|n))|mplxprod|o(?:m(?:b(?:(?:inv)?)|p(?:ile(?:csd|orc|str)|ress))|n(?:nect|trol|v(?:(?:l|olv)e))|py(?:2(?:[ft]tab)|a2ftab|f2array)|s(?:(?:h|inv|seg(?:[br]?))?))|p(?:s(?:2pch|midi(?:(?:b|nn)?)|oct|pch|t(?:mid|un(?:(?:i)?))|xpch)|uprc)|r(?:oss(?:2|fm(?:(?:i|pm(?:(?:i)?))?)|pm(?:(?:i)?))|unch)|t(?:lchn|rl(?:14|21|7|init))|userrnd)|d(?:a(?:m|te(?:(?:s)?))|b(?:(?:(?:(?:fs)?)amp)?)|c(?:block(?:(?:2)?)|onv)|e(?:l(?:ay(?:[1krw]?)|tap(?:(?:xw|[3inx])?))|norm)|i(?:ff|s(?:k(?:grain|in(?:(?:2)?))|p(?:fft|lay)|tort(?:(?:1)?))|vz)|o(?:ppler|wnsamp)|ripwater|u(?:mpk(?:[234]?)|s(?:errnd|t(?:(?:2)?))))|e(?:nvlpx(?:(?:r)?)|phasor|qfil|v(?:alstr|ent(?:(?:_i)?))|x(?:citer|itnow|p(?:(?:curve|on|rand(?:(?:i)?)|seg(?:(?:ba|[abr])?))?)))|f(?:a(?:reylen(?:(?:i)?)|ust(?:audio|c(?:ompile|tl)|gen))|ft(?:(?:inv)?)|i(?:close|l(?:e(?:bit|len|nchnls|peak|sr|valid)|larray|ter2)|n(?:[ik]?)|open)|l(?:a(?:nger|shtxt)|oo(?:per(?:(?:2)?)|r)|uid(?:AllOut|C(?:C[ik]|ontrol)|Engine|Load|Note|Out|ProgramSelect|SetInterpMethod))|m(?:b(?:3|ell)|metal|percfl|(?:rhod|voic|wurli)e)|o(?:f(?:2|ilter)|l(?:d|low(?:(?:2)?))|scil(?:(?:i)?)|ut(?:(?:ir|[ik])?)|[fg])|print(?:(?:(?:k)?)s)|r(?:ac(?:(?:talnoise)?)|eeverb)|t(?:c(?:hnls|onv|ps)|free|gen(?:(?:once|tmp)?)|l(?:en|oad(?:(?:k)?)|ptim)|morf|resize(?:(?:i)?)|s(?:ave(?:(?:k)?)|r)))|g(?:a(?:in(?:(?:slider)?)|uss(?:(?:i|trig)?))|buzz|e(?:n(?:array(?:(?:_i)?)|dy(?:[cx]?))|t(?:c(?:fg|ol)|row))|ogobel|ra(?:in(?:[23]?)|nule)|uiro)|h(?:armon(?:[234]?)|df5(?:read|write)|ilbert|rtf(?:e(?:arly|r)|move(?:(?:2)?)|reverb|stat)|sboscil|vs[123])|i(?:ceps|hold|mage(?:create|free|getpixel|load|s(?:ave|etpixel|ize))|n(?:(?:32|ch|it(?:(?:c(?:14|21|7))?)|let(?:kid|[afkv])|rg|s(?:global|remot)|te(?:g|rp)|value|[hoqstxz])?))|j(?:itter(?:(?:2)?)|spline)|ktableseg|l(?:en(?:array|tab)|fo|i(?:mit|n(?:e(?:(?:n(?:(?:r)?)|to)?)|rand|seg(?:[br]?)))|o(?:cs(?:end|ig)|g(?:(?:10|2|btwo|curve)?)|op(?:seg(?:(?:p)?)|[tx]seg)|renz|scil(?:[3x]?)|w(?:pass2|res(?:(?:x)?)))|p(?:f(?:18|orm|reson)|hasor|interp|oscil(?:(?:sa(?:(?:2)?)|[3a])?)|re(?:ad|son)|s(?:hold(?:(?:p)?)|lot))|ua_ikopcall)|m(?:a(?:ca|dsr|gs|nd(?:[eo]l)|parray(?:(?:_i)?)|rimba|ssign|x(?:_k|a(?:bs(?:(?:accum)?)|ccum|lloc|rray)|tab)|[cx])|clock|delay|e(?:dian(?:(?:k)?)|tro)|i(?:d(?:global|i(?:c(?:14|21|7|h(?:annelaftertouch|n)|ontrolchange|trl)|default|filestatus|in|noteo(?:ff|n(?:cps|key|oct|pch))|o(?:n(?:(?:2)?)|ut)|p(?:gm|itchbend|olyaftertouch|rogramchange)|tempo)|remot)|n(?:(?:a(?:bs(?:(?:accum)?)|ccum|rray)|cer|tab)?)|rror)|o(?:d(?:e|matrix)|nitor|og(?:(?:ladder|vcf(?:(?:2)?))?)|scil)|p(?:3(?:bitrate|in|len|nchnls|sr)|ulse)|rtmsg|u(?:ltitap|te)|xadsr)|n(?:estedap|l(?:alp|filt(?:(?:2)?))|o(?:ise|t(?:eo(?:ff|n(?:(?:dur(?:(?:2)?))?))|num))|r(?:everb|pn)|s(?:amp|t(?:ance|rnum))|trpol)|o(?:ct(?:ave|cps|midi(?:(?:b|nn)?)|pch)|sc(?:bnk|il(?:(?:1i|ikt(?:[ps]?)|[13insx])?))|ut(?:(?:32|ch|i(?:at|c(?:(?:14)?)|p(?:at|[bc]))|k(?:at|c(?:(?:14)?)|p(?:at|[bc]))|let(?:kid|[afkv])|q[1234]|rg|s[12]|value|[choqsxz])?))|p(?:a(?:n(?:(?:2)?)|r(?:eq|ti(?:als|kkel(?:(?:get|s(?:et|ync))?)))|ssign)|c(?:auchy|h(?:bend|midi(?:(?:b|nn)?)|oct)|o(?:nvolve|unt))|d(?:clip|half(?:(?:y)?))|eak|gm(?:(?:assig|ch)n)|h(?:as(?:er[12]|or(?:(?:bnk)?))|s)|i(?:n(?:dex|k(?:er|ish))|tch(?:(?:a(?:c|mdf))?))|l(?:a(?:net|terev)|(?:ltra|u)ck)|o(?:isson|l(?:2rect|y(?:aft|nomial))|p_f|rt(?:(?:k)?)|scil(?:(?:3)?)|w(?:ershape|oftwo)|[pw])|r(?:e(?:alloc|piano)|int(?:(?:_type|f_i|k(?:s2|[2s])|[fks])?)|oduct)|set|t(?:able(?:(?:iw|[3iw])?)|rack)|u(?:sh(?:(?:_f)?)|ts)|v(?:add|bufread|cross|interp|oc|read|s(?:2(?:array|tab)|a(?:dsyn|nal|rp)|b(?:and[pr]|in|lur|uf(?:fer|read(?:(?:2)?)))|c(?:ale|e(?:nt|ps)|ross)|d(?:emix|is(?:kin|p))|envftw|f(?:ilter|r(?:e(?:ad|eze)|omarray)|t[rw]|write)|g(?:ain|endy)|hift|i(?:fd|n(?:(?:fo|it)?))|lock|m(?:aska|ix|o(?:(?:ot|rp)h))|o(?:sc|ut)|pitch|t(?:(?:ana|enci)l)|voc|warp|ynth))|wd|y(?:assign(?:[it]?)|call(?:(?:1[it]|2[it]|3[it]|4[it]|5[it]|6[it]|7[it]|8[it]|ni|[12345678int])?)|e(?:val(?:[it]?)|xec(?:[it]?))|init|l(?:assign(?:[it]?)|call(?:(?:1[it]|2[it]|3[it]|4[it]|5[it]|6[it]|7[it]|8[it]|ni|[12345678int])?)|e(?:val(?:[it]?)|xec(?:[it]?)))))|q(?:inf|nan)|r(?:2c|and(?:(?:om(?:[hi]?)|[hi])?)|bjeq|e(?:ad(?:clock|fi|k[234s]|sc(?:ore|ratch)|[fk])|ct2pol|init|lease|mo(?:teport|ve)|pluck|s(?:on(?:(?:xk|[krxyz])?)|yn)|verb(?:(?:2|sc)?)|windscore|zzy)|fft|i(?:fft|return)|ms|nd(?:(?:31)?)|ound|spline|tclock)|s(?:16b14|32b14|a(?:mphold|ndpaper)|c(?:a(?:le(?:(?:array|t)?)|n(?:hammer|table|[su]))|hed(?:kwhen(?:(?:named)?)|ule|when))|e(?:ed|kere|mitone|nse(?:(?:key)?)|qtime(?:(?:2)?)|rial(?:Begin|End|Flush|Print|Read|Write(?:(?:_i)?))|t(?:c(?:(?:o|tr)l)|ksmps|row|scorepos))|f(?:i(?:list|nstr(?:(?:3m|[3m])?))|lo(?:ad|oper)|p(?:assign|l(?:ay(?:(?:3m|[3m])?)|ist)|reset))|h(?:aker|ift(?:in|out))|i(?:gn(?:alflowgraph|um)|n(?:(?:h|inv|syn)?))|l(?:eighbells|i(?:cearray|der(?:16(?:(?:f|table(?:(?:f)?))?)|32(?:(?:f|table(?:(?:f)?))?)|64(?:(?:f|table(?:(?:f)?))?)|8(?:(?:f|table(?:(?:f)?))?)|Kawai)))|nd(?:lo(?:ad|op)|warp(?:(?:st)?))|o(?:ck(?:recv(?:(?:s)?)|send(?:(?:s)?))|und(?:in|out(?:(?:s)?)))|p(?:a(?:ce|t3d(?:[it]?))|dist|ec(?:addm|di(?:ff|sp)|filt|hist|ptrk|s(?:cal|um)|trum)|litrig|rintf(?:(?:k)?)|send)|qrt|t(?:a(?:ck|tevar)|ix|r(?:c(?:at(?:(?:k)?)|har(?:(?:k)?)|mp(?:(?:k)?)|py(?:(?:k)?))|e(?:cv|son)|fromurl|get|index(?:(?:k)?)|l(?:en(?:(?:k)?)|ower(?:(?:k)?))|rindex(?:(?:k)?)|s(?:et|ub(?:(?:k)?))|to(?:[dl]k|[dl])|upper(?:(?:k)?))|send)|u(?:binstr(?:(?:init)?)|m(?:(?:array|tab)?))|vfilter|y(?:nc(?:grain|loop|phasor)|stem(?:(?:_i)?)))|t(?:a(?:b(?:2pvs|_i|gen|le(?:(?:3kt|copy|filter(?:(?:i)?)|gpw|i(?:copy|gpw|kt|mix|w)|kt|mix|ng|ra|s(?:eg|huffle(?:(?:i)?))|w(?:a|kt)|x(?:kt|seg)|[3iw])?)|m(?:ap(?:(?:_i)?)|orph(?:(?:ak|[ai])?))|play|rec|s(?:lice|um)|w(?:(?:_i)?))|mbourine|n(?:h|inv(?:(?:2)?))|[bn])|b(?:0_init|1(?:(?:[012345]?)_init|[012345])|2_init|3_init|4_init|5_init|6_init|7_init|8_init|9_init|vcf|[0123456789])|emp(?:est|o(?:(?:(?:sc|v)al)?))|i(?:me(?:dseq|inst[ks]|[ks])|val)|lineto|one(?:[kx]?)|r(?:a(?:dsyn|n(?:dom|seg(?:[br]?)))|cross|filter|highest|i(?:g(?:ger|seq)|rand)|lowest|mix|s(?:cale|(?:hif|pli)t))|urno(?:ff(?:(?:2)?)|n))|u(?:n(?:irand|wrap)|psamp|rd)|v(?:a(?:ctrol|dd(?:(?:_i|v(?:(?:_i)?))?)|get|lpass|set)|bap(?:(?:16|4move|8move|gmove|lsinit|(?:(?:z)?)move|[48gz])?)|c(?:ella|o(?:(?:2(?:(?:(?:f|i(?:f|ni))t)?)|mb|py(?:(?:_i)?))?))|d(?:el(?:_k|ay(?:(?:x(?:w[qs]|[qsw])|[3kx])?))|ivv(?:(?:_i)?))|e(?:cdelay|loc|xp(?:(?:_i|seg|v(?:(?:_i)?))?))|i(?:b(?:es|r(?:(?:ato)?))|ncr)|l(?:i(?:mit|nseg)|owres)|m(?:ap|irror|ult(?:(?:_i|v(?:(?:_i)?))?))|o(?:ice|sim)|p(?:haseseg|o(?:rt|w(?:(?:_i|v(?:(?:_i)?))?))|voc)|rand[hi]|subv(?:(?:_i)?)|tab(?:le(?:1k|w[aik]|[aik])|w[aik]|[aik])|wrap)|w(?:aveset|eibull|g(?:b(?:ow(?:(?:edbar)?)|rass)|clar|flute|pluck(?:(?:2)?)|uide[12])|i(?:i(?:connect|data|range|send)|ndow)|r(?:ap|itescratch)|terrain)|x(?:adsr|in|out|scan(?:map|smap|[su])|tratim|yin)|z(?:a(?:cl|kinit|mod|rg|wm|[rw])|filter2|i(?:wm|[rw])|k(?:cl|mod|wm|[rw]))|[aikp])\\b"
378
+ "match": "\\b(ATS(?:add(?:(?:nz)?)|bufread|cross|in(?:fo|terpread)|partialtap|read(?:(?:nz)?)|sinnoi)|FL(?:b(?:ox|ut(?:Bank|ton))|c(?:loseButton|o(?:lor(?:(?:2)?)|unt))|execButton|g(?:etsnap|roup(?:(?:(?:E|_e)nd)?))|h(?:ide|vsBox(?:(?:SetValue)?))|joy|k(?:eyIn|nob)|l(?:abel|oadsnap)|mouse|p(?:a(?:ck(?:(?:(?:E|_e)nd)?)|nel(?:(?:(?:E|_e)nd)?))|rintk(?:(?:2)?))|r(?:oller|un)|s(?:avesnap|croll(?:(?:(?:E|_e)nd)?)|et(?:Align|Box|Color(?:(?:2)?)|Font|Position|S(?:ize|napGroup)|Text(?:(?:Color|(?:Siz|Typ)e)?)|Val(?:(?:(?:(?:_)?)i)?)|snap)|how|lid(?:Bnk(?:(?:2(?:(?:Set(?:(?:k)?))?)|GetHandle|Set(?:(?:k)?))?)|er))|t(?:abs(?:(?:(?:E|_e)nd)?)|ext)|update|v(?:alue|keybd|slidBnk(?:(?:2)?))|xyin)|Mixer(?:Clear|GetLevel|Receive|Se(?:nd|tLevel(?:(?:_i)?)))|OSC(?:init|listen|send)|a(?:bs|ctive|ds(?:r|yn(?:(?:t(?:(?:2)?))?))|ftouch|l(?:pass|wayson)|mp(?:db(?:(?:fs)?)|midi(?:(?:d)?))|r(?:eson(?:(?:k)?)|ray)|tone(?:(?:[kx])?))|b(?:a(?:bo|lance|mboo|rmodel)|bcut(?:[ms])|e(?:(?:tara|xpr)nd)|form(?:dec(?:(?:1)?)|enc(?:(?:1)?))|i(?:nit|quad(?:(?:a)?)|rnd)|qrez|u(?:chla|t(?:b(?:[pr])|hp|lp|t(?:er(?:b(?:[pr])|(?:[hl])p)|on))|zz))|c(?:2r|a(?:basa|uchy(?:(?:i)?))|e(?:il|ll|nt(?:(?:roid)?)|ps(?:(?:inv)?))|h(?:an(?:ctrl|ged(?:(?:2)?)|[io])|e(?:byshevpoly|ckbox)|n(?:_(?:[Sak])|clear|export|get|mix|params|set)|uap)|l(?:ear|filt|ip|ocko(?:ff|n))|mplxprod|o(?:m(?:b(?:(?:inv)?)|p(?:ile(?:csd|orc|str)|ress(?:(?:2)?)))|n(?:nect|trol|v(?:(?:l|olv)e))|py(?:a2ftab|f2array)|s(?:(?:h|inv|seg(?:(?:[br])?))?))|p(?:s(?:2pch|midi(?:(?:b|nn)?)|oct|pch|t(?:mid|un(?:(?:i)?))|xpch)|uprc)|r(?:oss(?:2|fm(?:(?:i|pm(?:(?:i)?))?)|pm(?:(?:i)?))|unch)|t(?:lchn|rl(?:14|21|7|init))|userrnd)|d(?:a(?:m|te(?:(?:s)?))|b(?:(?:(?:(?:fs)?)amp)?)|c(?:block(?:(?:2)?)|onv)|e(?:l(?:ay(?:(?:[1krw])?)|tap(?:(?:xw|[3inx])?))|norm)|i(?:ff|rectory|s(?:k(?:grain|in(?:(?:2)?))|p(?:fft|lay)|tort(?:(?:1)?))|vz)|o(?:ppler|wnsamp)|ripwater|u(?:mpk(?:(?:[234])?)|s(?:errnd|t(?:(?:2)?))))|e(?:nvlpx(?:(?:r)?)|phasor|qfil|v(?:alstr|ent(?:(?:_i)?))|x(?:citer|itnow|p(?:(?:curve|on|rand(?:(?:i)?)|seg(?:(?:ba|[abr])?))?)))|f(?:a(?:reylen(?:(?:i)?)|ust(?:audio|c(?:ompile|tl)|gen))|ft(?:(?:inv)?)|i(?:close|l(?:e(?:bit|len|nchnls|peak|s(?:cal|r)|valid)|larray|ter2)|n(?:(?:[ik])?)|open)|l(?:a(?:nger|shtxt)|oo(?:per(?:(?:2)?)|r)|uid(?:AllOut|C(?:C(?:[ik])|ontrol)|Engine|Load|Note|Out|ProgramSelect|SetInterpMethod))|m(?:b(?:3|ell)|metal|percfl|(?:rhod|voic|wurli)e)|o(?:f(?:2|ilter)|l(?:d|low(?:(?:2)?))|scil(?:(?:i)?)|ut(?:(?:ir|[ik])?)|[fg])|print(?:(?:(?:k)?)s)|r(?:a(?:c(?:(?:talnoise)?)|mebuffer)|eeverb)|t(?:c(?:hnls|onv|ps)|free|gen(?:(?:once|tmp)?)|l(?:en|oad(?:(?:k)?)|ptim)|morf|resize(?:(?:i)?)|s(?:a(?:mplebank|ve(?:(?:k)?))|r)))|g(?:a(?:in(?:(?:slider)?)|uss(?:(?:i|trig)?))|buzz|e(?:n(?:array(?:(?:_i)?)|dy(?:(?:[cx])?))|t(?:c(?:fg|ol)|row|seed))|ogobel|ra(?:in(?:(?:[23])?)|nule)|uiro)|h(?:armon(?:(?:[234])?)|df5(?:read|write)|ilbert|rtf(?:e(?:arly|r)|move(?:(?:2)?)|reverb|stat)|sboscil|vs(?:[123]))|i(?:hold|mage(?:create|free|getpixel|load|s(?:ave|etpixel|ize))|n(?:(?:32|ch|it(?:(?:c(?:14|21|7))?)|let(?:kid|[afkv])|rg|s(?:global|remot)|te(?:g|rp)|value|[hoqstxz])?))|j(?:itter(?:(?:2)?)|spline)|ktableseg|l(?:enarray|fo|i(?:mit|n(?:e(?:(?:n(?:(?:r)?)|to)?)|rand|seg(?:(?:[br])?)))|o(?:cs(?:end|ig)|g(?:(?:10|2|btwo|curve)?)|op(?:seg(?:(?:p)?)|(?:[tx])seg)|renz|scil(?:(?:[3x])?)|w(?:pass2|res(?:(?:x)?)))|p(?:f(?:18|orm|reson)|hasor|interp|oscil(?:(?:sa(?:(?:2)?)|[3a])?)|re(?:ad|son)|s(?:hold(?:(?:p)?)|lot))|ua_(?:exec|opdef))|m(?:a(?:ca|dsr|gs|nd(?:(?:[eo])l)|parray(?:(?:_i)?)|rimba|ssign|x(?:_k|a(?:bs(?:(?:accum)?)|ccum|lloc|rray))|[cx])|clock|delay|e(?:dian(?:(?:k)?)|tro)|i(?:d(?:global|i(?:c(?:14|21|7|h(?:annelaftertouch|n)|ontrolchange|trl)|default|filestatus|in|noteo(?:ff|n(?:cps|key|oct|pch))|o(?:n(?:(?:2)?)|ut)|p(?:gm|itchbend|olyaftertouch|rogramchange)|tempo)|remot)|n(?:(?:a(?:bs(?:(?:accum)?)|ccum|rray)|cer)?)|rror)|o(?:d(?:e|matrix)|nitor|og(?:(?:ladder(?:(?:2)?)|vcf(?:(?:2)?))?)|scil)|p(?:3(?:bitrate|in|len|nchnls|s(?:cal(?:(?:_(?:check|load(?:(?:2)?)|play(?:(?:2)?)))?)|r))|ulse)|rtmsg|u(?:ltitap|te)|vc(?:hpf|lpf(?:[1234]))|xadsr)|n(?:chnls_hw|estedap|l(?:alp|filt(?:(?:2)?))|o(?:ise|t(?:eo(?:ff|n(?:(?:dur(?:(?:2)?))?))|num))|r(?:everb|pn)|s(?:amp|t(?:ance|rnum))|trpol)|o(?:ct(?:ave|cps|midi(?:(?:b|nn)?)|pch)|labuffer|sc(?:bnk|il(?:(?:1i|ikt(?:(?:[ps])?)|[13insx])?))|ut(?:(?:32|ch|i(?:at|c(?:(?:14)?)|p(?:at|[bc]))|k(?:at|c(?:(?:14)?)|p(?:at|[bc]))|let(?:kid|[afkv])|q(?:[1234])|rg|s(?:[12])|value|[choqsxz])?))|p(?:a(?:n(?:(?:2)?)|r(?:eq|t(?:2txt|i(?:als|kkel(?:(?:get|s(?:et|ync))?))))|ssign|ulstretch)|c(?:auchy|h(?:bend|midi(?:(?:b|nn)?)|oct)|o(?:nvolve|unt))|d(?:clip|half(?:(?:y)?))|eak|gm(?:(?:assig|ch)n)|h(?:as(?:er(?:[12])|or(?:(?:bnk)?))|s)|i(?:n(?:dex|k(?:er|ish))|tch(?:(?:a(?:c|mdf))?))|l(?:a(?:net|terev)|(?:ltra|u)ck)|o(?:isson|l(?:2rect|y(?:aft|nomial))|p_f|rt(?:(?:k)?)|scil(?:(?:3)?)|w(?:ershape|oftwo)|[pw])|r(?:e(?:alloc|piano)|int(?:(?:_type|f_i|k(?:s2|[2s])|[fks])?)|oduct)|set|t(?:able(?:(?:iw|[3iw])?)|rack)|u(?:sh(?:(?:_f)?)|ts)|v(?:add|bufread|cross|interp|oc|read|s(?:2(?:array|tab)|a(?:dsyn|nal|rp)|b(?:and(?:[pr])|in|lur|uf(?:fer|read(?:(?:2)?)))|c(?:ale|e(?:nt|ps)|ross)|d(?:emix|is(?:kin|p))|envftw|f(?:ilter|r(?:e(?:ad|eze)|omarray)|t(?:[rw])|write)|g(?:ain|endy)|hift|i(?:fd|n(?:(?:fo|it)?))|lock|m(?:aska|ix|o(?:(?:ot|rp)h))|o(?:sc|ut)|pitch|t(?:(?:ana|enci)l)|voc|warp|ynth))|wd|y(?:assign(?:(?:[it])?)|call(?:(?:1(?:[it])|2(?:[it])|3(?:[it])|4(?:[it])|5(?:[it])|6(?:[it])|7(?:[it])|8(?:[it])|ni|[12345678int])?)|e(?:val(?:(?:[it])?)|xec(?:(?:[it])?))|init|l(?:assign(?:(?:[it])?)|call(?:(?:1(?:[it])|2(?:[it])|3(?:[it])|4(?:[it])|5(?:[it])|6(?:[it])|7(?:[it])|8(?:[it])|ni|[12345678int])?)|e(?:val(?:(?:[it])?)|xec(?:(?:[it])?))|run(?:(?:[it])?))|run(?:(?:[it])?)))|q(?:inf|nan)|r(?:2c|and(?:(?:om(?:(?:[hi])?)|[hi])?)|bjeq|e(?:ad(?:clock|fi|k(?:[234s])|sc(?:ore|ratch)|[fk])|ct2pol|init|lease|mo(?:teport|ve)|pluck|s(?:on(?:(?:xk|[krxyz])?)|yn)|verb(?:(?:2|sc)?)|windscore|zzy)|fft|ifft|ms|nd(?:(?:31)?)|ound|spline|tclock)|s(?:16b14|32b14|a(?:mphold|ndpaper)|c(?:a(?:le(?:(?:array)?)|n(?:hammer|table|[su]))|hed(?:kwhen(?:(?:named)?)|ule|when)|oreline(?:(?:_i)?))|e(?:ed|kere|mitone|nse(?:(?:key)?)|qtime(?:(?:2)?)|rial(?:Begin|End|Flush|Print|Read|Write(?:(?:_i)?))|t(?:c(?:(?:o|tr)l)|ksmps|row|scorepos))|f(?:i(?:list|nstr(?:(?:3m|[3m])?))|lo(?:ad|oper)|p(?:assign|l(?:ay(?:(?:3m|[3m])?)|ist)|reset))|h(?:aker|ift(?:in|out))|i(?:gn(?:alflowgraph|um)|n(?:(?:h|inv|syn)?))|l(?:eighbells|i(?:cearray|der(?:16(?:(?:f|table(?:(?:f)?))?)|32(?:(?:f|table(?:(?:f)?))?)|64(?:(?:f|table(?:(?:f)?))?)|8(?:(?:f|table(?:(?:f)?))?)|Kawai)))|nd(?:lo(?:ad|op)|warp(?:(?:st)?))|o(?:ck(?:recv(?:(?:s)?)|send(?:(?:s)?))|und(?:in|out(?:(?:s)?)))|p(?:a(?:ce|t3d(?:(?:[it])?))|dist|ec(?:addm|di(?:ff|sp)|filt|hist|ptrk|s(?:cal|um)|trum)|litrig|rintf(?:(?:k)?)|send)|qrt|t(?:a(?:ck|tevar)|ix|r(?:c(?:at(?:(?:k)?)|har(?:(?:k)?)|mp(?:(?:k)?)|py(?:(?:k)?))|e(?:cv|son)|fromurl|get|index(?:(?:k)?)|l(?:en(?:(?:k)?)|ower(?:(?:k)?))|rindex(?:(?:k)?)|s(?:et|ub(?:(?:k)?))|to(?:(?:[dl])k|[dl])|upper(?:(?:k)?))|send)|u(?:binstr(?:(?:init)?)|m(?:(?:array)?))|vfilter|y(?:nc(?:grain|loop|phasor)|stem(?:(?:_i)?)))|t(?:a(?:b(?:2pvs|_i|ifd|le(?:(?:3kt|copy|filter(?:(?:i)?)|gpw|i(?:copy|gpw|kt|mix|w)|kt|mix|ng|ra|s(?:eg|huffle(?:(?:i)?))|w(?:a|kt)|x(?:kt|seg)|[3iw])?)|morph(?:(?:ak|[ai])?)|play|rec|sum|w(?:(?:_i)?))|mbourine|n(?:h|inv(?:(?:2)?))|[bn])|b(?:0_init|1(?:(?:(?:[012345])?)_init|[012345])|2_init|3_init|4_init|5_init|6_init|7_init|8_init|9_init|vcf|[0123456789])|emp(?:est|o(?:(?:(?:sc|v)al)?))|i(?:me(?:dseq|inst(?:[ks])|[ks])|val)|lineto|one(?:(?:[kx])?)|r(?:a(?:dsyn|n(?:dom|seg(?:(?:[br])?)))|cross|filter|highest|i(?:g(?:ger|seq)|rand)|lowest|mix|s(?:cale|(?:hif|pli)t))|urno(?:ff(?:(?:2)?)|n))|u(?:n(?:irand|wrap)|psamp|r(?:andom|d))|v(?:a(?:ctrol|dd(?:(?:_i|v(?:(?:_i)?))?)|get|lpass|set)|bap(?:(?:16|4move|8move|gmove|lsinit|(?:(?:z)?)move|[48gz])?)|c(?:ella|o(?:(?:2(?:(?:(?:f|i(?:f|ni))t)?)|mb|py(?:(?:_i)?))?))|d(?:el(?:_k|ay(?:(?:x(?:w(?:[qs])|[qsw])|[3kx])?))|ivv(?:(?:_i)?))|e(?:cdelay|loc|xp(?:(?:_i|seg|v(?:(?:_i)?))?))|i(?:b(?:es|r(?:(?:ato)?))|ncr)|l(?:i(?:mit|nseg)|owres)|m(?:ap|irror|ult(?:(?:_i|v(?:(?:_i)?))?))|o(?:ice|sim)|p(?:haseseg|o(?:rt|w(?:(?:_i|v(?:(?:_i)?))?))|voc)|rand(?:[hi])|subv(?:(?:_i)?)|tab(?:le(?:1k|w(?:[aik])|[aik])|w(?:[aik])|[aik])|wrap)|w(?:aveset|eibull|g(?:b(?:ow(?:(?:edbar)?)|rass)|clar|flute|pluck(?:(?:2)?)|uide(?:[12]))|i(?:i(?:connect|data|range|send)|ndow)|r(?:ap|itescratch)|terrain)|x(?:adsr|in|out|scan(?:map|smap|[su])|tratim|yin)|z(?:a(?:cl|kinit|mod|rg|wm|[rw])|filter2|i(?:wm|[rw])|k(?:cl|mod|wm|[rw]))|[Saikp])\\b"
366
379
  },
367
380
  {
368
381
  "name": "meta.other.csound",
@@ -374,10 +387,10 @@
374
387
  "patterns": [
375
388
  {
376
389
  "name": "keyword.preprocessor.csound",
377
- "match": "\\#(?:(?:e(?:lse|nd(?:if)?)|i(?:fn?def)|undef)\\b|\\#\\#)|@+[ \\t]*\\d*"
390
+ "match": "\\#(?:e(?:lse\\b|nd(?:if)?\\b)|i(?:fn?def)|undef|\\#\\#)|@+[ \\t]*\\d*"
378
391
  },
379
392
  {
380
- "begin": "\\#include\\b",
393
+ "begin": "\\#include",
381
394
  "beginCaptures": {
382
395
  "0": {
383
396
  "name": "keyword.include.preprocessor.csound"
@@ -406,20 +419,20 @@
406
419
  ]
407
420
  },
408
421
  {
409
- "begin": "\\#[ \\t]*define\\b",
422
+ "begin": "\\#[ \\t]*define",
410
423
  "beginCaptures": {
411
424
  "0": {
412
425
  "name": "keyword.define.preprocessor.csound"
413
426
  }
414
427
  },
415
- "end": "(?<=\\#)",
428
+ "end": "(?<=^\\#)|(?<=[^\\\\]\\#)",
416
429
  "patterns": [
417
430
  {
418
431
  "include": "#commentsAndMacroCalls"
419
432
  },
420
433
  {
421
434
  "name": "entity.name.function.preprocessor.csound",
422
- "match": "\\w+"
435
+ "match": "[a-zA-Z_]\\w*"
423
436
  },
424
437
  {
425
438
  "begin": "\\(",
@@ -438,13 +451,17 @@
438
451
  "name": "punctuation.definition.macro.begin.csound"
439
452
  }
440
453
  },
441
- "end": "\\#",
454
+ "end": "(?<!\\\\)\\#",
442
455
  "endCaptures": {
443
456
  "0": {
444
457
  "name": "punctuation.definition.macro.end.csound"
445
458
  }
446
459
  },
447
460
  "patterns": [
461
+ {
462
+ "name": "constant.character.escape.csound",
463
+ "match": "\\\\\\#"
464
+ },
448
465
  {
449
466
  "include": "$self"
450
467
  }
@@ -479,12 +496,7 @@
479
496
  "match": "%\\d*(\\.\\d+)?[cdhilouxX]"
480
497
  },
481
498
  {
482
- "name": "constant.character.escape.csound",
483
- "match": "%[!%nNrRtT]|[~^]|\\\\(?:\\\\|[aAbBnNrRtT\"]|[0-7]{1,3})"
484
- },
485
- {
486
- "name": "invalid.illegal.unknown-escape.csound",
487
- "match": "\\\\."
499
+ "include": "#escapeSequences"
488
500
  }
489
501
  ]
490
502
  }
@@ -19,6 +19,24 @@
19
19
  {
20
20
  "include": "#comments"
21
21
  },
22
+ {
23
+ "match": "(?x)\n(var)[\\/ ]\n(?:(static|global|tmp|const)\\/)?\n(?:(datum|atom(?:\\/movable)?|obj|mob|turf|area|savefile|list|client|sound|image|database|matrix|regex|exception)\\/)?\n(?:\n\t([a-zA-Z0-9_\\-$]*)\\/\n)*\n\n([A-Za-z0-9]*)\\b",
24
+ "name": "meta.initialization.dm",
25
+ "captures": {
26
+ "1": {
27
+ "name": "storage.type.dm"
28
+ },
29
+ "2": {
30
+ "name": "storage.modifier.dm"
31
+ },
32
+ "3": {
33
+ "name": "storage.type.dm"
34
+ },
35
+ "5": {
36
+ "name": "variable.other.dm"
37
+ }
38
+ }
39
+ },
22
40
  {
23
41
  "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)\\b",
24
42
  "name": "constant.numeric.dm"
@@ -32,7 +50,7 @@
32
50
  "name": "keyword.other.dm"
33
51
  },
34
52
  {
35
- "match": "\\b(var|proc|verb|datum|atom(/movable)?|obj|mob|turf|area|savefile|list|client|sound|image|database|matrix|regex|exception)\\b",
53
+ "match": "\\b(proc|verb|datum|atom(/movable)?|obj|mob|turf|area|savefile|list|client|sound|image|database|matrix|regex|exception)\\b",
36
54
  "name": "storage.type.dm"
37
55
  },
38
56
  {
@@ -44,13 +62,17 @@
44
62
  "name": "variable.language.dm"
45
63
  },
46
64
  {
47
- "match": "\\b(\\s*\\?\\s*|\\s*(>\\s*|\\s*<)(=)?\\s*|\\s*\\.\\s*|\\s*:\\s*|\\s*/(=)?\\s*|\\s*~\\s*|\\s*\\+(\\+|=)?\\s*|\\s*-(-|=)?\\s*|\\s*\\*(\\*|=)?\\s*|\\s*%\\s*|\\s*>>\\s*|\\s*<<\\s*|\\s*=(=)?\\s*|\\s*!(=)?\\s*|\\s*<>\\s*|\\s*&\\s*|\\s*&&\\s*|\\s*\\^\\s*|\\s*\\|\\s*|\\s*\\|\\|\\s*|\\s*to\\s*|\\s*in\\s*|\\s*step\\s*)\\b",
65
+ "match": "(\\?|(>|<)(=)?|\\.|:|/(=)?|~|\\+(\\+|=)?|-(-|=)?|\\*(\\*|=)?|%|>>|<<|=(=)?|!(=)?|<>|&|&&|\\^|\\||\\|\\||\\bto\\b|\\bin\\b|\\bstep\\b)",
48
66
  "name": "keyword.operator.dm"
49
67
  },
50
68
  {
51
69
  "match": "\\b([A-Z_][A-Z_0-9]*)\\b",
52
70
  "name": "constant.language.dm"
53
71
  },
72
+ {
73
+ "match": "\\bnull\\b",
74
+ "name": "constant.language.dm"
75
+ },
54
76
  {
55
77
  "begin": "{\"",
56
78
  "beginCaptures": {
@@ -118,7 +140,7 @@
118
140
  ]
119
141
  },
120
142
  {
121
- "begin": "(?x)\n^\\s* ((\\#)\\s*define) \\s+ # define\n((?<id>[a-zA-Z_][a-zA-Z0-9_]*)) # macro name\n(?:\n\t(\\()\n\t\t(\n\t\t\t\\s* \\g<id> \\s* # first argument\n\t\t\t((,) \\s* \\g<id> \\s*)* # additional arguments\n\t\t\t(?:\\.\\.\\.)? # varargs ellipsis?\n\t\t)\n\t(\\))\n)?",
143
+ "begin": "(?x)\n^\\s* ((\\#)\\s*define) \\s+ # define\n((?<id>[a-zA-Z_][a-zA-Z0-9_]*)) # macro name\n(?:\n\t(\\()\n\t\t(\n\t\t\t\\s* \\g<id> \\s* # first argument\n\t\t\t((,) \\s* \\g<id> \\s*)* # additional arguments\n\t\t\t(?:\\.\\.\\.)? # varargs ellipsis?\n\t\t)\n\t(\\))\n)",
122
144
  "beginCaptures": {
123
145
  "1": {
124
146
  "name": "keyword.control.directive.define.dm"
@@ -150,6 +172,27 @@
150
172
  }
151
173
  ]
152
174
  },
175
+ {
176
+ "begin": "(?x)\n^\\s* ((\\#)\\s*define) \\s+ # define\n((?<id>[a-zA-Z_][a-zA-Z0-9_]*)) # macro name",
177
+ "beginCaptures": {
178
+ "1": {
179
+ "name": "keyword.control.directive.define.dm"
180
+ },
181
+ "2": {
182
+ "name": "punctuation.definition.directive.dm"
183
+ },
184
+ "3": {
185
+ "name": "variable.other.preprocessor.dm"
186
+ }
187
+ },
188
+ "end": "(?=(?://|/\\*))|(?<!\\\\)(?=\\n)",
189
+ "name": "meta.preprocessor.macro.dm",
190
+ "patterns": [
191
+ {
192
+ "include": "$base"
193
+ }
194
+ ]
195
+ },
153
196
  {
154
197
  "begin": "^\\s*(#\\s*(error|warn))\\b",
155
198
  "captures": {
@@ -270,18 +313,6 @@
270
313
  "match": "(?x) (?: (?= \\s ) (?:(?<=else|new|return) | (?<!\\w)) (\\s+))?\n\t\t\t(\\b\n\t\t\t\t(?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate)\\s*\\()(?:(?!NS)[A-Za-z_][A-Za-z0-9_]*+\\b | :: )++ # actual name\n\t\t\t)\n\t\t\t \\s*(\\()",
271
314
  "name": "meta.function-call.dm"
272
315
  },
273
- {
274
- "captures": {
275
- "1": {
276
- "name": "variable.other.dm"
277
- },
278
- "2": {
279
- "name": "punctuation.definition.parameters.dm"
280
- }
281
- },
282
- "match": "(?x)\n\t\t\t\t\t\t\t(?x)\n\t\t\t(?:\n\t\t\t\t\t (?: (?= \\s ) (?<!else|new|return) (?<=\\w)\\s+ # or word + space before name\n\t\t\t\t\t )\n\t\t\t)\n\t\t\t(\n\t\t\t\t(?: [A-Za-z_][A-Za-z0-9_]*+ | :: )++ | # actual name\n\t\t\t\t(?: (?<=operator) (?: [-*&<>=+!]+ | \\(\\) | \\[\\] ) )? # if it is a C++ operator\n\t\t\t)\n\t\t\t \\s*(\\()",
283
- "name": "meta.initialization.dm"
284
- },
285
316
  {
286
317
  "include": "#block"
287
318
  },
@@ -309,7 +340,12 @@
309
340
  }
310
341
  },
311
342
  "end": "\\*/",
312
- "name": "comment.block.dm"
343
+ "name": "comment.block.dm",
344
+ "patterns": [
345
+ {
346
+ "include": "#comments"
347
+ }
348
+ ]
313
349
  },
314
350
  {
315
351
  "match": "\\*/.*\\n",
@@ -589,7 +625,7 @@
589
625
  "string_escaped_char": {
590
626
  "patterns": [
591
627
  {
592
- "match": "(?x)\n\\\\\n(\n\th(?:(?:er|im)self|ers|im)\n\t|([tTsS]?he) # Weird regex to match The, the, She, she and he at once.\n\t|He\n\t|[Hh]is\n\t|[aA]n?\n\t|(?:im)?proper\n\t|\\.\\.\\.\n\t|(?:icon|ref|[Rr]oman)(?=\\[) # Macros which need a [] after them.\n\t|[s<>\"n\\n ]\n)",
628
+ "match": "(?x)\n\\\\\n(\n\th(?:(?:er|im)self|ers|im)\n\t|([tTsS]?he) # Weird regex to match The, the, She, she and he at once.\n\t|He\n\t|[Hh]is\n\t|[aA]n?\n\t|(?:im)?proper\n\t|\\.\\.\\.\n\t|(?:icon|ref|[Rr]oman)(?=\\[) # Macros which need a [] after them.\n\t|[s<>\"n\\n \\[]\n)",
593
629
  "name": "constant.character.escape.dm"
594
630
  },
595
631
  {