@codingame/monaco-vscode-standalone-languages 23.1.1 → 23.2.1
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/python/python.js
DELETED
|
@@ -1,320 +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/python/python.ts
|
|
29
|
-
var conf = {
|
|
30
|
-
comments: {
|
|
31
|
-
lineComment: "#",
|
|
32
|
-
blockComment: ["'''", "'''"]
|
|
33
|
-
},
|
|
34
|
-
brackets: [
|
|
35
|
-
["{", "}"],
|
|
36
|
-
["[", "]"],
|
|
37
|
-
["(", ")"]
|
|
38
|
-
],
|
|
39
|
-
autoClosingPairs: [
|
|
40
|
-
{ open: "{", close: "}" },
|
|
41
|
-
{ open: "[", close: "]" },
|
|
42
|
-
{ open: "(", close: ")" },
|
|
43
|
-
{ open: '"', close: '"', notIn: ["string"] },
|
|
44
|
-
{ open: "'", close: "'", notIn: ["string", "comment"] }
|
|
45
|
-
],
|
|
46
|
-
surroundingPairs: [
|
|
47
|
-
{ open: "{", close: "}" },
|
|
48
|
-
{ open: "[", close: "]" },
|
|
49
|
-
{ open: "(", close: ")" },
|
|
50
|
-
{ open: '"', close: '"' },
|
|
51
|
-
{ open: "'", close: "'" }
|
|
52
|
-
],
|
|
53
|
-
onEnterRules: [
|
|
54
|
-
{
|
|
55
|
-
beforeText: new RegExp(
|
|
56
|
-
"^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async|match|case).*?:\\s*$"
|
|
57
|
-
),
|
|
58
|
-
action: { indentAction: monaco_editor_core_exports.languages.IndentAction.Indent }
|
|
59
|
-
}
|
|
60
|
-
],
|
|
61
|
-
folding: {
|
|
62
|
-
offSide: true,
|
|
63
|
-
markers: {
|
|
64
|
-
start: new RegExp("^\\s*#region\\b"),
|
|
65
|
-
end: new RegExp("^\\s*#endregion\\b")
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
var language = {
|
|
70
|
-
defaultToken: "",
|
|
71
|
-
tokenPostfix: ".python",
|
|
72
|
-
keywords: [
|
|
73
|
-
// This section is the result of running
|
|
74
|
-
// `import keyword; for k in sorted(keyword.kwlist + keyword.softkwlist): print(" '" + k + "',")`
|
|
75
|
-
// in a Python REPL,
|
|
76
|
-
// though note that the output from Python 3 is not a strict superset of the
|
|
77
|
-
// output from Python 2.
|
|
78
|
-
"False",
|
|
79
|
-
// promoted to keyword.kwlist in Python 3
|
|
80
|
-
"None",
|
|
81
|
-
// promoted to keyword.kwlist in Python 3
|
|
82
|
-
"True",
|
|
83
|
-
// promoted to keyword.kwlist in Python 3
|
|
84
|
-
"_",
|
|
85
|
-
// new in Python 3.10
|
|
86
|
-
"and",
|
|
87
|
-
"as",
|
|
88
|
-
"assert",
|
|
89
|
-
"async",
|
|
90
|
-
// new in Python 3
|
|
91
|
-
"await",
|
|
92
|
-
// new in Python 3
|
|
93
|
-
"break",
|
|
94
|
-
"case",
|
|
95
|
-
// new in Python 3.10
|
|
96
|
-
"class",
|
|
97
|
-
"continue",
|
|
98
|
-
"def",
|
|
99
|
-
"del",
|
|
100
|
-
"elif",
|
|
101
|
-
"else",
|
|
102
|
-
"except",
|
|
103
|
-
"exec",
|
|
104
|
-
// Python 2, but not 3.
|
|
105
|
-
"finally",
|
|
106
|
-
"for",
|
|
107
|
-
"from",
|
|
108
|
-
"global",
|
|
109
|
-
"if",
|
|
110
|
-
"import",
|
|
111
|
-
"in",
|
|
112
|
-
"is",
|
|
113
|
-
"lambda",
|
|
114
|
-
"match",
|
|
115
|
-
// new in Python 3.10
|
|
116
|
-
"nonlocal",
|
|
117
|
-
// new in Python 3
|
|
118
|
-
"not",
|
|
119
|
-
"or",
|
|
120
|
-
"pass",
|
|
121
|
-
"print",
|
|
122
|
-
// Python 2, but not 3.
|
|
123
|
-
"raise",
|
|
124
|
-
"return",
|
|
125
|
-
"try",
|
|
126
|
-
"type",
|
|
127
|
-
// new in Python 3.12
|
|
128
|
-
"while",
|
|
129
|
-
"with",
|
|
130
|
-
"yield",
|
|
131
|
-
"int",
|
|
132
|
-
"float",
|
|
133
|
-
"long",
|
|
134
|
-
"complex",
|
|
135
|
-
"hex",
|
|
136
|
-
"abs",
|
|
137
|
-
"all",
|
|
138
|
-
"any",
|
|
139
|
-
"apply",
|
|
140
|
-
"basestring",
|
|
141
|
-
"bin",
|
|
142
|
-
"bool",
|
|
143
|
-
"buffer",
|
|
144
|
-
"bytearray",
|
|
145
|
-
"callable",
|
|
146
|
-
"chr",
|
|
147
|
-
"classmethod",
|
|
148
|
-
"cmp",
|
|
149
|
-
"coerce",
|
|
150
|
-
"compile",
|
|
151
|
-
"complex",
|
|
152
|
-
"delattr",
|
|
153
|
-
"dict",
|
|
154
|
-
"dir",
|
|
155
|
-
"divmod",
|
|
156
|
-
"enumerate",
|
|
157
|
-
"eval",
|
|
158
|
-
"execfile",
|
|
159
|
-
"file",
|
|
160
|
-
"filter",
|
|
161
|
-
"format",
|
|
162
|
-
"frozenset",
|
|
163
|
-
"getattr",
|
|
164
|
-
"globals",
|
|
165
|
-
"hasattr",
|
|
166
|
-
"hash",
|
|
167
|
-
"help",
|
|
168
|
-
"id",
|
|
169
|
-
"input",
|
|
170
|
-
"intern",
|
|
171
|
-
"isinstance",
|
|
172
|
-
"issubclass",
|
|
173
|
-
"iter",
|
|
174
|
-
"len",
|
|
175
|
-
"locals",
|
|
176
|
-
"list",
|
|
177
|
-
"map",
|
|
178
|
-
"max",
|
|
179
|
-
"memoryview",
|
|
180
|
-
"min",
|
|
181
|
-
"next",
|
|
182
|
-
"object",
|
|
183
|
-
"oct",
|
|
184
|
-
"open",
|
|
185
|
-
"ord",
|
|
186
|
-
"pow",
|
|
187
|
-
"print",
|
|
188
|
-
"property",
|
|
189
|
-
"reversed",
|
|
190
|
-
"range",
|
|
191
|
-
"raw_input",
|
|
192
|
-
"reduce",
|
|
193
|
-
"reload",
|
|
194
|
-
"repr",
|
|
195
|
-
"reversed",
|
|
196
|
-
"round",
|
|
197
|
-
"self",
|
|
198
|
-
"set",
|
|
199
|
-
"setattr",
|
|
200
|
-
"slice",
|
|
201
|
-
"sorted",
|
|
202
|
-
"staticmethod",
|
|
203
|
-
"str",
|
|
204
|
-
"sum",
|
|
205
|
-
"super",
|
|
206
|
-
"tuple",
|
|
207
|
-
"type",
|
|
208
|
-
"unichr",
|
|
209
|
-
"unicode",
|
|
210
|
-
"vars",
|
|
211
|
-
"xrange",
|
|
212
|
-
"zip",
|
|
213
|
-
"__dict__",
|
|
214
|
-
"__methods__",
|
|
215
|
-
"__members__",
|
|
216
|
-
"__class__",
|
|
217
|
-
"__bases__",
|
|
218
|
-
"__name__",
|
|
219
|
-
"__mro__",
|
|
220
|
-
"__subclasses__",
|
|
221
|
-
"__init__",
|
|
222
|
-
"__import__"
|
|
223
|
-
],
|
|
224
|
-
brackets: [
|
|
225
|
-
{ open: "{", close: "}", token: "delimiter.curly" },
|
|
226
|
-
{ open: "[", close: "]", token: "delimiter.bracket" },
|
|
227
|
-
{ open: "(", close: ")", token: "delimiter.parenthesis" }
|
|
228
|
-
],
|
|
229
|
-
tokenizer: {
|
|
230
|
-
root: [
|
|
231
|
-
{ include: "@whitespace" },
|
|
232
|
-
{ include: "@numbers" },
|
|
233
|
-
{ include: "@strings" },
|
|
234
|
-
[/[,:;]/, "delimiter"],
|
|
235
|
-
[/[{}\[\]()]/, "@brackets"],
|
|
236
|
-
[/@[a-zA-Z_]\w*/, "tag"],
|
|
237
|
-
[
|
|
238
|
-
/[a-zA-Z_]\w*/,
|
|
239
|
-
{
|
|
240
|
-
cases: {
|
|
241
|
-
"@keywords": "keyword",
|
|
242
|
-
"@default": "identifier"
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
]
|
|
246
|
-
],
|
|
247
|
-
// Deal with white space, including single and multi-line comments
|
|
248
|
-
whitespace: [
|
|
249
|
-
[/\s+/, "white"],
|
|
250
|
-
[/(^#.*$)/, "comment"],
|
|
251
|
-
[/'''/, "string", "@endDocString"],
|
|
252
|
-
[/"""/, "string", "@endDblDocString"]
|
|
253
|
-
],
|
|
254
|
-
endDocString: [
|
|
255
|
-
[/[^']+/, "string"],
|
|
256
|
-
[/\\'/, "string"],
|
|
257
|
-
[/'''/, "string", "@popall"],
|
|
258
|
-
[/'/, "string"]
|
|
259
|
-
],
|
|
260
|
-
endDblDocString: [
|
|
261
|
-
[/[^"]+/, "string"],
|
|
262
|
-
[/\\"/, "string"],
|
|
263
|
-
[/"""/, "string", "@popall"],
|
|
264
|
-
[/"/, "string"]
|
|
265
|
-
],
|
|
266
|
-
// Recognize hex, negatives, decimals, imaginaries, longs, and scientific notation
|
|
267
|
-
numbers: [
|
|
268
|
-
[/-?0x([abcdef]|[ABCDEF]|\d)+[lL]?/, "number.hex"],
|
|
269
|
-
[/-?(\d*\.)?\d+([eE][+\-]?\d+)?[jJ]?[lL]?/, "number"]
|
|
270
|
-
],
|
|
271
|
-
// Recognize strings, including those broken across lines with \ (but not without)
|
|
272
|
-
strings: [
|
|
273
|
-
[/'$/, "string.escape", "@popall"],
|
|
274
|
-
[/f'{1,3}/, "string.escape", "@fStringBody"],
|
|
275
|
-
[/'/, "string.escape", "@stringBody"],
|
|
276
|
-
[/"$/, "string.escape", "@popall"],
|
|
277
|
-
[/f"{1,3}/, "string.escape", "@fDblStringBody"],
|
|
278
|
-
[/"/, "string.escape", "@dblStringBody"]
|
|
279
|
-
],
|
|
280
|
-
fStringBody: [
|
|
281
|
-
[/[^\\'\{\}]+$/, "string", "@popall"],
|
|
282
|
-
[/[^\\'\{\}]+/, "string"],
|
|
283
|
-
[/\{[^\}':!=]+/, "identifier", "@fStringDetail"],
|
|
284
|
-
[/\\./, "string"],
|
|
285
|
-
[/'/, "string.escape", "@popall"],
|
|
286
|
-
[/\\$/, "string"]
|
|
287
|
-
],
|
|
288
|
-
stringBody: [
|
|
289
|
-
[/[^\\']+$/, "string", "@popall"],
|
|
290
|
-
[/[^\\']+/, "string"],
|
|
291
|
-
[/\\./, "string"],
|
|
292
|
-
[/'/, "string.escape", "@popall"],
|
|
293
|
-
[/\\$/, "string"]
|
|
294
|
-
],
|
|
295
|
-
fDblStringBody: [
|
|
296
|
-
[/[^\\"\{\}]+$/, "string", "@popall"],
|
|
297
|
-
[/[^\\"\{\}]+/, "string"],
|
|
298
|
-
[/\{[^\}':!=]+/, "identifier", "@fStringDetail"],
|
|
299
|
-
[/\\./, "string"],
|
|
300
|
-
[/"/, "string.escape", "@popall"],
|
|
301
|
-
[/\\$/, "string"]
|
|
302
|
-
],
|
|
303
|
-
dblStringBody: [
|
|
304
|
-
[/[^\\"]+$/, "string", "@popall"],
|
|
305
|
-
[/[^\\"]+/, "string"],
|
|
306
|
-
[/\\./, "string"],
|
|
307
|
-
[/"/, "string.escape", "@popall"],
|
|
308
|
-
[/\\$/, "string"]
|
|
309
|
-
],
|
|
310
|
-
fStringDetail: [
|
|
311
|
-
[/[:][^}]+/, "string"],
|
|
312
|
-
[/[!][ars]/, "string"],
|
|
313
|
-
// only !a, !r, !s are supported by f-strings: https://docs.python.org/3/tutorial/inputoutput.html#formatted-string-literals
|
|
314
|
-
[/=/, "string"],
|
|
315
|
-
[/\}/, "identifier", "@pop"]
|
|
316
|
-
]
|
|
317
|
-
}
|
|
318
|
-
};
|
|
319
|
-
|
|
320
|
-
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: "qsharp",
|
|
12
|
-
extensions: [".qs"],
|
|
13
|
-
aliases: ["Q#", "qsharp"],
|
|
14
|
-
loader: () => {
|
|
15
|
-
{
|
|
16
|
-
return import('./qsharp.js');
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
});
|
package/qsharp/qsharp.js
DELETED
|
@@ -1,309 +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/qsharp/qsharp.ts
|
|
10
|
-
var conf = {
|
|
11
|
-
comments: {
|
|
12
|
-
lineComment: "//"
|
|
13
|
-
},
|
|
14
|
-
brackets: [
|
|
15
|
-
["{", "}"],
|
|
16
|
-
["[", "]"],
|
|
17
|
-
["(", ")"]
|
|
18
|
-
],
|
|
19
|
-
autoClosingPairs: [
|
|
20
|
-
{ open: "{", close: "}" },
|
|
21
|
-
{ open: "[", close: "]" },
|
|
22
|
-
{ open: "(", close: ")" },
|
|
23
|
-
{ open: '"', close: '"', notIn: ["string", "comment"] }
|
|
24
|
-
],
|
|
25
|
-
surroundingPairs: [
|
|
26
|
-
{ open: "{", close: "}" },
|
|
27
|
-
{ open: "[", close: "]" },
|
|
28
|
-
{ open: "(", close: ")" },
|
|
29
|
-
{ open: '"', close: '"' }
|
|
30
|
-
]
|
|
31
|
-
};
|
|
32
|
-
var language = {
|
|
33
|
-
// Set defaultToken to invalid to see what you do not tokenize yet
|
|
34
|
-
keywords: [
|
|
35
|
-
"namespace",
|
|
36
|
-
"open",
|
|
37
|
-
"import",
|
|
38
|
-
"export",
|
|
39
|
-
"as",
|
|
40
|
-
"operation",
|
|
41
|
-
"function",
|
|
42
|
-
"body",
|
|
43
|
-
"adjoint",
|
|
44
|
-
"newtype",
|
|
45
|
-
"struct",
|
|
46
|
-
"controlled",
|
|
47
|
-
"if",
|
|
48
|
-
"elif",
|
|
49
|
-
"else",
|
|
50
|
-
"repeat",
|
|
51
|
-
"until",
|
|
52
|
-
"fixup",
|
|
53
|
-
"for",
|
|
54
|
-
"in",
|
|
55
|
-
"while",
|
|
56
|
-
"return",
|
|
57
|
-
"fail",
|
|
58
|
-
"within",
|
|
59
|
-
"apply",
|
|
60
|
-
"Adjoint",
|
|
61
|
-
"Controlled",
|
|
62
|
-
"Adj",
|
|
63
|
-
"Ctl",
|
|
64
|
-
"is",
|
|
65
|
-
"self",
|
|
66
|
-
"auto",
|
|
67
|
-
"distribute",
|
|
68
|
-
"invert",
|
|
69
|
-
"intrinsic",
|
|
70
|
-
"let",
|
|
71
|
-
"set",
|
|
72
|
-
"w/",
|
|
73
|
-
"new",
|
|
74
|
-
"not",
|
|
75
|
-
"and",
|
|
76
|
-
"or",
|
|
77
|
-
"use",
|
|
78
|
-
"borrow",
|
|
79
|
-
"using",
|
|
80
|
-
"borrowing",
|
|
81
|
-
"mutable",
|
|
82
|
-
"internal"
|
|
83
|
-
],
|
|
84
|
-
typeKeywords: [
|
|
85
|
-
"Unit",
|
|
86
|
-
"Int",
|
|
87
|
-
"BigInt",
|
|
88
|
-
"Double",
|
|
89
|
-
"Bool",
|
|
90
|
-
"String",
|
|
91
|
-
"Qubit",
|
|
92
|
-
"Result",
|
|
93
|
-
"Pauli",
|
|
94
|
-
"Range"
|
|
95
|
-
],
|
|
96
|
-
invalidKeywords: [
|
|
97
|
-
"abstract",
|
|
98
|
-
"base",
|
|
99
|
-
"bool",
|
|
100
|
-
"break",
|
|
101
|
-
"byte",
|
|
102
|
-
"case",
|
|
103
|
-
"catch",
|
|
104
|
-
"char",
|
|
105
|
-
"checked",
|
|
106
|
-
"class",
|
|
107
|
-
"const",
|
|
108
|
-
"continue",
|
|
109
|
-
"decimal",
|
|
110
|
-
"default",
|
|
111
|
-
"delegate",
|
|
112
|
-
"do",
|
|
113
|
-
"double",
|
|
114
|
-
"enum",
|
|
115
|
-
"event",
|
|
116
|
-
"explicit",
|
|
117
|
-
"extern",
|
|
118
|
-
"finally",
|
|
119
|
-
"fixed",
|
|
120
|
-
"float",
|
|
121
|
-
"foreach",
|
|
122
|
-
"goto",
|
|
123
|
-
"implicit",
|
|
124
|
-
"int",
|
|
125
|
-
"interface",
|
|
126
|
-
"lock",
|
|
127
|
-
"long",
|
|
128
|
-
"null",
|
|
129
|
-
"object",
|
|
130
|
-
"operator",
|
|
131
|
-
"out",
|
|
132
|
-
"override",
|
|
133
|
-
"params",
|
|
134
|
-
"private",
|
|
135
|
-
"protected",
|
|
136
|
-
"public",
|
|
137
|
-
"readonly",
|
|
138
|
-
"ref",
|
|
139
|
-
"sbyte",
|
|
140
|
-
"sealed",
|
|
141
|
-
"short",
|
|
142
|
-
"sizeof",
|
|
143
|
-
"stackalloc",
|
|
144
|
-
"static",
|
|
145
|
-
"string",
|
|
146
|
-
"switch",
|
|
147
|
-
"this",
|
|
148
|
-
"throw",
|
|
149
|
-
"try",
|
|
150
|
-
"typeof",
|
|
151
|
-
"unit",
|
|
152
|
-
"ulong",
|
|
153
|
-
"unchecked",
|
|
154
|
-
"unsafe",
|
|
155
|
-
"ushort",
|
|
156
|
-
"virtual",
|
|
157
|
-
"void",
|
|
158
|
-
"volatile"
|
|
159
|
-
],
|
|
160
|
-
constants: ["true", "false", "PauliI", "PauliX", "PauliY", "PauliZ", "One", "Zero"],
|
|
161
|
-
builtin: [
|
|
162
|
-
"X",
|
|
163
|
-
"Y",
|
|
164
|
-
"Z",
|
|
165
|
-
"H",
|
|
166
|
-
"HY",
|
|
167
|
-
"S",
|
|
168
|
-
"T",
|
|
169
|
-
"SWAP",
|
|
170
|
-
"CNOT",
|
|
171
|
-
"CCNOT",
|
|
172
|
-
"MultiX",
|
|
173
|
-
"R",
|
|
174
|
-
"RFrac",
|
|
175
|
-
"Rx",
|
|
176
|
-
"Ry",
|
|
177
|
-
"Rz",
|
|
178
|
-
"R1",
|
|
179
|
-
"R1Frac",
|
|
180
|
-
"Exp",
|
|
181
|
-
"ExpFrac",
|
|
182
|
-
"Measure",
|
|
183
|
-
"M",
|
|
184
|
-
"MultiM",
|
|
185
|
-
"Message",
|
|
186
|
-
"Length",
|
|
187
|
-
"Assert",
|
|
188
|
-
"AssertProb",
|
|
189
|
-
"AssertEqual"
|
|
190
|
-
],
|
|
191
|
-
operators: [
|
|
192
|
-
"and=",
|
|
193
|
-
"<-",
|
|
194
|
-
"->",
|
|
195
|
-
"*",
|
|
196
|
-
"*=",
|
|
197
|
-
"@",
|
|
198
|
-
"!",
|
|
199
|
-
"^",
|
|
200
|
-
"^=",
|
|
201
|
-
":",
|
|
202
|
-
"::",
|
|
203
|
-
".",
|
|
204
|
-
"..",
|
|
205
|
-
"==",
|
|
206
|
-
"...",
|
|
207
|
-
"=",
|
|
208
|
-
"=>",
|
|
209
|
-
">",
|
|
210
|
-
">=",
|
|
211
|
-
"<",
|
|
212
|
-
"<=",
|
|
213
|
-
"-",
|
|
214
|
-
"-=",
|
|
215
|
-
"!=",
|
|
216
|
-
"or=",
|
|
217
|
-
"%",
|
|
218
|
-
"%=",
|
|
219
|
-
"|",
|
|
220
|
-
"+",
|
|
221
|
-
"+=",
|
|
222
|
-
"?",
|
|
223
|
-
"/",
|
|
224
|
-
"/=",
|
|
225
|
-
"&&&",
|
|
226
|
-
"&&&=",
|
|
227
|
-
"^^^",
|
|
228
|
-
"^^^=",
|
|
229
|
-
">>>",
|
|
230
|
-
">>>=",
|
|
231
|
-
"<<<",
|
|
232
|
-
"<<<=",
|
|
233
|
-
"|||",
|
|
234
|
-
"|||=",
|
|
235
|
-
"~~~",
|
|
236
|
-
"_",
|
|
237
|
-
"w/",
|
|
238
|
-
"w/="
|
|
239
|
-
],
|
|
240
|
-
namespaceFollows: ["namespace", "open"],
|
|
241
|
-
importsFollows: ["import"],
|
|
242
|
-
symbols: /[=><!~?:&|+\-*\/\^%@._]+/,
|
|
243
|
-
escapes: /\\[\s\S]/,
|
|
244
|
-
// The main tokenizer for our languages
|
|
245
|
-
tokenizer: {
|
|
246
|
-
root: [
|
|
247
|
-
// identifiers and keywords
|
|
248
|
-
[
|
|
249
|
-
/[a-zA-Z_$][\w$]*/,
|
|
250
|
-
{
|
|
251
|
-
cases: {
|
|
252
|
-
"@namespaceFollows": {
|
|
253
|
-
token: "keyword.$0",
|
|
254
|
-
next: "@namespace"
|
|
255
|
-
},
|
|
256
|
-
"@importsFollows": {
|
|
257
|
-
token: "keyword.$0",
|
|
258
|
-
next: "@imports"
|
|
259
|
-
},
|
|
260
|
-
"@typeKeywords": "type",
|
|
261
|
-
"@keywords": "keyword",
|
|
262
|
-
"@constants": "constant",
|
|
263
|
-
"@builtin": "keyword",
|
|
264
|
-
"@invalidKeywords": "invalid",
|
|
265
|
-
"@default": "identifier"
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
],
|
|
269
|
-
// whitespace
|
|
270
|
-
{ include: "@whitespace" },
|
|
271
|
-
// delimiters and operators
|
|
272
|
-
[/[{}()\[\]]/, "@brackets"],
|
|
273
|
-
[/@symbols/, { cases: { "@operators": "operator", "@default": "" } }],
|
|
274
|
-
// numbers
|
|
275
|
-
[/\d*\.\d+([eE][\-+]?\d+)?/, "number.float"],
|
|
276
|
-
[/\d+/, "number"],
|
|
277
|
-
// delimiter: after number because of .\d floats
|
|
278
|
-
[/[;,.]/, "delimiter"],
|
|
279
|
-
// strings
|
|
280
|
-
//[/"([^"\\]|\\.)*$/, 'string.invalid' ], // non-terminated string
|
|
281
|
-
[/"/, { token: "string.quote", bracket: "@open", next: "@string" }]
|
|
282
|
-
],
|
|
283
|
-
string: [
|
|
284
|
-
[/[^\\"]+/, "string"],
|
|
285
|
-
[/@escapes/, "string.escape"],
|
|
286
|
-
[/"/, { token: "string.quote", bracket: "@close", next: "@pop" }]
|
|
287
|
-
],
|
|
288
|
-
namespace: [
|
|
289
|
-
{ include: "@whitespace" },
|
|
290
|
-
[/[A-Za-z]\w*/, "namespace"],
|
|
291
|
-
[/[\.]/, "delimiter"],
|
|
292
|
-
["", "", "@pop"]
|
|
293
|
-
],
|
|
294
|
-
imports: [
|
|
295
|
-
{ include: "@whitespace" },
|
|
296
|
-
[/[A-Za-z]\w*(?=\.)/, "namespace"],
|
|
297
|
-
[/[A-Za-z]\w*/, "identifier"],
|
|
298
|
-
[/\*/, "wildcard"],
|
|
299
|
-
[/[\.,]/, "delimiter"],
|
|
300
|
-
["", "", "@pop"]
|
|
301
|
-
],
|
|
302
|
-
whitespace: [
|
|
303
|
-
[/[ \t\r\n]+/, "white"],
|
|
304
|
-
[/(\/\/).*/, "comment"]
|
|
305
|
-
]
|
|
306
|
-
}
|
|
307
|
-
};
|
|
308
|
-
|
|
309
|
-
export { conf, language };
|
package/r/r.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: "r",
|
|
12
|
-
extensions: [".r", ".rhistory", ".rmd", ".rprofile", ".rt"],
|
|
13
|
-
aliases: ["R", "r"],
|
|
14
|
-
loader: () => {
|
|
15
|
-
{
|
|
16
|
-
return import('./r.js');
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
});
|