monaco-editor11 1.1.7 → 1.1.8
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/dist/abap-CrvW7_qN.mjs +1398 -0
- package/dist/apex-BAOI8p1v.mjs +327 -0
- package/dist/assets/html.worker-C8VxctEJ.js +470 -0
- package/dist/azcli-BlCk_UqW.mjs +68 -0
- package/dist/bat-DPoEelVx.mjs +100 -0
- package/dist/bicep-Cp1F394l.mjs +102 -0
- package/dist/cameligo-CWqtSlQs.mjs +174 -0
- package/dist/clojure-CKBp32Gf.mjs +761 -0
- package/dist/coffee-CDo6vc-J.mjs +232 -0
- package/dist/cpp-DokufPgf.mjs +389 -0
- package/dist/csharp-BQi3szM0.mjs +326 -0
- package/dist/csp-BSGtCCZ-.mjs +53 -0
- package/dist/css-DEPFDJfb.mjs +187 -0
- package/dist/cssMode-BQ5BKBAY.mjs +141 -0
- package/dist/cypher-DAb1vOxS.mjs +263 -0
- package/dist/dart-C8p4jewR.mjs +281 -0
- package/dist/dockerfile-DP0iLFPN.mjs +130 -0
- package/dist/ecl-BDQHA6fi.mjs +456 -0
- package/dist/elixir-D4II6kDM.mjs +569 -0
- package/dist/environment.d.ts +1 -1
- package/dist/flow9-StcnL-VB.mjs +142 -0
- package/dist/freemarker2-6GYcye2r.mjs +982 -0
- package/dist/fsharp-DdUVp3EN.mjs +217 -0
- package/dist/go-D1-I258M.mjs +218 -0
- package/dist/graphql-DWkL3f8U.mjs +151 -0
- package/dist/handlebars-5_7gZ3QS.mjs +412 -0
- package/dist/hcl-D_0MNifv.mjs +183 -0
- package/dist/html-2thNXsIu.mjs +301 -0
- package/dist/htmlMode-Dmqis0oY.mjs +152 -0
- package/dist/index-CiIcpngo.mjs +128785 -0
- package/dist/index.d.ts +1 -7
- package/dist/ini-C4I2-MT7.mjs +71 -0
- package/dist/java-OBvaP_SS.mjs +232 -0
- package/dist/javascript-DGu9heQ1.mjs +70 -0
- package/dist/jsonMode-BHf-60PU.mjs +577 -0
- package/dist/julia-BmDH8Kkf.mjs +511 -0
- package/dist/kotlin-Dhu5AGOD.mjs +252 -0
- package/dist/less-CzmjXREq.mjs +162 -0
- package/dist/lexon-CV2c4pN9.mjs +157 -0
- package/dist/liquid-B6d5eZ0w.mjs +233 -0
- package/dist/lspLanguageFeatures-CQ-4g5T6.mjs +1458 -0
- package/dist/lua-CFY5U8qF.mjs +162 -0
- package/dist/m3-BL_AnZVh.mjs +210 -0
- package/dist/markdown-CWKQPXCv.mjs +229 -0
- package/dist/mdx-Dc2EzqW9.mjs +158 -0
- package/dist/mips-ButYmJ5E.mjs +198 -0
- package/dist/monaco-editor11.css +1 -0
- package/dist/monaco-editor11.es.js +21 -58
- package/dist/monaco-editor11.umd.js +1234 -1
- package/dist/msdax-C3cnXqDh.mjs +375 -0
- package/dist/mysql-YlSHaf6G.mjs +878 -0
- package/dist/objective-c-Dwnlproe.mjs +183 -0
- package/dist/pascal-UzGbSWEN.mjs +251 -0
- package/dist/pascaligo-CslTgu68.mjs +164 -0
- package/dist/perl-oj6r_mgw.mjs +626 -0
- package/dist/pgsql-DSBO0Mev.mjs +851 -0
- package/dist/php-YzCD--7j.mjs +500 -0
- package/dist/pla-CmylB8vQ.mjs +137 -0
- package/dist/postiats-CLFW5gNY.mjs +907 -0
- package/dist/powerquery-CmOWUvlh.mjs +890 -0
- package/dist/powershell-fHQcmBLK.mjs +239 -0
- package/dist/protobuf-p5BArb-9.mjs +420 -0
- package/dist/pug-gVdUDvqf.mjs +402 -0
- package/dist/python-BN7PRYMW.mjs +294 -0
- package/dist/qsharp-DnrWSUlt.mjs +301 -0
- package/dist/r-Cv309K2z.mjs +243 -0
- package/dist/razor-amsYwW3e.mjs +543 -0
- package/dist/redis-DTcS4wMj.mjs +302 -0
- package/dist/redshift-hLxZVESM.mjs +809 -0
- package/dist/restructuredtext-C898lK4f.mjs +174 -0
- package/dist/ruby-CgKtnJIQ.mjs +511 -0
- package/dist/rust-bj8oxVnh.mjs +343 -0
- package/dist/sb-DWynz26l.mjs +115 -0
- package/dist/scala-BL5z1UEd.mjs +370 -0
- package/dist/scheme-DUJsH6VU.mjs +108 -0
- package/dist/scss-CxjmhvaL.mjs +262 -0
- package/dist/shell-D14Zs1dF.mjs +221 -0
- package/dist/solidity-WyRm-BGK.mjs +1367 -0
- package/dist/sophia-CKk-_Oa5.mjs +199 -0
- package/dist/sparql-DHtmINMZ.mjs +201 -0
- package/dist/sql-Dqaj5JHC.mjs +853 -0
- package/dist/st-Bj2IIaop.mjs +416 -0
- package/dist/swift-DwxP72iM.mjs +312 -0
- package/dist/systemverilog-D7wJfuql.mjs +576 -0
- package/dist/tcl-0ApMt-eC.mjs +232 -0
- package/dist/tsMode-CfGJAg8A.mjs +946 -0
- package/dist/twig-DxwbdmvQ.mjs +392 -0
- package/dist/typescript-BkqvjzTg.mjs +336 -0
- package/dist/typespec-Fd-JwSuS.mjs +117 -0
- package/dist/vb-CxuyYE1I.mjs +372 -0
- package/dist/wgsl-DoEGc31J.mjs +439 -0
- package/dist/xml-BE08lKLg.mjs +88 -0
- package/dist/yaml-DaPfb7D4.mjs +199 -0
- package/package.json +2 -2
- package/dist/monacoeditorwork/html.worker.bundle.js +0 -30455
- /package/dist/monacoeditorwork/{editor.worker.bundle.js → editor.worker..bundle.js} +0 -0
|
@@ -0,0 +1,500 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
|
3
|
+
comments: {
|
|
4
|
+
lineComment: "//",
|
|
5
|
+
blockComment: ["/*", "*/"]
|
|
6
|
+
},
|
|
7
|
+
brackets: [
|
|
8
|
+
["{", "}"],
|
|
9
|
+
["[", "]"],
|
|
10
|
+
["(", ")"]
|
|
11
|
+
],
|
|
12
|
+
autoClosingPairs: [
|
|
13
|
+
{ open: "{", close: "}", notIn: ["string"] },
|
|
14
|
+
{ open: "[", close: "]", notIn: ["string"] },
|
|
15
|
+
{ open: "(", close: ")", notIn: ["string"] },
|
|
16
|
+
{ open: '"', close: '"', notIn: ["string"] },
|
|
17
|
+
{ open: "'", close: "'", notIn: ["string", "comment"] }
|
|
18
|
+
],
|
|
19
|
+
folding: {
|
|
20
|
+
markers: {
|
|
21
|
+
start: new RegExp("^\\s*(#|//)region\\b"),
|
|
22
|
+
end: new RegExp("^\\s*(#|//)endregion\\b")
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}, t = {
|
|
26
|
+
defaultToken: "",
|
|
27
|
+
tokenPostfix: "",
|
|
28
|
+
// ignoreCase: true,
|
|
29
|
+
// The main tokenizer for our languages
|
|
30
|
+
tokenizer: {
|
|
31
|
+
root: [
|
|
32
|
+
[/<\?((php)|=)?/, { token: "@rematch", switchTo: "@phpInSimpleState.root" }],
|
|
33
|
+
[/<!DOCTYPE/, "metatag.html", "@doctype"],
|
|
34
|
+
[/<!--/, "comment.html", "@comment"],
|
|
35
|
+
[/(<)(\w+)(\/>)/, ["delimiter.html", "tag.html", "delimiter.html"]],
|
|
36
|
+
[/(<)(script)/, ["delimiter.html", { token: "tag.html", next: "@script" }]],
|
|
37
|
+
[/(<)(style)/, ["delimiter.html", { token: "tag.html", next: "@style" }]],
|
|
38
|
+
[/(<)([:\w]+)/, ["delimiter.html", { token: "tag.html", next: "@otherTag" }]],
|
|
39
|
+
[/(<\/)(\w+)/, ["delimiter.html", { token: "tag.html", next: "@otherTag" }]],
|
|
40
|
+
[/</, "delimiter.html"],
|
|
41
|
+
[/[^<]+/]
|
|
42
|
+
// text
|
|
43
|
+
],
|
|
44
|
+
doctype: [
|
|
45
|
+
[/<\?((php)|=)?/, { token: "@rematch", switchTo: "@phpInSimpleState.comment" }],
|
|
46
|
+
[/[^>]+/, "metatag.content.html"],
|
|
47
|
+
[/>/, "metatag.html", "@pop"]
|
|
48
|
+
],
|
|
49
|
+
comment: [
|
|
50
|
+
[/<\?((php)|=)?/, { token: "@rematch", switchTo: "@phpInSimpleState.comment" }],
|
|
51
|
+
[/-->/, "comment.html", "@pop"],
|
|
52
|
+
[/[^-]+/, "comment.content.html"],
|
|
53
|
+
[/./, "comment.content.html"]
|
|
54
|
+
],
|
|
55
|
+
otherTag: [
|
|
56
|
+
[/<\?((php)|=)?/, { token: "@rematch", switchTo: "@phpInSimpleState.otherTag" }],
|
|
57
|
+
[/\/?>/, "delimiter.html", "@pop"],
|
|
58
|
+
[/"([^"]*)"/, "attribute.value"],
|
|
59
|
+
[/'([^']*)'/, "attribute.value"],
|
|
60
|
+
[/[\w\-]+/, "attribute.name"],
|
|
61
|
+
[/=/, "delimiter"],
|
|
62
|
+
[/[ \t\r\n]+/]
|
|
63
|
+
// whitespace
|
|
64
|
+
],
|
|
65
|
+
// -- BEGIN <script> tags handling
|
|
66
|
+
// After <script
|
|
67
|
+
script: [
|
|
68
|
+
[/<\?((php)|=)?/, { token: "@rematch", switchTo: "@phpInSimpleState.script" }],
|
|
69
|
+
[/type/, "attribute.name", "@scriptAfterType"],
|
|
70
|
+
[/"([^"]*)"/, "attribute.value"],
|
|
71
|
+
[/'([^']*)'/, "attribute.value"],
|
|
72
|
+
[/[\w\-]+/, "attribute.name"],
|
|
73
|
+
[/=/, "delimiter"],
|
|
74
|
+
[
|
|
75
|
+
/>/,
|
|
76
|
+
{
|
|
77
|
+
token: "delimiter.html",
|
|
78
|
+
next: "@scriptEmbedded.text/javascript",
|
|
79
|
+
nextEmbedded: "text/javascript"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
[/[ \t\r\n]+/],
|
|
83
|
+
// whitespace
|
|
84
|
+
[
|
|
85
|
+
/(<\/)(script\s*)(>)/,
|
|
86
|
+
["delimiter.html", "tag.html", { token: "delimiter.html", next: "@pop" }]
|
|
87
|
+
]
|
|
88
|
+
],
|
|
89
|
+
// After <script ... type
|
|
90
|
+
scriptAfterType: [
|
|
91
|
+
[
|
|
92
|
+
/<\?((php)|=)?/,
|
|
93
|
+
{
|
|
94
|
+
token: "@rematch",
|
|
95
|
+
switchTo: "@phpInSimpleState.scriptAfterType"
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
[/=/, "delimiter", "@scriptAfterTypeEquals"],
|
|
99
|
+
[
|
|
100
|
+
/>/,
|
|
101
|
+
{
|
|
102
|
+
token: "delimiter.html",
|
|
103
|
+
next: "@scriptEmbedded.text/javascript",
|
|
104
|
+
nextEmbedded: "text/javascript"
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
// cover invalid e.g. <script type>
|
|
108
|
+
[/[ \t\r\n]+/],
|
|
109
|
+
// whitespace
|
|
110
|
+
[/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
|
|
111
|
+
],
|
|
112
|
+
// After <script ... type =
|
|
113
|
+
scriptAfterTypeEquals: [
|
|
114
|
+
[
|
|
115
|
+
/<\?((php)|=)?/,
|
|
116
|
+
{
|
|
117
|
+
token: "@rematch",
|
|
118
|
+
switchTo: "@phpInSimpleState.scriptAfterTypeEquals"
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
[
|
|
122
|
+
/"([^"]*)"/,
|
|
123
|
+
{
|
|
124
|
+
token: "attribute.value",
|
|
125
|
+
switchTo: "@scriptWithCustomType.$1"
|
|
126
|
+
}
|
|
127
|
+
],
|
|
128
|
+
[
|
|
129
|
+
/'([^']*)'/,
|
|
130
|
+
{
|
|
131
|
+
token: "attribute.value",
|
|
132
|
+
switchTo: "@scriptWithCustomType.$1"
|
|
133
|
+
}
|
|
134
|
+
],
|
|
135
|
+
[
|
|
136
|
+
/>/,
|
|
137
|
+
{
|
|
138
|
+
token: "delimiter.html",
|
|
139
|
+
next: "@scriptEmbedded.text/javascript",
|
|
140
|
+
nextEmbedded: "text/javascript"
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
// cover invalid e.g. <script type=>
|
|
144
|
+
[/[ \t\r\n]+/],
|
|
145
|
+
// whitespace
|
|
146
|
+
[/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
|
|
147
|
+
],
|
|
148
|
+
// After <script ... type = $S2
|
|
149
|
+
scriptWithCustomType: [
|
|
150
|
+
[
|
|
151
|
+
/<\?((php)|=)?/,
|
|
152
|
+
{
|
|
153
|
+
token: "@rematch",
|
|
154
|
+
switchTo: "@phpInSimpleState.scriptWithCustomType.$S2"
|
|
155
|
+
}
|
|
156
|
+
],
|
|
157
|
+
[
|
|
158
|
+
/>/,
|
|
159
|
+
{
|
|
160
|
+
token: "delimiter.html",
|
|
161
|
+
next: "@scriptEmbedded.$S2",
|
|
162
|
+
nextEmbedded: "$S2"
|
|
163
|
+
}
|
|
164
|
+
],
|
|
165
|
+
[/"([^"]*)"/, "attribute.value"],
|
|
166
|
+
[/'([^']*)'/, "attribute.value"],
|
|
167
|
+
[/[\w\-]+/, "attribute.name"],
|
|
168
|
+
[/=/, "delimiter"],
|
|
169
|
+
[/[ \t\r\n]+/],
|
|
170
|
+
// whitespace
|
|
171
|
+
[/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
|
|
172
|
+
],
|
|
173
|
+
scriptEmbedded: [
|
|
174
|
+
[
|
|
175
|
+
/<\?((php)|=)?/,
|
|
176
|
+
{
|
|
177
|
+
token: "@rematch",
|
|
178
|
+
switchTo: "@phpInEmbeddedState.scriptEmbedded.$S2",
|
|
179
|
+
nextEmbedded: "@pop"
|
|
180
|
+
}
|
|
181
|
+
],
|
|
182
|
+
[/<\/script/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }]
|
|
183
|
+
],
|
|
184
|
+
// -- END <script> tags handling
|
|
185
|
+
// -- BEGIN <style> tags handling
|
|
186
|
+
// After <style
|
|
187
|
+
style: [
|
|
188
|
+
[/<\?((php)|=)?/, { token: "@rematch", switchTo: "@phpInSimpleState.style" }],
|
|
189
|
+
[/type/, "attribute.name", "@styleAfterType"],
|
|
190
|
+
[/"([^"]*)"/, "attribute.value"],
|
|
191
|
+
[/'([^']*)'/, "attribute.value"],
|
|
192
|
+
[/[\w\-]+/, "attribute.name"],
|
|
193
|
+
[/=/, "delimiter"],
|
|
194
|
+
[
|
|
195
|
+
/>/,
|
|
196
|
+
{
|
|
197
|
+
token: "delimiter.html",
|
|
198
|
+
next: "@styleEmbedded.text/css",
|
|
199
|
+
nextEmbedded: "text/css"
|
|
200
|
+
}
|
|
201
|
+
],
|
|
202
|
+
[/[ \t\r\n]+/],
|
|
203
|
+
// whitespace
|
|
204
|
+
[
|
|
205
|
+
/(<\/)(style\s*)(>)/,
|
|
206
|
+
["delimiter.html", "tag.html", { token: "delimiter.html", next: "@pop" }]
|
|
207
|
+
]
|
|
208
|
+
],
|
|
209
|
+
// After <style ... type
|
|
210
|
+
styleAfterType: [
|
|
211
|
+
[
|
|
212
|
+
/<\?((php)|=)?/,
|
|
213
|
+
{
|
|
214
|
+
token: "@rematch",
|
|
215
|
+
switchTo: "@phpInSimpleState.styleAfterType"
|
|
216
|
+
}
|
|
217
|
+
],
|
|
218
|
+
[/=/, "delimiter", "@styleAfterTypeEquals"],
|
|
219
|
+
[
|
|
220
|
+
/>/,
|
|
221
|
+
{
|
|
222
|
+
token: "delimiter.html",
|
|
223
|
+
next: "@styleEmbedded.text/css",
|
|
224
|
+
nextEmbedded: "text/css"
|
|
225
|
+
}
|
|
226
|
+
],
|
|
227
|
+
// cover invalid e.g. <style type>
|
|
228
|
+
[/[ \t\r\n]+/],
|
|
229
|
+
// whitespace
|
|
230
|
+
[/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
|
|
231
|
+
],
|
|
232
|
+
// After <style ... type =
|
|
233
|
+
styleAfterTypeEquals: [
|
|
234
|
+
[
|
|
235
|
+
/<\?((php)|=)?/,
|
|
236
|
+
{
|
|
237
|
+
token: "@rematch",
|
|
238
|
+
switchTo: "@phpInSimpleState.styleAfterTypeEquals"
|
|
239
|
+
}
|
|
240
|
+
],
|
|
241
|
+
[
|
|
242
|
+
/"([^"]*)"/,
|
|
243
|
+
{
|
|
244
|
+
token: "attribute.value",
|
|
245
|
+
switchTo: "@styleWithCustomType.$1"
|
|
246
|
+
}
|
|
247
|
+
],
|
|
248
|
+
[
|
|
249
|
+
/'([^']*)'/,
|
|
250
|
+
{
|
|
251
|
+
token: "attribute.value",
|
|
252
|
+
switchTo: "@styleWithCustomType.$1"
|
|
253
|
+
}
|
|
254
|
+
],
|
|
255
|
+
[
|
|
256
|
+
/>/,
|
|
257
|
+
{
|
|
258
|
+
token: "delimiter.html",
|
|
259
|
+
next: "@styleEmbedded.text/css",
|
|
260
|
+
nextEmbedded: "text/css"
|
|
261
|
+
}
|
|
262
|
+
],
|
|
263
|
+
// cover invalid e.g. <style type=>
|
|
264
|
+
[/[ \t\r\n]+/],
|
|
265
|
+
// whitespace
|
|
266
|
+
[/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
|
|
267
|
+
],
|
|
268
|
+
// After <style ... type = $S2
|
|
269
|
+
styleWithCustomType: [
|
|
270
|
+
[
|
|
271
|
+
/<\?((php)|=)?/,
|
|
272
|
+
{
|
|
273
|
+
token: "@rematch",
|
|
274
|
+
switchTo: "@phpInSimpleState.styleWithCustomType.$S2"
|
|
275
|
+
}
|
|
276
|
+
],
|
|
277
|
+
[
|
|
278
|
+
/>/,
|
|
279
|
+
{
|
|
280
|
+
token: "delimiter.html",
|
|
281
|
+
next: "@styleEmbedded.$S2",
|
|
282
|
+
nextEmbedded: "$S2"
|
|
283
|
+
}
|
|
284
|
+
],
|
|
285
|
+
[/"([^"]*)"/, "attribute.value"],
|
|
286
|
+
[/'([^']*)'/, "attribute.value"],
|
|
287
|
+
[/[\w\-]+/, "attribute.name"],
|
|
288
|
+
[/=/, "delimiter"],
|
|
289
|
+
[/[ \t\r\n]+/],
|
|
290
|
+
// whitespace
|
|
291
|
+
[/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
|
|
292
|
+
],
|
|
293
|
+
styleEmbedded: [
|
|
294
|
+
[
|
|
295
|
+
/<\?((php)|=)?/,
|
|
296
|
+
{
|
|
297
|
+
token: "@rematch",
|
|
298
|
+
switchTo: "@phpInEmbeddedState.styleEmbedded.$S2",
|
|
299
|
+
nextEmbedded: "@pop"
|
|
300
|
+
}
|
|
301
|
+
],
|
|
302
|
+
[/<\/style/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }]
|
|
303
|
+
],
|
|
304
|
+
// -- END <style> tags handling
|
|
305
|
+
phpInSimpleState: [
|
|
306
|
+
[/<\?((php)|=)?/, "metatag.php"],
|
|
307
|
+
[/\?>/, { token: "metatag.php", switchTo: "@$S2.$S3" }],
|
|
308
|
+
{ include: "phpRoot" }
|
|
309
|
+
],
|
|
310
|
+
phpInEmbeddedState: [
|
|
311
|
+
[/<\?((php)|=)?/, "metatag.php"],
|
|
312
|
+
[
|
|
313
|
+
/\?>/,
|
|
314
|
+
{
|
|
315
|
+
token: "metatag.php",
|
|
316
|
+
switchTo: "@$S2.$S3",
|
|
317
|
+
nextEmbedded: "$S3"
|
|
318
|
+
}
|
|
319
|
+
],
|
|
320
|
+
{ include: "phpRoot" }
|
|
321
|
+
],
|
|
322
|
+
phpRoot: [
|
|
323
|
+
[
|
|
324
|
+
/[a-zA-Z_]\w*/,
|
|
325
|
+
{
|
|
326
|
+
cases: {
|
|
327
|
+
"@phpKeywords": { token: "keyword.php" },
|
|
328
|
+
"@phpCompileTimeConstants": { token: "constant.php" },
|
|
329
|
+
"@default": "identifier.php"
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
],
|
|
333
|
+
[
|
|
334
|
+
/[$a-zA-Z_]\w*/,
|
|
335
|
+
{
|
|
336
|
+
cases: {
|
|
337
|
+
"@phpPreDefinedVariables": {
|
|
338
|
+
token: "variable.predefined.php"
|
|
339
|
+
},
|
|
340
|
+
"@default": "variable.php"
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
],
|
|
344
|
+
// brackets
|
|
345
|
+
[/[{}]/, "delimiter.bracket.php"],
|
|
346
|
+
[/[\[\]]/, "delimiter.array.php"],
|
|
347
|
+
[/[()]/, "delimiter.parenthesis.php"],
|
|
348
|
+
// whitespace
|
|
349
|
+
[/[ \t\r\n]+/],
|
|
350
|
+
// comments
|
|
351
|
+
[/(#|\/\/)$/, "comment.php"],
|
|
352
|
+
[/(#|\/\/)/, "comment.php", "@phpLineComment"],
|
|
353
|
+
// block comments
|
|
354
|
+
[/\/\*/, "comment.php", "@phpComment"],
|
|
355
|
+
// strings
|
|
356
|
+
[/"/, "string.php", "@phpDoubleQuoteString"],
|
|
357
|
+
[/'/, "string.php", "@phpSingleQuoteString"],
|
|
358
|
+
// delimiters
|
|
359
|
+
[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,\@]/, "delimiter.php"],
|
|
360
|
+
// numbers
|
|
361
|
+
[/\d*\d+[eE]([\-+]?\d+)?/, "number.float.php"],
|
|
362
|
+
[/\d*\.\d+([eE][\-+]?\d+)?/, "number.float.php"],
|
|
363
|
+
[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/, "number.hex.php"],
|
|
364
|
+
[/0[0-7']*[0-7]/, "number.octal.php"],
|
|
365
|
+
[/0[bB][0-1']*[0-1]/, "number.binary.php"],
|
|
366
|
+
[/\d[\d']*/, "number.php"],
|
|
367
|
+
[/\d/, "number.php"]
|
|
368
|
+
],
|
|
369
|
+
phpComment: [
|
|
370
|
+
[/\*\//, "comment.php", "@pop"],
|
|
371
|
+
[/[^*]+/, "comment.php"],
|
|
372
|
+
[/./, "comment.php"]
|
|
373
|
+
],
|
|
374
|
+
phpLineComment: [
|
|
375
|
+
[/\?>/, { token: "@rematch", next: "@pop" }],
|
|
376
|
+
[/.$/, "comment.php", "@pop"],
|
|
377
|
+
[/[^?]+$/, "comment.php", "@pop"],
|
|
378
|
+
[/[^?]+/, "comment.php"],
|
|
379
|
+
[/./, "comment.php"]
|
|
380
|
+
],
|
|
381
|
+
phpDoubleQuoteString: [
|
|
382
|
+
[/[^\\"]+/, "string.php"],
|
|
383
|
+
[/@escapes/, "string.escape.php"],
|
|
384
|
+
[/\\./, "string.escape.invalid.php"],
|
|
385
|
+
[/"/, "string.php", "@pop"]
|
|
386
|
+
],
|
|
387
|
+
phpSingleQuoteString: [
|
|
388
|
+
[/[^\\']+/, "string.php"],
|
|
389
|
+
[/@escapes/, "string.escape.php"],
|
|
390
|
+
[/\\./, "string.escape.invalid.php"],
|
|
391
|
+
[/'/, "string.php", "@pop"]
|
|
392
|
+
]
|
|
393
|
+
},
|
|
394
|
+
phpKeywords: [
|
|
395
|
+
"abstract",
|
|
396
|
+
"and",
|
|
397
|
+
"array",
|
|
398
|
+
"as",
|
|
399
|
+
"break",
|
|
400
|
+
"callable",
|
|
401
|
+
"case",
|
|
402
|
+
"catch",
|
|
403
|
+
"cfunction",
|
|
404
|
+
"class",
|
|
405
|
+
"clone",
|
|
406
|
+
"const",
|
|
407
|
+
"continue",
|
|
408
|
+
"declare",
|
|
409
|
+
"default",
|
|
410
|
+
"do",
|
|
411
|
+
"else",
|
|
412
|
+
"elseif",
|
|
413
|
+
"enddeclare",
|
|
414
|
+
"endfor",
|
|
415
|
+
"endforeach",
|
|
416
|
+
"endif",
|
|
417
|
+
"endswitch",
|
|
418
|
+
"endwhile",
|
|
419
|
+
"extends",
|
|
420
|
+
"false",
|
|
421
|
+
"final",
|
|
422
|
+
"for",
|
|
423
|
+
"foreach",
|
|
424
|
+
"function",
|
|
425
|
+
"global",
|
|
426
|
+
"goto",
|
|
427
|
+
"if",
|
|
428
|
+
"implements",
|
|
429
|
+
"interface",
|
|
430
|
+
"instanceof",
|
|
431
|
+
"insteadof",
|
|
432
|
+
"namespace",
|
|
433
|
+
"new",
|
|
434
|
+
"null",
|
|
435
|
+
"object",
|
|
436
|
+
"old_function",
|
|
437
|
+
"or",
|
|
438
|
+
"private",
|
|
439
|
+
"protected",
|
|
440
|
+
"public",
|
|
441
|
+
"resource",
|
|
442
|
+
"static",
|
|
443
|
+
"switch",
|
|
444
|
+
"throw",
|
|
445
|
+
"trait",
|
|
446
|
+
"try",
|
|
447
|
+
"true",
|
|
448
|
+
"use",
|
|
449
|
+
"var",
|
|
450
|
+
"while",
|
|
451
|
+
"xor",
|
|
452
|
+
"die",
|
|
453
|
+
"echo",
|
|
454
|
+
"empty",
|
|
455
|
+
"exit",
|
|
456
|
+
"eval",
|
|
457
|
+
"include",
|
|
458
|
+
"include_once",
|
|
459
|
+
"isset",
|
|
460
|
+
"list",
|
|
461
|
+
"require",
|
|
462
|
+
"require_once",
|
|
463
|
+
"return",
|
|
464
|
+
"print",
|
|
465
|
+
"unset",
|
|
466
|
+
"yield",
|
|
467
|
+
"__construct"
|
|
468
|
+
],
|
|
469
|
+
phpCompileTimeConstants: [
|
|
470
|
+
"__CLASS__",
|
|
471
|
+
"__DIR__",
|
|
472
|
+
"__FILE__",
|
|
473
|
+
"__LINE__",
|
|
474
|
+
"__NAMESPACE__",
|
|
475
|
+
"__METHOD__",
|
|
476
|
+
"__FUNCTION__",
|
|
477
|
+
"__TRAIT__"
|
|
478
|
+
],
|
|
479
|
+
phpPreDefinedVariables: [
|
|
480
|
+
"$GLOBALS",
|
|
481
|
+
"$_SERVER",
|
|
482
|
+
"$_GET",
|
|
483
|
+
"$_POST",
|
|
484
|
+
"$_FILES",
|
|
485
|
+
"$_REQUEST",
|
|
486
|
+
"$_SESSION",
|
|
487
|
+
"$_ENV",
|
|
488
|
+
"$_COOKIE",
|
|
489
|
+
"$php_errormsg",
|
|
490
|
+
"$HTTP_RAW_POST_DATA",
|
|
491
|
+
"$http_response_header",
|
|
492
|
+
"$argc",
|
|
493
|
+
"$argv"
|
|
494
|
+
],
|
|
495
|
+
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/
|
|
496
|
+
};
|
|
497
|
+
export {
|
|
498
|
+
e as conf,
|
|
499
|
+
t as language
|
|
500
|
+
};
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
comments: {
|
|
3
|
+
lineComment: "#"
|
|
4
|
+
},
|
|
5
|
+
brackets: [
|
|
6
|
+
["[", "]"],
|
|
7
|
+
["<", ">"],
|
|
8
|
+
["(", ")"]
|
|
9
|
+
],
|
|
10
|
+
autoClosingPairs: [
|
|
11
|
+
{ open: "[", close: "]" },
|
|
12
|
+
{ open: "<", close: ">" },
|
|
13
|
+
{ open: "(", close: ")" }
|
|
14
|
+
],
|
|
15
|
+
surroundingPairs: [
|
|
16
|
+
{ open: "[", close: "]" },
|
|
17
|
+
{ open: "<", close: ">" },
|
|
18
|
+
{ open: "(", close: ")" }
|
|
19
|
+
]
|
|
20
|
+
}, o = {
|
|
21
|
+
defaultToken: "",
|
|
22
|
+
tokenPostfix: ".pla",
|
|
23
|
+
brackets: [
|
|
24
|
+
{ open: "[", close: "]", token: "delimiter.square" },
|
|
25
|
+
{ open: "<", close: ">", token: "delimiter.angle" },
|
|
26
|
+
{ open: "(", close: ")", token: "delimiter.parenthesis" }
|
|
27
|
+
],
|
|
28
|
+
keywords: [
|
|
29
|
+
".i",
|
|
30
|
+
".o",
|
|
31
|
+
".mv",
|
|
32
|
+
".ilb",
|
|
33
|
+
".ob",
|
|
34
|
+
".label",
|
|
35
|
+
".type",
|
|
36
|
+
".phase",
|
|
37
|
+
".pair",
|
|
38
|
+
".symbolic",
|
|
39
|
+
".symbolic-output",
|
|
40
|
+
".kiss",
|
|
41
|
+
".p",
|
|
42
|
+
".e",
|
|
43
|
+
".end"
|
|
44
|
+
],
|
|
45
|
+
// regular expressions
|
|
46
|
+
comment: /#.*$/,
|
|
47
|
+
identifier: /[a-zA-Z]+[a-zA-Z0-9_\-]*/,
|
|
48
|
+
plaContent: /[01\-~\|]+/,
|
|
49
|
+
// The main tokenizer for our languages
|
|
50
|
+
tokenizer: {
|
|
51
|
+
root: [
|
|
52
|
+
// comments and whitespace
|
|
53
|
+
{ include: "@whitespace" },
|
|
54
|
+
[/@comment/, "comment"],
|
|
55
|
+
// keyword
|
|
56
|
+
[
|
|
57
|
+
/\.([a-zA-Z_\-]+)/,
|
|
58
|
+
{
|
|
59
|
+
cases: {
|
|
60
|
+
"@eos": { token: "keyword.$1" },
|
|
61
|
+
"@keywords": {
|
|
62
|
+
cases: {
|
|
63
|
+
".type": { token: "keyword.$1", next: "@type" },
|
|
64
|
+
"@default": { token: "keyword.$1", next: "@keywordArg" }
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"@default": { token: "keyword.$1" }
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
// identifiers
|
|
72
|
+
[/@identifier/, "identifier"],
|
|
73
|
+
// PLA row
|
|
74
|
+
[/@plaContent/, "string"]
|
|
75
|
+
],
|
|
76
|
+
whitespace: [[/[ \t\r\n]+/, ""]],
|
|
77
|
+
type: [{ include: "@whitespace" }, [/\w+/, { token: "type", next: "@pop" }]],
|
|
78
|
+
keywordArg: [
|
|
79
|
+
// whitespace
|
|
80
|
+
[
|
|
81
|
+
/[ \t\r\n]+/,
|
|
82
|
+
{
|
|
83
|
+
cases: {
|
|
84
|
+
"@eos": { token: "", next: "@pop" },
|
|
85
|
+
"@default": ""
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
// comments
|
|
90
|
+
[/@comment/, "comment", "@pop"],
|
|
91
|
+
// brackets
|
|
92
|
+
[
|
|
93
|
+
/[<>()\[\]]/,
|
|
94
|
+
{
|
|
95
|
+
cases: {
|
|
96
|
+
"@eos": { token: "@brackets", next: "@pop" },
|
|
97
|
+
"@default": "@brackets"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
// numbers
|
|
102
|
+
[
|
|
103
|
+
/\-?\d+/,
|
|
104
|
+
{
|
|
105
|
+
cases: {
|
|
106
|
+
"@eos": { token: "number", next: "@pop" },
|
|
107
|
+
"@default": "number"
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
// identifiers
|
|
112
|
+
[
|
|
113
|
+
/@identifier/,
|
|
114
|
+
{
|
|
115
|
+
cases: {
|
|
116
|
+
"@eos": { token: "identifier", next: "@pop" },
|
|
117
|
+
"@default": "identifier"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
// delimiter
|
|
122
|
+
[
|
|
123
|
+
/[;=]/,
|
|
124
|
+
{
|
|
125
|
+
cases: {
|
|
126
|
+
"@eos": { token: "delimiter", next: "@pop" },
|
|
127
|
+
"@default": "delimiter"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
export {
|
|
135
|
+
e as conf,
|
|
136
|
+
o as language
|
|
137
|
+
};
|