@codingame/monaco-vscode-standalone-languages 23.1.1 → 23.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/index.js +48 -82
- package/package.json +2 -2
- package/_.contribution.js +0 -74
- package/abap/abap.contribution.js +0 -19
- package/abap/abap.js +0 -1406
- package/apex/apex.contribution.js +0 -20
- package/apex/apex.js +0 -338
- package/azcli/azcli.contribution.js +0 -19
- package/azcli/azcli.js +0 -76
- package/bat/bat.contribution.js +0 -19
- package/bat/bat.js +0 -108
- package/bicep/bicep.contribution.js +0 -19
- package/bicep/bicep.js +0 -117
- package/cameligo/cameligo.contribution.js +0 -19
- package/cameligo/cameligo.js +0 -182
- package/clojure/clojure.contribution.js +0 -19
- package/clojure/clojure.js +0 -769
- package/coffee/coffee.contribution.js +0 -20
- package/coffee/coffee.js +0 -240
- package/cpp/cpp.contribution.js +0 -29
- package/cpp/cpp.js +0 -397
- package/csharp/csharp.contribution.js +0 -19
- package/csharp/csharp.js +0 -334
- package/csp/csp.contribution.js +0 -19
- package/csp/csp.js +0 -61
- package/css/css.contribution.js +0 -20
- package/css/css.js +0 -193
- package/cypher/cypher.contribution.js +0 -19
- package/cypher/cypher.js +0 -271
- package/dart/dart.contribution.js +0 -20
- package/dart/dart.js +0 -289
- package/dockerfile/dockerfile.contribution.js +0 -20
- package/dockerfile/dockerfile.js +0 -138
- package/ecl/ecl.contribution.js +0 -19
- package/ecl/ecl.js +0 -464
- package/elixir/elixir.contribution.js +0 -19
- package/elixir/elixir.js +0 -577
- package/flow9/flow9.contribution.js +0 -19
- package/flow9/flow9.js +0 -150
- package/freemarker2/freemarker2.contribution.js +0 -73
- package/freemarker2/freemarker2.js +0 -1016
- package/fsharp/fsharp.contribution.js +0 -19
- package/fsharp/fsharp.js +0 -225
- package/go/go.contribution.js +0 -19
- package/go/go.js +0 -226
- package/graphql/graphql.contribution.js +0 -20
- package/graphql/graphql.js +0 -159
- package/handlebars/handlebars.contribution.js +0 -20
- package/handlebars/handlebars.js +0 -439
- package/hcl/hcl.contribution.js +0 -19
- package/hcl/hcl.js +0 -191
- package/html/html.contribution.js +0 -20
- package/html/html.js +0 -328
- package/ini/ini.contribution.js +0 -20
- package/ini/ini.js +0 -79
- package/java/java.contribution.js +0 -20
- package/java/java.js +0 -240
- package/javascript/javascript.contribution.js +0 -22
- package/javascript/javascript.js +0 -77
- package/julia/julia.contribution.js +0 -19
- package/julia/julia.js +0 -519
- package/kotlin/kotlin.contribution.js +0 -20
- package/kotlin/kotlin.js +0 -261
- package/less/less.contribution.js +0 -20
- package/less/less.js +0 -169
- package/lexon/lexon.contribution.js +0 -19
- package/lexon/lexon.js +0 -165
- package/liquid/liquid.contribution.js +0 -20
- package/liquid/liquid.js +0 -260
- package/lua/lua.contribution.js +0 -19
- package/lua/lua.js +0 -170
- package/m3/m3.contribution.js +0 -19
- package/m3/m3.js +0 -218
- package/markdown/markdown.contribution.js +0 -19
- package/markdown/markdown.js +0 -237
- package/mdx/mdx.contribution.js +0 -19
- package/mdx/mdx.js +0 -184
- package/mips/mips.contribution.js +0 -20
- package/mips/mips.js +0 -206
- package/msdax/msdax.contribution.js +0 -19
- package/msdax/msdax.js +0 -383
- package/mysql/mysql.contribution.js +0 -19
- package/mysql/mysql.js +0 -886
- package/objective-c/objective-c.contribution.js +0 -19
- package/objective-c/objective-c.js +0 -191
- package/pascal/pascal.contribution.js +0 -20
- package/pascal/pascal.js +0 -259
- package/pascaligo/pascaligo.contribution.js +0 -19
- package/pascaligo/pascaligo.js +0 -172
- package/perl/perl.contribution.js +0 -19
- package/perl/perl.js +0 -634
- package/pgsql/pgsql.contribution.js +0 -19
- package/pgsql/pgsql.js +0 -859
- package/php/php.contribution.js +0 -20
- package/php/php.js +0 -508
- package/pla/pla.contribution.js +0 -18
- package/pla/pla.js +0 -145
- package/postiats/postiats.contribution.js +0 -19
- package/postiats/postiats.js +0 -915
- package/powerquery/powerquery.contribution.js +0 -19
- package/powerquery/powerquery.js +0 -898
- package/powershell/powershell.contribution.js +0 -19
- package/powershell/powershell.js +0 -247
- package/protobuf/protobuf.contribution.js +0 -19
- package/protobuf/protobuf.js +0 -428
- package/pug/pug.contribution.js +0 -19
- package/pug/pug.js +0 -410
- package/python/python.contribution.js +0 -20
- package/python/python.js +0 -320
- package/qsharp/qsharp.contribution.js +0 -19
- package/qsharp/qsharp.js +0 -309
- package/r/r.contribution.js +0 -19
- package/r/r.js +0 -251
- package/razor/razor.contribution.js +0 -20
- package/razor/razor.js +0 -570
- package/redis/redis.contribution.js +0 -19
- package/redis/redis.js +0 -310
- package/redshift/redshift.contribution.js +0 -19
- package/redshift/redshift.js +0 -817
- package/restructuredtext/restructuredtext.contribution.js +0 -19
- package/restructuredtext/restructuredtext.js +0 -182
- package/ruby/ruby.contribution.js +0 -20
- package/ruby/ruby.js +0 -519
- package/rust/rust.contribution.js +0 -19
- package/rust/rust.js +0 -351
- package/sb/sb.contribution.js +0 -19
- package/sb/sb.js +0 -123
- package/scala/scala.contribution.js +0 -20
- package/scala/scala.js +0 -378
- package/scheme/scheme.contribution.js +0 -19
- package/scheme/scheme.js +0 -116
- package/scss/scss.contribution.js +0 -20
- package/scss/scss.js +0 -268
- package/shell/shell.contribution.js +0 -19
- package/shell/shell.js +0 -229
- package/solidity/solidity.contribution.js +0 -19
- package/solidity/solidity.js +0 -1375
- package/sophia/sophia.contribution.js +0 -19
- package/sophia/sophia.js +0 -207
- package/sparql/sparql.contribution.js +0 -19
- package/sparql/sparql.js +0 -209
- package/sql/sql.contribution.js +0 -19
- package/sql/sql.js +0 -861
- package/st/st.contribution.js +0 -19
- package/st/st.js +0 -424
- package/swift/swift.contribution.js +0 -20
- package/swift/swift.js +0 -320
- package/systemverilog/systemverilog.contribution.js +0 -29
- package/systemverilog/systemverilog.js +0 -584
- package/tcl/tcl.contribution.js +0 -19
- package/tcl/tcl.js +0 -240
- package/twig/twig.contribution.js +0 -20
- package/twig/twig.js +0 -400
- package/typescript/typescript.contribution.js +0 -20
- package/typescript/typescript.js +0 -362
- package/typespec/typespec.contribution.js +0 -19
- package/typespec/typespec.js +0 -135
- package/vb/vb.contribution.js +0 -19
- package/vb/vb.js +0 -380
- package/wgsl/wgsl.contribution.js +0 -19
- package/wgsl/wgsl.js +0 -461
- package/xml/xml.contribution.js +0 -39
- package/xml/xml.js +0 -114
- package/yaml/yaml.contribution.js +0 -20
- package/yaml/yaml.js +0 -225
package/typescript/typescript.js
DELETED
|
@@ -1,362 +0,0 @@
|
|
|
1
|
-
import * as monaco_editor_core_star from 'monaco-editor';
|
|
2
|
-
|
|
3
|
-
/*!-----------------------------------------------------------------------------
|
|
4
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5
|
-
* Version: 0.54.0(undefined)
|
|
6
|
-
* Released under the MIT license
|
|
7
|
-
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
8
|
-
*-----------------------------------------------------------------------------*/
|
|
9
|
-
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
-
var __copyProps = (to, from, except, desc) => {
|
|
15
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
-
for (let key of __getOwnPropNames(from))
|
|
17
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget);
|
|
23
|
-
|
|
24
|
-
// src/fillers/monaco-editor-core.ts
|
|
25
|
-
var monaco_editor_core_exports = {};
|
|
26
|
-
__reExport(monaco_editor_core_exports, monaco_editor_core_star);
|
|
27
|
-
|
|
28
|
-
// src/basic-languages/typescript/typescript.ts
|
|
29
|
-
var conf = {
|
|
30
|
-
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
|
31
|
-
comments: {
|
|
32
|
-
lineComment: "//",
|
|
33
|
-
blockComment: ["/*", "*/"]
|
|
34
|
-
},
|
|
35
|
-
brackets: [
|
|
36
|
-
["{", "}"],
|
|
37
|
-
["[", "]"],
|
|
38
|
-
["(", ")"]
|
|
39
|
-
],
|
|
40
|
-
onEnterRules: [
|
|
41
|
-
{
|
|
42
|
-
// e.g. /** | */
|
|
43
|
-
beforeText: /^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,
|
|
44
|
-
afterText: /^\s*\*\/$/,
|
|
45
|
-
action: {
|
|
46
|
-
indentAction: monaco_editor_core_exports.languages.IndentAction.IndentOutdent,
|
|
47
|
-
appendText: " * "
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
// e.g. /** ...|
|
|
52
|
-
beforeText: /^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,
|
|
53
|
-
action: {
|
|
54
|
-
indentAction: monaco_editor_core_exports.languages.IndentAction.None,
|
|
55
|
-
appendText: " * "
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
// e.g. * ...|
|
|
60
|
-
beforeText: /^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,
|
|
61
|
-
action: {
|
|
62
|
-
indentAction: monaco_editor_core_exports.languages.IndentAction.None,
|
|
63
|
-
appendText: "* "
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
// e.g. */|
|
|
68
|
-
beforeText: /^(\t|(\ \ ))*\ \*\/\s*$/,
|
|
69
|
-
action: {
|
|
70
|
-
indentAction: monaco_editor_core_exports.languages.IndentAction.None,
|
|
71
|
-
removeText: 1
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
],
|
|
75
|
-
autoClosingPairs: [
|
|
76
|
-
{ open: "{", close: "}" },
|
|
77
|
-
{ open: "[", close: "]" },
|
|
78
|
-
{ open: "(", close: ")" },
|
|
79
|
-
{ open: '"', close: '"', notIn: ["string"] },
|
|
80
|
-
{ open: "'", close: "'", notIn: ["string", "comment"] },
|
|
81
|
-
{ open: "`", close: "`", notIn: ["string", "comment"] },
|
|
82
|
-
{ open: "/**", close: " */", notIn: ["string"] }
|
|
83
|
-
],
|
|
84
|
-
folding: {
|
|
85
|
-
markers: {
|
|
86
|
-
start: new RegExp("^\\s*//\\s*#?region\\b"),
|
|
87
|
-
end: new RegExp("^\\s*//\\s*#?endregion\\b")
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
var language = {
|
|
92
|
-
// Set defaultToken to invalid to see what you do not tokenize yet
|
|
93
|
-
defaultToken: "invalid",
|
|
94
|
-
tokenPostfix: ".ts",
|
|
95
|
-
keywords: [
|
|
96
|
-
// Should match the keys of textToKeywordObj in
|
|
97
|
-
// https://github.com/microsoft/TypeScript/blob/master/src/compiler/scanner.ts
|
|
98
|
-
"abstract",
|
|
99
|
-
"any",
|
|
100
|
-
"as",
|
|
101
|
-
"asserts",
|
|
102
|
-
"bigint",
|
|
103
|
-
"boolean",
|
|
104
|
-
"break",
|
|
105
|
-
"case",
|
|
106
|
-
"catch",
|
|
107
|
-
"class",
|
|
108
|
-
"continue",
|
|
109
|
-
"const",
|
|
110
|
-
"constructor",
|
|
111
|
-
"debugger",
|
|
112
|
-
"declare",
|
|
113
|
-
"default",
|
|
114
|
-
"delete",
|
|
115
|
-
"do",
|
|
116
|
-
"else",
|
|
117
|
-
"enum",
|
|
118
|
-
"export",
|
|
119
|
-
"extends",
|
|
120
|
-
"false",
|
|
121
|
-
"finally",
|
|
122
|
-
"for",
|
|
123
|
-
"from",
|
|
124
|
-
"function",
|
|
125
|
-
"get",
|
|
126
|
-
"if",
|
|
127
|
-
"implements",
|
|
128
|
-
"import",
|
|
129
|
-
"in",
|
|
130
|
-
"infer",
|
|
131
|
-
"instanceof",
|
|
132
|
-
"interface",
|
|
133
|
-
"is",
|
|
134
|
-
"keyof",
|
|
135
|
-
"let",
|
|
136
|
-
"module",
|
|
137
|
-
"namespace",
|
|
138
|
-
"never",
|
|
139
|
-
"new",
|
|
140
|
-
"null",
|
|
141
|
-
"number",
|
|
142
|
-
"object",
|
|
143
|
-
"out",
|
|
144
|
-
"package",
|
|
145
|
-
"private",
|
|
146
|
-
"protected",
|
|
147
|
-
"public",
|
|
148
|
-
"override",
|
|
149
|
-
"readonly",
|
|
150
|
-
"require",
|
|
151
|
-
"global",
|
|
152
|
-
"return",
|
|
153
|
-
"satisfies",
|
|
154
|
-
"set",
|
|
155
|
-
"static",
|
|
156
|
-
"string",
|
|
157
|
-
"super",
|
|
158
|
-
"switch",
|
|
159
|
-
"symbol",
|
|
160
|
-
"this",
|
|
161
|
-
"throw",
|
|
162
|
-
"true",
|
|
163
|
-
"try",
|
|
164
|
-
"type",
|
|
165
|
-
"typeof",
|
|
166
|
-
"undefined",
|
|
167
|
-
"unique",
|
|
168
|
-
"unknown",
|
|
169
|
-
"var",
|
|
170
|
-
"void",
|
|
171
|
-
"while",
|
|
172
|
-
"with",
|
|
173
|
-
"yield",
|
|
174
|
-
"async",
|
|
175
|
-
"await",
|
|
176
|
-
"of"
|
|
177
|
-
],
|
|
178
|
-
operators: [
|
|
179
|
-
"<=",
|
|
180
|
-
">=",
|
|
181
|
-
"==",
|
|
182
|
-
"!=",
|
|
183
|
-
"===",
|
|
184
|
-
"!==",
|
|
185
|
-
"=>",
|
|
186
|
-
"+",
|
|
187
|
-
"-",
|
|
188
|
-
"**",
|
|
189
|
-
"*",
|
|
190
|
-
"/",
|
|
191
|
-
"%",
|
|
192
|
-
"++",
|
|
193
|
-
"--",
|
|
194
|
-
"<<",
|
|
195
|
-
"</",
|
|
196
|
-
">>",
|
|
197
|
-
">>>",
|
|
198
|
-
"&",
|
|
199
|
-
"|",
|
|
200
|
-
"^",
|
|
201
|
-
"!",
|
|
202
|
-
"~",
|
|
203
|
-
"&&",
|
|
204
|
-
"||",
|
|
205
|
-
"??",
|
|
206
|
-
"?",
|
|
207
|
-
":",
|
|
208
|
-
"=",
|
|
209
|
-
"+=",
|
|
210
|
-
"-=",
|
|
211
|
-
"*=",
|
|
212
|
-
"**=",
|
|
213
|
-
"/=",
|
|
214
|
-
"%=",
|
|
215
|
-
"<<=",
|
|
216
|
-
">>=",
|
|
217
|
-
">>>=",
|
|
218
|
-
"&=",
|
|
219
|
-
"|=",
|
|
220
|
-
"^=",
|
|
221
|
-
"@"
|
|
222
|
-
],
|
|
223
|
-
// we include these common regular expressions
|
|
224
|
-
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
|
225
|
-
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
|
226
|
-
digits: /\d+(_+\d+)*/,
|
|
227
|
-
octaldigits: /[0-7]+(_+[0-7]+)*/,
|
|
228
|
-
binarydigits: /[0-1]+(_+[0-1]+)*/,
|
|
229
|
-
hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
|
|
230
|
-
regexpctl: /[(){}\[\]\$\^|\-*+?\.]/,
|
|
231
|
-
regexpesc: /\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,
|
|
232
|
-
// The main tokenizer for our languages
|
|
233
|
-
tokenizer: {
|
|
234
|
-
root: [[/[{}]/, "delimiter.bracket"], { include: "common" }],
|
|
235
|
-
common: [
|
|
236
|
-
// identifiers and keywords
|
|
237
|
-
[
|
|
238
|
-
/#?[a-z_$][\w$]*/,
|
|
239
|
-
{
|
|
240
|
-
cases: {
|
|
241
|
-
"@keywords": "keyword",
|
|
242
|
-
"@default": "identifier"
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
],
|
|
246
|
-
[/[A-Z][\w\$]*/, "type.identifier"],
|
|
247
|
-
// to show class names nicely
|
|
248
|
-
// [/[A-Z][\w\$]*/, 'identifier'],
|
|
249
|
-
// whitespace
|
|
250
|
-
{ include: "@whitespace" },
|
|
251
|
-
// regular expression: ensure it is terminated before beginning (otherwise it is an opeator)
|
|
252
|
-
[
|
|
253
|
-
/\/(?=([^\\\/]|\\.)+\/([dgimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,
|
|
254
|
-
{ token: "regexp", bracket: "@open", next: "@regexp" }
|
|
255
|
-
],
|
|
256
|
-
// delimiters and operators
|
|
257
|
-
[/[()\[\]]/, "@brackets"],
|
|
258
|
-
[/[<>](?!@symbols)/, "@brackets"],
|
|
259
|
-
[/!(?=([^=]|$))/, "delimiter"],
|
|
260
|
-
[
|
|
261
|
-
/@symbols/,
|
|
262
|
-
{
|
|
263
|
-
cases: {
|
|
264
|
-
"@operators": "delimiter",
|
|
265
|
-
"@default": ""
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
],
|
|
269
|
-
// numbers
|
|
270
|
-
[/(@digits)[eE]([\-+]?(@digits))?/, "number.float"],
|
|
271
|
-
[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/, "number.float"],
|
|
272
|
-
[/0[xX](@hexdigits)n?/, "number.hex"],
|
|
273
|
-
[/0[oO]?(@octaldigits)n?/, "number.octal"],
|
|
274
|
-
[/0[bB](@binarydigits)n?/, "number.binary"],
|
|
275
|
-
[/(@digits)n?/, "number"],
|
|
276
|
-
// delimiter: after number because of .\d floats
|
|
277
|
-
[/[;,.]/, "delimiter"],
|
|
278
|
-
// strings
|
|
279
|
-
[/"([^"\\]|\\.)*$/, "string.invalid"],
|
|
280
|
-
// non-teminated string
|
|
281
|
-
[/'([^'\\]|\\.)*$/, "string.invalid"],
|
|
282
|
-
// non-teminated string
|
|
283
|
-
[/"/, "string", "@string_double"],
|
|
284
|
-
[/'/, "string", "@string_single"],
|
|
285
|
-
[/`/, "string", "@string_backtick"]
|
|
286
|
-
],
|
|
287
|
-
whitespace: [
|
|
288
|
-
[/[ \t\r\n]+/, ""],
|
|
289
|
-
[/\/\*\*(?!\/)/, "comment.doc", "@jsdoc"],
|
|
290
|
-
[/\/\*/, "comment", "@comment"],
|
|
291
|
-
[/\/\/.*$/, "comment"]
|
|
292
|
-
],
|
|
293
|
-
comment: [
|
|
294
|
-
[/[^\/*]+/, "comment"],
|
|
295
|
-
[/\*\//, "comment", "@pop"],
|
|
296
|
-
[/[\/*]/, "comment"]
|
|
297
|
-
],
|
|
298
|
-
jsdoc: [
|
|
299
|
-
[/[^\/*]+/, "comment.doc"],
|
|
300
|
-
[/\*\//, "comment.doc", "@pop"],
|
|
301
|
-
[/[\/*]/, "comment.doc"]
|
|
302
|
-
],
|
|
303
|
-
// We match regular expression quite precisely
|
|
304
|
-
regexp: [
|
|
305
|
-
[
|
|
306
|
-
/(\{)(\d+(?:,\d*)?)(\})/,
|
|
307
|
-
["regexp.escape.control", "regexp.escape.control", "regexp.escape.control"]
|
|
308
|
-
],
|
|
309
|
-
[
|
|
310
|
-
/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,
|
|
311
|
-
["regexp.escape.control", { token: "regexp.escape.control", next: "@regexrange" }]
|
|
312
|
-
],
|
|
313
|
-
[/(\()(\?:|\?=|\?!)/, ["regexp.escape.control", "regexp.escape.control"]],
|
|
314
|
-
[/[()]/, "regexp.escape.control"],
|
|
315
|
-
[/@regexpctl/, "regexp.escape.control"],
|
|
316
|
-
[/[^\\\/]/, "regexp"],
|
|
317
|
-
[/@regexpesc/, "regexp.escape"],
|
|
318
|
-
[/\\\./, "regexp.invalid"],
|
|
319
|
-
[/(\/)([dgimsuy]*)/, [{ token: "regexp", bracket: "@close", next: "@pop" }, "keyword.other"]]
|
|
320
|
-
],
|
|
321
|
-
regexrange: [
|
|
322
|
-
[/-/, "regexp.escape.control"],
|
|
323
|
-
[/\^/, "regexp.invalid"],
|
|
324
|
-
[/@regexpesc/, "regexp.escape"],
|
|
325
|
-
[/[^\]]/, "regexp"],
|
|
326
|
-
[
|
|
327
|
-
/\]/,
|
|
328
|
-
{
|
|
329
|
-
token: "regexp.escape.control",
|
|
330
|
-
next: "@pop",
|
|
331
|
-
bracket: "@close"
|
|
332
|
-
}
|
|
333
|
-
]
|
|
334
|
-
],
|
|
335
|
-
string_double: [
|
|
336
|
-
[/[^\\"]+/, "string"],
|
|
337
|
-
[/@escapes/, "string.escape"],
|
|
338
|
-
[/\\./, "string.escape.invalid"],
|
|
339
|
-
[/"/, "string", "@pop"]
|
|
340
|
-
],
|
|
341
|
-
string_single: [
|
|
342
|
-
[/[^\\']+/, "string"],
|
|
343
|
-
[/@escapes/, "string.escape"],
|
|
344
|
-
[/\\./, "string.escape.invalid"],
|
|
345
|
-
[/'/, "string", "@pop"]
|
|
346
|
-
],
|
|
347
|
-
string_backtick: [
|
|
348
|
-
[/\$\{/, { token: "delimiter.bracket", next: "@bracketCounting" }],
|
|
349
|
-
[/[^\\`$]+/, "string"],
|
|
350
|
-
[/@escapes/, "string.escape"],
|
|
351
|
-
[/\\./, "string.escape.invalid"],
|
|
352
|
-
[/`/, "string", "@pop"]
|
|
353
|
-
],
|
|
354
|
-
bracketCounting: [
|
|
355
|
-
[/\{/, "delimiter.bracket", "@bracketCounting"],
|
|
356
|
-
[/\}/, "delimiter.bracket", "@pop"],
|
|
357
|
-
{ include: "common" }
|
|
358
|
-
]
|
|
359
|
-
}
|
|
360
|
-
};
|
|
361
|
-
|
|
362
|
-
export { conf, language };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { registerLanguage } from '../_.contribution.js';
|
|
2
|
-
|
|
3
|
-
/*!-----------------------------------------------------------------------------
|
|
4
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5
|
-
* Version: 0.54.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: "typespec",
|
|
12
|
-
extensions: [".tsp"],
|
|
13
|
-
aliases: ["TypeSpec"],
|
|
14
|
-
loader: () => {
|
|
15
|
-
{
|
|
16
|
-
return import('./typespec.js');
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
});
|
package/typespec/typespec.js
DELETED
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
/*!-----------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Version: 0.54.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/typespec/typespec.ts
|
|
10
|
-
var bounded = (text) => `\\b${text}\\b`;
|
|
11
|
-
var notBefore = (regex) => `(?!${regex})`;
|
|
12
|
-
var identifierStart = "[_a-zA-Z]";
|
|
13
|
-
var identifierContinue = "[_a-zA-Z0-9]";
|
|
14
|
-
var identifier = bounded(`${identifierStart}${identifierContinue}*`);
|
|
15
|
-
var directive = bounded(`[_a-zA-Z-0-9]+`);
|
|
16
|
-
var keywords = [
|
|
17
|
-
"import",
|
|
18
|
-
"model",
|
|
19
|
-
"scalar",
|
|
20
|
-
"namespace",
|
|
21
|
-
"op",
|
|
22
|
-
"interface",
|
|
23
|
-
"union",
|
|
24
|
-
"using",
|
|
25
|
-
"is",
|
|
26
|
-
"extends",
|
|
27
|
-
"enum",
|
|
28
|
-
"alias",
|
|
29
|
-
"return",
|
|
30
|
-
"void",
|
|
31
|
-
"if",
|
|
32
|
-
"else",
|
|
33
|
-
"projection",
|
|
34
|
-
"dec",
|
|
35
|
-
"extern",
|
|
36
|
-
"fn"
|
|
37
|
-
];
|
|
38
|
-
var namedLiterals = ["true", "false", "null", "unknown", "never"];
|
|
39
|
-
var nonCommentWs = `[ \\t\\r\\n]`;
|
|
40
|
-
var numericLiteral = `[0-9]+`;
|
|
41
|
-
var conf = {
|
|
42
|
-
comments: {
|
|
43
|
-
lineComment: "//",
|
|
44
|
-
blockComment: ["/*", "*/"]
|
|
45
|
-
},
|
|
46
|
-
brackets: [
|
|
47
|
-
["{", "}"],
|
|
48
|
-
["[", "]"],
|
|
49
|
-
["(", ")"]
|
|
50
|
-
],
|
|
51
|
-
autoClosingPairs: [
|
|
52
|
-
{ open: "{", close: "}" },
|
|
53
|
-
{ open: "[", close: "]" },
|
|
54
|
-
{ open: "(", close: ")" },
|
|
55
|
-
{ open: '"', close: '"' },
|
|
56
|
-
{ open: "/**", close: " */", notIn: ["string"] }
|
|
57
|
-
],
|
|
58
|
-
surroundingPairs: [
|
|
59
|
-
{ open: "{", close: "}" },
|
|
60
|
-
{ open: "[", close: "]" },
|
|
61
|
-
{ open: "(", close: ")" },
|
|
62
|
-
{ open: '"', close: '"' }
|
|
63
|
-
],
|
|
64
|
-
indentationRules: {
|
|
65
|
-
decreaseIndentPattern: new RegExp("^((?!.*?/\\*).*\\*/)?\\s*[\\}\\]].*$"),
|
|
66
|
-
increaseIndentPattern: new RegExp(
|
|
67
|
-
"^((?!//).)*(\\{([^}\"'`/]*|(\\t|[ ])*//.*)|\\([^)\"'`/]*|\\[[^\\]\"'`/]*)$"
|
|
68
|
-
),
|
|
69
|
-
// e.g. * ...| or */| or *-----*/|
|
|
70
|
-
unIndentedLinePattern: new RegExp(
|
|
71
|
-
"^(\\t|[ ])*[ ]\\*[^/]*\\*/\\s*$|^(\\t|[ ])*[ ]\\*/\\s*$|^(\\t|[ ])*[ ]\\*([ ]([^\\*]|\\*(?!/))*)?$"
|
|
72
|
-
)
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
var language = {
|
|
76
|
-
defaultToken: "",
|
|
77
|
-
tokenPostfix: ".tsp",
|
|
78
|
-
brackets: [
|
|
79
|
-
{ open: "{", close: "}", token: "delimiter.curly" },
|
|
80
|
-
{ open: "[", close: "]", token: "delimiter.square" },
|
|
81
|
-
{ open: "(", close: ")", token: "delimiter.parenthesis" }
|
|
82
|
-
],
|
|
83
|
-
symbols: /[=:;<>]+/,
|
|
84
|
-
keywords,
|
|
85
|
-
namedLiterals,
|
|
86
|
-
escapes: `\\\\(u{[0-9A-Fa-f]+}|n|r|t|\\\\|"|\\\${)`,
|
|
87
|
-
tokenizer: {
|
|
88
|
-
root: [{ include: "@expression" }, { include: "@whitespace" }],
|
|
89
|
-
stringVerbatim: [
|
|
90
|
-
{ regex: `(|"|"")[^"]`, action: { token: "string" } },
|
|
91
|
-
{ regex: `"""${notBefore(`"`)}`, action: { token: "string", next: "@pop" } }
|
|
92
|
-
],
|
|
93
|
-
stringLiteral: [
|
|
94
|
-
{ regex: `\\\${`, action: { token: "delimiter.bracket", next: "@bracketCounting" } },
|
|
95
|
-
{ regex: `[^\\\\"$]+`, action: { token: "string" } },
|
|
96
|
-
{ regex: "@escapes", action: { token: "string.escape" } },
|
|
97
|
-
{ regex: `\\\\.`, action: { token: "string.escape.invalid" } },
|
|
98
|
-
{ regex: `"`, action: { token: "string", next: "@pop" } }
|
|
99
|
-
],
|
|
100
|
-
bracketCounting: [
|
|
101
|
-
{ regex: `{`, action: { token: "delimiter.bracket", next: "@bracketCounting" } },
|
|
102
|
-
{ regex: `}`, action: { token: "delimiter.bracket", next: "@pop" } },
|
|
103
|
-
{ include: "@expression" }
|
|
104
|
-
],
|
|
105
|
-
comment: [
|
|
106
|
-
{ regex: `[^\\*]+`, action: { token: "comment" } },
|
|
107
|
-
{ regex: `\\*\\/`, action: { token: "comment", next: "@pop" } },
|
|
108
|
-
{ regex: `[\\/*]`, action: { token: "comment" } }
|
|
109
|
-
],
|
|
110
|
-
whitespace: [
|
|
111
|
-
{ regex: nonCommentWs },
|
|
112
|
-
{ regex: `\\/\\*`, action: { token: "comment", next: "@comment" } },
|
|
113
|
-
{ regex: `\\/\\/.*$`, action: { token: "comment" } }
|
|
114
|
-
],
|
|
115
|
-
expression: [
|
|
116
|
-
{ regex: `"""`, action: { token: "string", next: "@stringVerbatim" } },
|
|
117
|
-
{ regex: `"${notBefore(`""`)}`, action: { token: "string", next: "@stringLiteral" } },
|
|
118
|
-
{ regex: numericLiteral, action: { token: "number" } },
|
|
119
|
-
{
|
|
120
|
-
regex: identifier,
|
|
121
|
-
action: {
|
|
122
|
-
cases: {
|
|
123
|
-
"@keywords": { token: "keyword" },
|
|
124
|
-
"@namedLiterals": { token: "keyword" },
|
|
125
|
-
"@default": { token: "identifier" }
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
{ regex: `@${identifier}`, action: { token: "tag" } },
|
|
130
|
-
{ regex: `#${directive}`, action: { token: "directive" } }
|
|
131
|
-
]
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
export { conf, language };
|
package/vb/vb.contribution.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { registerLanguage } from '../_.contribution.js';
|
|
2
|
-
|
|
3
|
-
/*!-----------------------------------------------------------------------------
|
|
4
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5
|
-
* Version: 0.54.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: "vb",
|
|
12
|
-
extensions: [".vb"],
|
|
13
|
-
aliases: ["Visual Basic", "vb"],
|
|
14
|
-
loader: () => {
|
|
15
|
-
{
|
|
16
|
-
return import('./vb.js');
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
});
|