@codingame/monaco-vscode-standalone-languages 3.2.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/_.contribution.js +74 -0
- package/abap/abap.contribution.js +19 -0
- package/abap/abap.js +1406 -0
- package/apex/apex.contribution.js +20 -0
- package/apex/apex.js +338 -0
- package/azcli/azcli.contribution.js +19 -0
- package/azcli/azcli.js +76 -0
- package/bat/bat.contribution.js +19 -0
- package/bat/bat.js +108 -0
- package/bicep/bicep.contribution.js +19 -0
- package/bicep/bicep.js +117 -0
- package/cameligo/cameligo.contribution.js +19 -0
- package/cameligo/cameligo.js +182 -0
- package/clojure/clojure.contribution.js +19 -0
- package/clojure/clojure.js +769 -0
- package/coffee/coffee.contribution.js +20 -0
- package/coffee/coffee.js +240 -0
- package/cpp/cpp.contribution.js +29 -0
- package/cpp/cpp.js +409 -0
- package/csharp/csharp.contribution.js +19 -0
- package/csharp/csharp.js +334 -0
- package/csp/csp.contribution.js +19 -0
- package/csp/csp.js +61 -0
- package/css/css.contribution.js +20 -0
- package/css/css.js +193 -0
- package/cypher/cypher.contribution.js +19 -0
- package/cypher/cypher.js +271 -0
- package/dart/dart.contribution.js +20 -0
- package/dart/dart.js +289 -0
- package/dockerfile/dockerfile.contribution.js +20 -0
- package/dockerfile/dockerfile.js +138 -0
- package/ecl/ecl.contribution.js +19 -0
- package/ecl/ecl.js +464 -0
- package/elixir/elixir.contribution.js +19 -0
- package/elixir/elixir.js +577 -0
- package/flow9/flow9.contribution.js +19 -0
- package/flow9/flow9.js +150 -0
- package/freemarker2/freemarker2.contribution.js +73 -0
- package/freemarker2/freemarker2.js +1016 -0
- package/fsharp/fsharp.contribution.js +19 -0
- package/fsharp/fsharp.js +225 -0
- package/go/go.contribution.js +19 -0
- package/go/go.js +226 -0
- package/graphql/graphql.contribution.js +20 -0
- package/graphql/graphql.js +159 -0
- package/handlebars/handlebars.contribution.js +20 -0
- package/handlebars/handlebars.js +439 -0
- package/hcl/hcl.contribution.js +19 -0
- package/hcl/hcl.js +191 -0
- package/html/html.contribution.js +20 -0
- package/html/html.js +328 -0
- package/index.js +81 -0
- package/ini/ini.contribution.js +20 -0
- package/ini/ini.js +79 -0
- package/java/java.contribution.js +20 -0
- package/java/java.js +240 -0
- package/javascript/javascript.contribution.js +22 -0
- package/javascript/javascript.js +77 -0
- package/julia/julia.contribution.js +19 -0
- package/julia/julia.js +519 -0
- package/kotlin/kotlin.contribution.js +20 -0
- package/kotlin/kotlin.js +261 -0
- package/less/less.contribution.js +20 -0
- package/less/less.js +169 -0
- package/lexon/lexon.contribution.js +19 -0
- package/lexon/lexon.js +165 -0
- package/liquid/liquid.contribution.js +20 -0
- package/liquid/liquid.js +260 -0
- package/lua/lua.contribution.js +19 -0
- package/lua/lua.js +170 -0
- package/m3/m3.contribution.js +19 -0
- package/m3/m3.js +218 -0
- package/markdown/markdown.contribution.js +19 -0
- package/markdown/markdown.js +237 -0
- package/mdx/mdx.contribution.js +19 -0
- package/mdx/mdx.js +184 -0
- package/mips/mips.contribution.js +20 -0
- package/mips/mips.js +206 -0
- package/msdax/msdax.contribution.js +19 -0
- package/msdax/msdax.js +383 -0
- package/mysql/mysql.contribution.js +19 -0
- package/mysql/mysql.js +886 -0
- package/objective-c/objective-c.contribution.js +19 -0
- package/objective-c/objective-c.js +191 -0
- package/package.json +23 -0
- package/pascal/pascal.contribution.js +20 -0
- package/pascal/pascal.js +259 -0
- package/pascaligo/pascaligo.contribution.js +19 -0
- package/pascaligo/pascaligo.js +172 -0
- package/perl/perl.contribution.js +19 -0
- package/perl/perl.js +634 -0
- package/pgsql/pgsql.contribution.js +19 -0
- package/pgsql/pgsql.js +859 -0
- package/php/php.contribution.js +20 -0
- package/php/php.js +508 -0
- package/pla/pla.contribution.js +18 -0
- package/pla/pla.js +145 -0
- package/postiats/postiats.contribution.js +19 -0
- package/postiats/postiats.js +915 -0
- package/powerquery/powerquery.contribution.js +19 -0
- package/powerquery/powerquery.js +898 -0
- package/powershell/powershell.contribution.js +19 -0
- package/powershell/powershell.js +247 -0
- package/protobuf/protobuf.contribution.js +19 -0
- package/protobuf/protobuf.js +428 -0
- package/pug/pug.contribution.js +19 -0
- package/pug/pug.js +410 -0
- package/python/python.contribution.js +20 -0
- package/python/python.js +295 -0
- package/qsharp/qsharp.contribution.js +19 -0
- package/qsharp/qsharp.js +293 -0
- package/r/r.contribution.js +19 -0
- package/r/r.js +251 -0
- package/razor/razor.contribution.js +20 -0
- package/razor/razor.js +570 -0
- package/redis/redis.contribution.js +19 -0
- package/redis/redis.js +310 -0
- package/redshift/redshift.contribution.js +19 -0
- package/redshift/redshift.js +817 -0
- package/restructuredtext/restructuredtext.contribution.js +19 -0
- package/restructuredtext/restructuredtext.js +182 -0
- package/ruby/ruby.contribution.js +20 -0
- package/ruby/ruby.js +519 -0
- package/rust/rust.contribution.js +19 -0
- package/rust/rust.js +351 -0
- package/sb/sb.contribution.js +19 -0
- package/sb/sb.js +123 -0
- package/scala/scala.contribution.js +20 -0
- package/scala/scala.js +378 -0
- package/scheme/scheme.contribution.js +19 -0
- package/scheme/scheme.js +116 -0
- package/scss/scss.contribution.js +20 -0
- package/scss/scss.js +268 -0
- package/shell/shell.contribution.js +19 -0
- package/shell/shell.js +229 -0
- package/solidity/solidity.contribution.js +19 -0
- package/solidity/solidity.js +1375 -0
- package/sophia/sophia.contribution.js +19 -0
- package/sophia/sophia.js +207 -0
- package/sparql/sparql.contribution.js +19 -0
- package/sparql/sparql.js +209 -0
- package/sql/sql.contribution.js +19 -0
- package/sql/sql.js +861 -0
- package/st/st.contribution.js +19 -0
- package/st/st.js +424 -0
- package/swift/swift.contribution.js +20 -0
- package/swift/swift.js +320 -0
- package/systemverilog/systemverilog.contribution.js +29 -0
- package/systemverilog/systemverilog.js +584 -0
- package/tcl/tcl.contribution.js +19 -0
- package/tcl/tcl.js +240 -0
- package/twig/twig.contribution.js +20 -0
- package/twig/twig.js +400 -0
- package/typescript/typescript.contribution.js +20 -0
- package/typescript/typescript.js +362 -0
- package/vb/vb.contribution.js +19 -0
- package/vb/vb.js +380 -0
- package/wgsl/wgsl.contribution.js +19 -0
- package/wgsl/wgsl.js +461 -0
- package/xml/xml.contribution.js +39 -0
- package/xml/xml.js +114 -0
- package/yaml/yaml.contribution.js +20 -0
- package/yaml/yaml.js +225 -0
package/cypher/cypher.js
ADDED
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
/*!-----------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Version: 0.47.0(undefined)
|
|
4
|
+
* Released under the MIT license
|
|
5
|
+
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
6
|
+
*-----------------------------------------------------------------------------*/
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
// src/basic-languages/cypher/cypher.ts
|
|
10
|
+
var conf = {
|
|
11
|
+
comments: {
|
|
12
|
+
lineComment: "//",
|
|
13
|
+
blockComment: ["/*", "*/"]
|
|
14
|
+
},
|
|
15
|
+
brackets: [
|
|
16
|
+
["{", "}"],
|
|
17
|
+
["[", "]"],
|
|
18
|
+
["(", ")"]
|
|
19
|
+
],
|
|
20
|
+
autoClosingPairs: [
|
|
21
|
+
{ open: "{", close: "}" },
|
|
22
|
+
{ open: "[", close: "]" },
|
|
23
|
+
{ open: "(", close: ")" },
|
|
24
|
+
{ open: '"', close: '"' },
|
|
25
|
+
{ open: "'", close: "'" },
|
|
26
|
+
{ open: "`", close: "`" }
|
|
27
|
+
],
|
|
28
|
+
surroundingPairs: [
|
|
29
|
+
{ open: "{", close: "}" },
|
|
30
|
+
{ open: "[", close: "]" },
|
|
31
|
+
{ open: "(", close: ")" },
|
|
32
|
+
{ open: '"', close: '"' },
|
|
33
|
+
{ open: "'", close: "'" },
|
|
34
|
+
{ open: "`", close: "`" }
|
|
35
|
+
]
|
|
36
|
+
};
|
|
37
|
+
var language = {
|
|
38
|
+
defaultToken: "",
|
|
39
|
+
tokenPostfix: `.cypher`,
|
|
40
|
+
ignoreCase: true,
|
|
41
|
+
brackets: [
|
|
42
|
+
{ open: "{", close: "}", token: "delimiter.curly" },
|
|
43
|
+
{ open: "[", close: "]", token: "delimiter.bracket" },
|
|
44
|
+
{ open: "(", close: ")", token: "delimiter.parenthesis" }
|
|
45
|
+
],
|
|
46
|
+
keywords: [
|
|
47
|
+
"ALL",
|
|
48
|
+
"AND",
|
|
49
|
+
"AS",
|
|
50
|
+
"ASC",
|
|
51
|
+
"ASCENDING",
|
|
52
|
+
"BY",
|
|
53
|
+
"CALL",
|
|
54
|
+
"CASE",
|
|
55
|
+
"CONTAINS",
|
|
56
|
+
"CREATE",
|
|
57
|
+
"DELETE",
|
|
58
|
+
"DESC",
|
|
59
|
+
"DESCENDING",
|
|
60
|
+
"DETACH",
|
|
61
|
+
"DISTINCT",
|
|
62
|
+
"ELSE",
|
|
63
|
+
"END",
|
|
64
|
+
"ENDS",
|
|
65
|
+
"EXISTS",
|
|
66
|
+
"IN",
|
|
67
|
+
"IS",
|
|
68
|
+
"LIMIT",
|
|
69
|
+
"MANDATORY",
|
|
70
|
+
"MATCH",
|
|
71
|
+
"MERGE",
|
|
72
|
+
"NOT",
|
|
73
|
+
"ON",
|
|
74
|
+
"ON",
|
|
75
|
+
"OPTIONAL",
|
|
76
|
+
"OR",
|
|
77
|
+
"ORDER",
|
|
78
|
+
"REMOVE",
|
|
79
|
+
"RETURN",
|
|
80
|
+
"SET",
|
|
81
|
+
"SKIP",
|
|
82
|
+
"STARTS",
|
|
83
|
+
"THEN",
|
|
84
|
+
"UNION",
|
|
85
|
+
"UNWIND",
|
|
86
|
+
"WHEN",
|
|
87
|
+
"WHERE",
|
|
88
|
+
"WITH",
|
|
89
|
+
"XOR",
|
|
90
|
+
"YIELD"
|
|
91
|
+
],
|
|
92
|
+
builtinLiterals: ["true", "TRUE", "false", "FALSE", "null", "NULL"],
|
|
93
|
+
builtinFunctions: [
|
|
94
|
+
"abs",
|
|
95
|
+
"acos",
|
|
96
|
+
"asin",
|
|
97
|
+
"atan",
|
|
98
|
+
"atan2",
|
|
99
|
+
"avg",
|
|
100
|
+
"ceil",
|
|
101
|
+
"coalesce",
|
|
102
|
+
"collect",
|
|
103
|
+
"cos",
|
|
104
|
+
"cot",
|
|
105
|
+
"count",
|
|
106
|
+
"degrees",
|
|
107
|
+
"e",
|
|
108
|
+
"endNode",
|
|
109
|
+
"exists",
|
|
110
|
+
"exp",
|
|
111
|
+
"floor",
|
|
112
|
+
"head",
|
|
113
|
+
"id",
|
|
114
|
+
"keys",
|
|
115
|
+
"labels",
|
|
116
|
+
"last",
|
|
117
|
+
"left",
|
|
118
|
+
"length",
|
|
119
|
+
"log",
|
|
120
|
+
"log10",
|
|
121
|
+
"lTrim",
|
|
122
|
+
"max",
|
|
123
|
+
"min",
|
|
124
|
+
"nodes",
|
|
125
|
+
"percentileCont",
|
|
126
|
+
"percentileDisc",
|
|
127
|
+
"pi",
|
|
128
|
+
"properties",
|
|
129
|
+
"radians",
|
|
130
|
+
"rand",
|
|
131
|
+
"range",
|
|
132
|
+
"relationships",
|
|
133
|
+
"replace",
|
|
134
|
+
"reverse",
|
|
135
|
+
"right",
|
|
136
|
+
"round",
|
|
137
|
+
"rTrim",
|
|
138
|
+
"sign",
|
|
139
|
+
"sin",
|
|
140
|
+
"size",
|
|
141
|
+
"split",
|
|
142
|
+
"sqrt",
|
|
143
|
+
"startNode",
|
|
144
|
+
"stDev",
|
|
145
|
+
"stDevP",
|
|
146
|
+
"substring",
|
|
147
|
+
"sum",
|
|
148
|
+
"tail",
|
|
149
|
+
"tan",
|
|
150
|
+
"timestamp",
|
|
151
|
+
"toBoolean",
|
|
152
|
+
"toFloat",
|
|
153
|
+
"toInteger",
|
|
154
|
+
"toLower",
|
|
155
|
+
"toString",
|
|
156
|
+
"toUpper",
|
|
157
|
+
"trim",
|
|
158
|
+
"type"
|
|
159
|
+
],
|
|
160
|
+
operators: [
|
|
161
|
+
// Math operators
|
|
162
|
+
"+",
|
|
163
|
+
"-",
|
|
164
|
+
"*",
|
|
165
|
+
"/",
|
|
166
|
+
"%",
|
|
167
|
+
"^",
|
|
168
|
+
// Comparison operators
|
|
169
|
+
"=",
|
|
170
|
+
"<>",
|
|
171
|
+
"<",
|
|
172
|
+
">",
|
|
173
|
+
"<=",
|
|
174
|
+
">=",
|
|
175
|
+
// Pattern operators
|
|
176
|
+
"->",
|
|
177
|
+
"<-",
|
|
178
|
+
"-->",
|
|
179
|
+
"<--"
|
|
180
|
+
],
|
|
181
|
+
escapes: /\\(?:[tbnrf\\"'`]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
|
182
|
+
digits: /\d+/,
|
|
183
|
+
octaldigits: /[0-7]+/,
|
|
184
|
+
hexdigits: /[0-9a-fA-F]+/,
|
|
185
|
+
tokenizer: {
|
|
186
|
+
root: [[/[{}[\]()]/, "@brackets"], { include: "common" }],
|
|
187
|
+
common: [
|
|
188
|
+
{ include: "@whitespace" },
|
|
189
|
+
{ include: "@numbers" },
|
|
190
|
+
{ include: "@strings" },
|
|
191
|
+
// Cypher labels on nodes/relationships, e.g. (n:NodeLabel)-[e:RelationshipLabel]
|
|
192
|
+
[/:[a-zA-Z_][\w]*/, "type.identifier"],
|
|
193
|
+
[
|
|
194
|
+
/[a-zA-Z_][\w]*(?=\()/,
|
|
195
|
+
{
|
|
196
|
+
cases: {
|
|
197
|
+
"@builtinFunctions": "predefined.function"
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
],
|
|
201
|
+
[
|
|
202
|
+
/[a-zA-Z_$][\w$]*/,
|
|
203
|
+
{
|
|
204
|
+
cases: {
|
|
205
|
+
"@keywords": "keyword",
|
|
206
|
+
"@builtinLiterals": "predefined.literal",
|
|
207
|
+
"@default": "identifier"
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
],
|
|
211
|
+
[/`/, "identifier.escape", "@identifierBacktick"],
|
|
212
|
+
// delimiter and operator after number because of `.\d` floats and `:` in labels
|
|
213
|
+
[/[;,.:|]/, "delimiter"],
|
|
214
|
+
[
|
|
215
|
+
/[<>=%+\-*/^]+/,
|
|
216
|
+
{
|
|
217
|
+
cases: {
|
|
218
|
+
"@operators": "delimiter",
|
|
219
|
+
"@default": ""
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
]
|
|
223
|
+
],
|
|
224
|
+
numbers: [
|
|
225
|
+
[/-?(@digits)[eE](-?(@digits))?/, "number.float"],
|
|
226
|
+
[/-?(@digits)?\.(@digits)([eE]-?(@digits))?/, "number.float"],
|
|
227
|
+
[/-?0x(@hexdigits)/, "number.hex"],
|
|
228
|
+
[/-?0(@octaldigits)/, "number.octal"],
|
|
229
|
+
[/-?(@digits)/, "number"]
|
|
230
|
+
],
|
|
231
|
+
strings: [
|
|
232
|
+
[/"([^"\\]|\\.)*$/, "string.invalid"],
|
|
233
|
+
// non-teminated string
|
|
234
|
+
[/'([^'\\]|\\.)*$/, "string.invalid"],
|
|
235
|
+
// non-teminated string
|
|
236
|
+
[/"/, "string", "@stringDouble"],
|
|
237
|
+
[/'/, "string", "@stringSingle"]
|
|
238
|
+
],
|
|
239
|
+
whitespace: [
|
|
240
|
+
[/[ \t\r\n]+/, "white"],
|
|
241
|
+
[/\/\*/, "comment", "@comment"],
|
|
242
|
+
[/\/\/.*$/, "comment"]
|
|
243
|
+
],
|
|
244
|
+
comment: [
|
|
245
|
+
[/\/\/.*/, "comment"],
|
|
246
|
+
[/[^/*]+/, "comment"],
|
|
247
|
+
[/\*\//, "comment", "@pop"],
|
|
248
|
+
[/[/*]/, "comment"]
|
|
249
|
+
],
|
|
250
|
+
stringDouble: [
|
|
251
|
+
[/[^\\"]+/, "string"],
|
|
252
|
+
[/@escapes/, "string"],
|
|
253
|
+
[/\\./, "string.invalid"],
|
|
254
|
+
[/"/, "string", "@pop"]
|
|
255
|
+
],
|
|
256
|
+
stringSingle: [
|
|
257
|
+
[/[^\\']+/, "string"],
|
|
258
|
+
[/@escapes/, "string"],
|
|
259
|
+
[/\\./, "string.invalid"],
|
|
260
|
+
[/'/, "string", "@pop"]
|
|
261
|
+
],
|
|
262
|
+
identifierBacktick: [
|
|
263
|
+
[/[^\\`]+/, "identifier.escape"],
|
|
264
|
+
[/@escapes/, "identifier.escape"],
|
|
265
|
+
[/\\./, "identifier.escape.invalid"],
|
|
266
|
+
[/`/, "identifier.escape", "@pop"]
|
|
267
|
+
]
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
export { conf, language };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { registerLanguage } from '../_.contribution.js';
|
|
2
|
+
|
|
3
|
+
/*!-----------------------------------------------------------------------------
|
|
4
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5
|
+
* Version: 0.47.0(undefined)
|
|
6
|
+
* Released under the MIT license
|
|
7
|
+
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
8
|
+
*-----------------------------------------------------------------------------*/
|
|
9
|
+
|
|
10
|
+
registerLanguage({
|
|
11
|
+
id: "dart",
|
|
12
|
+
extensions: [".dart"],
|
|
13
|
+
aliases: ["Dart", "dart"],
|
|
14
|
+
mimetypes: ["text/x-dart-source", "text/x-dart"],
|
|
15
|
+
loader: () => {
|
|
16
|
+
{
|
|
17
|
+
return import('./dart.js');
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
});
|
package/dart/dart.js
ADDED
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
/*!-----------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Version: 0.47.0(undefined)
|
|
4
|
+
* Released under the MIT license
|
|
5
|
+
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
6
|
+
*-----------------------------------------------------------------------------*/
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
// src/basic-languages/dart/dart.ts
|
|
10
|
+
var conf = {
|
|
11
|
+
comments: {
|
|
12
|
+
lineComment: "//",
|
|
13
|
+
blockComment: ["/*", "*/"]
|
|
14
|
+
},
|
|
15
|
+
brackets: [
|
|
16
|
+
["{", "}"],
|
|
17
|
+
["[", "]"],
|
|
18
|
+
["(", ")"]
|
|
19
|
+
],
|
|
20
|
+
autoClosingPairs: [
|
|
21
|
+
{ open: "{", close: "}" },
|
|
22
|
+
{ open: "[", close: "]" },
|
|
23
|
+
{ open: "(", close: ")" },
|
|
24
|
+
{ open: "'", close: "'", notIn: ["string", "comment"] },
|
|
25
|
+
{ open: '"', close: '"', notIn: ["string"] },
|
|
26
|
+
{ open: "`", close: "`", notIn: ["string", "comment"] },
|
|
27
|
+
{ open: "/**", close: " */", notIn: ["string"] }
|
|
28
|
+
],
|
|
29
|
+
surroundingPairs: [
|
|
30
|
+
{ open: "{", close: "}" },
|
|
31
|
+
{ open: "[", close: "]" },
|
|
32
|
+
{ open: "(", close: ")" },
|
|
33
|
+
{ open: "<", close: ">" },
|
|
34
|
+
{ open: "'", close: "'" },
|
|
35
|
+
{ open: "(", close: ")" },
|
|
36
|
+
{ open: '"', close: '"' },
|
|
37
|
+
{ open: "`", close: "`" }
|
|
38
|
+
],
|
|
39
|
+
folding: {
|
|
40
|
+
markers: {
|
|
41
|
+
start: /^\s*\s*#?region\b/,
|
|
42
|
+
end: /^\s*\s*#?endregion\b/
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
var language = {
|
|
47
|
+
defaultToken: "invalid",
|
|
48
|
+
tokenPostfix: ".dart",
|
|
49
|
+
keywords: [
|
|
50
|
+
"abstract",
|
|
51
|
+
"dynamic",
|
|
52
|
+
"implements",
|
|
53
|
+
"show",
|
|
54
|
+
"as",
|
|
55
|
+
"else",
|
|
56
|
+
"import",
|
|
57
|
+
"static",
|
|
58
|
+
"assert",
|
|
59
|
+
"enum",
|
|
60
|
+
"in",
|
|
61
|
+
"super",
|
|
62
|
+
"async",
|
|
63
|
+
"export",
|
|
64
|
+
"interface",
|
|
65
|
+
"switch",
|
|
66
|
+
"await",
|
|
67
|
+
"extends",
|
|
68
|
+
"is",
|
|
69
|
+
"sync",
|
|
70
|
+
"break",
|
|
71
|
+
"external",
|
|
72
|
+
"library",
|
|
73
|
+
"this",
|
|
74
|
+
"case",
|
|
75
|
+
"factory",
|
|
76
|
+
"mixin",
|
|
77
|
+
"throw",
|
|
78
|
+
"catch",
|
|
79
|
+
"false",
|
|
80
|
+
"new",
|
|
81
|
+
"true",
|
|
82
|
+
"class",
|
|
83
|
+
"final",
|
|
84
|
+
"null",
|
|
85
|
+
"try",
|
|
86
|
+
"const",
|
|
87
|
+
"finally",
|
|
88
|
+
"on",
|
|
89
|
+
"typedef",
|
|
90
|
+
"continue",
|
|
91
|
+
"for",
|
|
92
|
+
"operator",
|
|
93
|
+
"var",
|
|
94
|
+
"covariant",
|
|
95
|
+
"Function",
|
|
96
|
+
"part",
|
|
97
|
+
"void",
|
|
98
|
+
"default",
|
|
99
|
+
"get",
|
|
100
|
+
"rethrow",
|
|
101
|
+
"while",
|
|
102
|
+
"deferred",
|
|
103
|
+
"hide",
|
|
104
|
+
"return",
|
|
105
|
+
"with",
|
|
106
|
+
"do",
|
|
107
|
+
"if",
|
|
108
|
+
"set",
|
|
109
|
+
"yield"
|
|
110
|
+
],
|
|
111
|
+
typeKeywords: ["int", "double", "String", "bool"],
|
|
112
|
+
operators: [
|
|
113
|
+
"+",
|
|
114
|
+
"-",
|
|
115
|
+
"*",
|
|
116
|
+
"/",
|
|
117
|
+
"~/",
|
|
118
|
+
"%",
|
|
119
|
+
"++",
|
|
120
|
+
"--",
|
|
121
|
+
"==",
|
|
122
|
+
"!=",
|
|
123
|
+
">",
|
|
124
|
+
"<",
|
|
125
|
+
">=",
|
|
126
|
+
"<=",
|
|
127
|
+
"=",
|
|
128
|
+
"-=",
|
|
129
|
+
"/=",
|
|
130
|
+
"%=",
|
|
131
|
+
">>=",
|
|
132
|
+
"^=",
|
|
133
|
+
"+=",
|
|
134
|
+
"*=",
|
|
135
|
+
"~/=",
|
|
136
|
+
"<<=",
|
|
137
|
+
"&=",
|
|
138
|
+
"!=",
|
|
139
|
+
"||",
|
|
140
|
+
"&&",
|
|
141
|
+
"&",
|
|
142
|
+
"|",
|
|
143
|
+
"^",
|
|
144
|
+
"~",
|
|
145
|
+
"<<",
|
|
146
|
+
">>",
|
|
147
|
+
"!",
|
|
148
|
+
">>>",
|
|
149
|
+
"??",
|
|
150
|
+
"?",
|
|
151
|
+
":",
|
|
152
|
+
"|="
|
|
153
|
+
],
|
|
154
|
+
// we include these common regular expressions
|
|
155
|
+
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
|
156
|
+
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
|
157
|
+
digits: /\d+(_+\d+)*/,
|
|
158
|
+
octaldigits: /[0-7]+(_+[0-7]+)*/,
|
|
159
|
+
binarydigits: /[0-1]+(_+[0-1]+)*/,
|
|
160
|
+
hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
|
|
161
|
+
regexpctl: /[(){}\[\]\$\^|\-*+?\.]/,
|
|
162
|
+
regexpesc: /\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,
|
|
163
|
+
// The main tokenizer for our languages
|
|
164
|
+
tokenizer: {
|
|
165
|
+
root: [[/[{}]/, "delimiter.bracket"], { include: "common" }],
|
|
166
|
+
common: [
|
|
167
|
+
// identifiers and keywords
|
|
168
|
+
[
|
|
169
|
+
/[a-z_$][\w$]*/,
|
|
170
|
+
{
|
|
171
|
+
cases: {
|
|
172
|
+
"@typeKeywords": "type.identifier",
|
|
173
|
+
"@keywords": "keyword",
|
|
174
|
+
"@default": "identifier"
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
],
|
|
178
|
+
[/[A-Z_$][\w\$]*/, "type.identifier"],
|
|
179
|
+
// show class names
|
|
180
|
+
// [/[A-Z][\w\$]*/, 'identifier'],
|
|
181
|
+
// whitespace
|
|
182
|
+
{ include: "@whitespace" },
|
|
183
|
+
// regular expression: ensure it is terminated before beginning (otherwise it is an opeator)
|
|
184
|
+
[
|
|
185
|
+
/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,
|
|
186
|
+
{ token: "regexp", bracket: "@open", next: "@regexp" }
|
|
187
|
+
],
|
|
188
|
+
// @ annotations.
|
|
189
|
+
[/@[a-zA-Z]+/, "annotation"],
|
|
190
|
+
// variable
|
|
191
|
+
// delimiters and operators
|
|
192
|
+
[/[()\[\]]/, "@brackets"],
|
|
193
|
+
[/[<>](?!@symbols)/, "@brackets"],
|
|
194
|
+
[/!(?=([^=]|$))/, "delimiter"],
|
|
195
|
+
[
|
|
196
|
+
/@symbols/,
|
|
197
|
+
{
|
|
198
|
+
cases: {
|
|
199
|
+
"@operators": "delimiter",
|
|
200
|
+
"@default": ""
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
],
|
|
204
|
+
// numbers
|
|
205
|
+
[/(@digits)[eE]([\-+]?(@digits))?/, "number.float"],
|
|
206
|
+
[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/, "number.float"],
|
|
207
|
+
[/0[xX](@hexdigits)n?/, "number.hex"],
|
|
208
|
+
[/0[oO]?(@octaldigits)n?/, "number.octal"],
|
|
209
|
+
[/0[bB](@binarydigits)n?/, "number.binary"],
|
|
210
|
+
[/(@digits)n?/, "number"],
|
|
211
|
+
// delimiter: after number because of .\d floats
|
|
212
|
+
[/[;,.]/, "delimiter"],
|
|
213
|
+
// strings
|
|
214
|
+
[/"([^"\\]|\\.)*$/, "string.invalid"],
|
|
215
|
+
// non-teminated string
|
|
216
|
+
[/'([^'\\]|\\.)*$/, "string.invalid"],
|
|
217
|
+
// non-teminated string
|
|
218
|
+
[/"/, "string", "@string_double"],
|
|
219
|
+
[/'/, "string", "@string_single"]
|
|
220
|
+
// [/[a-zA-Z]+/, "variable"]
|
|
221
|
+
],
|
|
222
|
+
whitespace: [
|
|
223
|
+
[/[ \t\r\n]+/, ""],
|
|
224
|
+
[/\/\*\*(?!\/)/, "comment.doc", "@jsdoc"],
|
|
225
|
+
[/\/\*/, "comment", "@comment"],
|
|
226
|
+
[/\/\/\/.*$/, "comment.doc"],
|
|
227
|
+
[/\/\/.*$/, "comment"]
|
|
228
|
+
],
|
|
229
|
+
comment: [
|
|
230
|
+
[/[^\/*]+/, "comment"],
|
|
231
|
+
[/\*\//, "comment", "@pop"],
|
|
232
|
+
[/[\/*]/, "comment"]
|
|
233
|
+
],
|
|
234
|
+
jsdoc: [
|
|
235
|
+
[/[^\/*]+/, "comment.doc"],
|
|
236
|
+
[/\*\//, "comment.doc", "@pop"],
|
|
237
|
+
[/[\/*]/, "comment.doc"]
|
|
238
|
+
],
|
|
239
|
+
// We match regular expression quite precisely
|
|
240
|
+
regexp: [
|
|
241
|
+
[
|
|
242
|
+
/(\{)(\d+(?:,\d*)?)(\})/,
|
|
243
|
+
["regexp.escape.control", "regexp.escape.control", "regexp.escape.control"]
|
|
244
|
+
],
|
|
245
|
+
[
|
|
246
|
+
/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,
|
|
247
|
+
["regexp.escape.control", { token: "regexp.escape.control", next: "@regexrange" }]
|
|
248
|
+
],
|
|
249
|
+
[/(\()(\?:|\?=|\?!)/, ["regexp.escape.control", "regexp.escape.control"]],
|
|
250
|
+
[/[()]/, "regexp.escape.control"],
|
|
251
|
+
[/@regexpctl/, "regexp.escape.control"],
|
|
252
|
+
[/[^\\\/]/, "regexp"],
|
|
253
|
+
[/@regexpesc/, "regexp.escape"],
|
|
254
|
+
[/\\\./, "regexp.invalid"],
|
|
255
|
+
[/(\/)([gimsuy]*)/, [{ token: "regexp", bracket: "@close", next: "@pop" }, "keyword.other"]]
|
|
256
|
+
],
|
|
257
|
+
regexrange: [
|
|
258
|
+
[/-/, "regexp.escape.control"],
|
|
259
|
+
[/\^/, "regexp.invalid"],
|
|
260
|
+
[/@regexpesc/, "regexp.escape"],
|
|
261
|
+
[/[^\]]/, "regexp"],
|
|
262
|
+
[
|
|
263
|
+
/\]/,
|
|
264
|
+
{
|
|
265
|
+
token: "regexp.escape.control",
|
|
266
|
+
next: "@pop",
|
|
267
|
+
bracket: "@close"
|
|
268
|
+
}
|
|
269
|
+
]
|
|
270
|
+
],
|
|
271
|
+
string_double: [
|
|
272
|
+
[/[^\\"\$]+/, "string"],
|
|
273
|
+
[/[^\\"]+/, "string"],
|
|
274
|
+
[/@escapes/, "string.escape"],
|
|
275
|
+
[/\\./, "string.escape.invalid"],
|
|
276
|
+
[/"/, "string", "@pop"],
|
|
277
|
+
[/\$\w+/, "identifier"]
|
|
278
|
+
],
|
|
279
|
+
string_single: [
|
|
280
|
+
[/[^\\'\$]+/, "string"],
|
|
281
|
+
[/@escapes/, "string.escape"],
|
|
282
|
+
[/\\./, "string.escape.invalid"],
|
|
283
|
+
[/'/, "string", "@pop"],
|
|
284
|
+
[/\$\w+/, "identifier"]
|
|
285
|
+
]
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
export { conf, language };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { registerLanguage } from '../_.contribution.js';
|
|
2
|
+
|
|
3
|
+
/*!-----------------------------------------------------------------------------
|
|
4
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5
|
+
* Version: 0.47.0(undefined)
|
|
6
|
+
* Released under the MIT license
|
|
7
|
+
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
8
|
+
*-----------------------------------------------------------------------------*/
|
|
9
|
+
|
|
10
|
+
registerLanguage({
|
|
11
|
+
id: "dockerfile",
|
|
12
|
+
extensions: [".dockerfile"],
|
|
13
|
+
filenames: ["Dockerfile"],
|
|
14
|
+
aliases: ["Dockerfile"],
|
|
15
|
+
loader: () => {
|
|
16
|
+
{
|
|
17
|
+
return import('./dockerfile.js');
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
});
|