@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
|
@@ -1,20 +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: "coffeescript",
|
|
12
|
-
extensions: [".coffee"],
|
|
13
|
-
aliases: ["CoffeeScript", "coffeescript", "coffee"],
|
|
14
|
-
mimetypes: ["text/x-coffeescript", "text/coffeescript"],
|
|
15
|
-
loader: () => {
|
|
16
|
-
{
|
|
17
|
-
return import('./coffee.js');
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
});
|
package/coffee/coffee.js
DELETED
|
@@ -1,240 +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/coffee/coffee.ts
|
|
10
|
-
var conf = {
|
|
11
|
-
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
|
12
|
-
comments: {
|
|
13
|
-
blockComment: ["###", "###"],
|
|
14
|
-
lineComment: "#"
|
|
15
|
-
},
|
|
16
|
-
brackets: [
|
|
17
|
-
["{", "}"],
|
|
18
|
-
["[", "]"],
|
|
19
|
-
["(", ")"]
|
|
20
|
-
],
|
|
21
|
-
autoClosingPairs: [
|
|
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
|
-
],
|
|
35
|
-
folding: {
|
|
36
|
-
markers: {
|
|
37
|
-
start: new RegExp("^\\s*#region\\b"),
|
|
38
|
-
end: new RegExp("^\\s*#endregion\\b")
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
var language = {
|
|
43
|
-
defaultToken: "",
|
|
44
|
-
ignoreCase: true,
|
|
45
|
-
tokenPostfix: ".coffee",
|
|
46
|
-
brackets: [
|
|
47
|
-
{ open: "{", close: "}", token: "delimiter.curly" },
|
|
48
|
-
{ open: "[", close: "]", token: "delimiter.square" },
|
|
49
|
-
{ open: "(", close: ")", token: "delimiter.parenthesis" }
|
|
50
|
-
],
|
|
51
|
-
regEx: /\/(?!\/\/)(?:[^\/\\]|\\.)*\/[igm]*/,
|
|
52
|
-
keywords: [
|
|
53
|
-
"and",
|
|
54
|
-
"or",
|
|
55
|
-
"is",
|
|
56
|
-
"isnt",
|
|
57
|
-
"not",
|
|
58
|
-
"on",
|
|
59
|
-
"yes",
|
|
60
|
-
"@",
|
|
61
|
-
"no",
|
|
62
|
-
"off",
|
|
63
|
-
"true",
|
|
64
|
-
"false",
|
|
65
|
-
"null",
|
|
66
|
-
"this",
|
|
67
|
-
"new",
|
|
68
|
-
"delete",
|
|
69
|
-
"typeof",
|
|
70
|
-
"in",
|
|
71
|
-
"instanceof",
|
|
72
|
-
"return",
|
|
73
|
-
"throw",
|
|
74
|
-
"break",
|
|
75
|
-
"continue",
|
|
76
|
-
"debugger",
|
|
77
|
-
"if",
|
|
78
|
-
"else",
|
|
79
|
-
"switch",
|
|
80
|
-
"for",
|
|
81
|
-
"while",
|
|
82
|
-
"do",
|
|
83
|
-
"try",
|
|
84
|
-
"catch",
|
|
85
|
-
"finally",
|
|
86
|
-
"class",
|
|
87
|
-
"extends",
|
|
88
|
-
"super",
|
|
89
|
-
"undefined",
|
|
90
|
-
"then",
|
|
91
|
-
"unless",
|
|
92
|
-
"until",
|
|
93
|
-
"loop",
|
|
94
|
-
"of",
|
|
95
|
-
"by",
|
|
96
|
-
"when"
|
|
97
|
-
],
|
|
98
|
-
// we include these common regular expressions
|
|
99
|
-
symbols: /[=><!~?&%|+\-*\/\^\.,\:]+/,
|
|
100
|
-
escapes: /\\(?:[abfnrtv\\"'$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
|
101
|
-
// The main tokenizer for our languages
|
|
102
|
-
tokenizer: {
|
|
103
|
-
root: [
|
|
104
|
-
// identifiers and keywords
|
|
105
|
-
[/\@[a-zA-Z_]\w*/, "variable.predefined"],
|
|
106
|
-
[
|
|
107
|
-
/[a-zA-Z_]\w*/,
|
|
108
|
-
{
|
|
109
|
-
cases: {
|
|
110
|
-
this: "variable.predefined",
|
|
111
|
-
"@keywords": { token: "keyword.$0" },
|
|
112
|
-
"@default": ""
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
],
|
|
116
|
-
// whitespace
|
|
117
|
-
[/[ \t\r\n]+/, ""],
|
|
118
|
-
// Comments
|
|
119
|
-
[/###/, "comment", "@comment"],
|
|
120
|
-
[/#.*$/, "comment"],
|
|
121
|
-
// regular expressions
|
|
122
|
-
["///", { token: "regexp", next: "@hereregexp" }],
|
|
123
|
-
[/^(\s*)(@regEx)/, ["", "regexp"]],
|
|
124
|
-
[/(\()(\s*)(@regEx)/, ["@brackets", "", "regexp"]],
|
|
125
|
-
[/(\,)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
|
|
126
|
-
[/(\=)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
|
|
127
|
-
[/(\:)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
|
|
128
|
-
[/(\[)(\s*)(@regEx)/, ["@brackets", "", "regexp"]],
|
|
129
|
-
[/(\!)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
|
|
130
|
-
[/(\&)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
|
|
131
|
-
[/(\|)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
|
|
132
|
-
[/(\?)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
|
|
133
|
-
[/(\{)(\s*)(@regEx)/, ["@brackets", "", "regexp"]],
|
|
134
|
-
[/(\;)(\s*)(@regEx)/, ["", "", "regexp"]],
|
|
135
|
-
// delimiters
|
|
136
|
-
[
|
|
137
|
-
/}/,
|
|
138
|
-
{
|
|
139
|
-
cases: {
|
|
140
|
-
"$S2==interpolatedstring": {
|
|
141
|
-
token: "string",
|
|
142
|
-
next: "@pop"
|
|
143
|
-
},
|
|
144
|
-
"@default": "@brackets"
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
],
|
|
148
|
-
[/[{}()\[\]]/, "@brackets"],
|
|
149
|
-
[/@symbols/, "delimiter"],
|
|
150
|
-
// numbers
|
|
151
|
-
[/\d+[eE]([\-+]?\d+)?/, "number.float"],
|
|
152
|
-
[/\d+\.\d+([eE][\-+]?\d+)?/, "number.float"],
|
|
153
|
-
[/0[xX][0-9a-fA-F]+/, "number.hex"],
|
|
154
|
-
[/0[0-7]+(?!\d)/, "number.octal"],
|
|
155
|
-
[/\d+/, "number"],
|
|
156
|
-
// delimiter: after number because of .\d floats
|
|
157
|
-
[/[,.]/, "delimiter"],
|
|
158
|
-
// strings:
|
|
159
|
-
[/"""/, "string", '@herestring."""'],
|
|
160
|
-
[/'''/, "string", "@herestring.'''"],
|
|
161
|
-
[
|
|
162
|
-
/"/,
|
|
163
|
-
{
|
|
164
|
-
cases: {
|
|
165
|
-
"@eos": "string",
|
|
166
|
-
"@default": { token: "string", next: '@string."' }
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
],
|
|
170
|
-
[
|
|
171
|
-
/'/,
|
|
172
|
-
{
|
|
173
|
-
cases: {
|
|
174
|
-
"@eos": "string",
|
|
175
|
-
"@default": { token: "string", next: "@string.'" }
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
]
|
|
179
|
-
],
|
|
180
|
-
string: [
|
|
181
|
-
[/[^"'\#\\]+/, "string"],
|
|
182
|
-
[/@escapes/, "string.escape"],
|
|
183
|
-
[/\./, "string.escape.invalid"],
|
|
184
|
-
[/\./, "string.escape.invalid"],
|
|
185
|
-
[
|
|
186
|
-
/#{/,
|
|
187
|
-
{
|
|
188
|
-
cases: {
|
|
189
|
-
'$S2=="': {
|
|
190
|
-
token: "string",
|
|
191
|
-
next: "root.interpolatedstring"
|
|
192
|
-
},
|
|
193
|
-
"@default": "string"
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
],
|
|
197
|
-
[
|
|
198
|
-
/["']/,
|
|
199
|
-
{
|
|
200
|
-
cases: {
|
|
201
|
-
"$#==$S2": { token: "string", next: "@pop" },
|
|
202
|
-
"@default": "string"
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
],
|
|
206
|
-
[/#/, "string"]
|
|
207
|
-
],
|
|
208
|
-
herestring: [
|
|
209
|
-
[
|
|
210
|
-
/("""|''')/,
|
|
211
|
-
{
|
|
212
|
-
cases: {
|
|
213
|
-
"$1==$S2": { token: "string", next: "@pop" },
|
|
214
|
-
"@default": "string"
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
],
|
|
218
|
-
[/[^#\\'"]+/, "string"],
|
|
219
|
-
[/['"]+/, "string"],
|
|
220
|
-
[/@escapes/, "string.escape"],
|
|
221
|
-
[/\./, "string.escape.invalid"],
|
|
222
|
-
[/#{/, { token: "string.quote", next: "root.interpolatedstring" }],
|
|
223
|
-
[/#/, "string"]
|
|
224
|
-
],
|
|
225
|
-
comment: [
|
|
226
|
-
[/[^#]+/, "comment"],
|
|
227
|
-
[/###/, "comment", "@pop"],
|
|
228
|
-
[/#/, "comment"]
|
|
229
|
-
],
|
|
230
|
-
hereregexp: [
|
|
231
|
-
[/[^\\\/#]+/, "regexp"],
|
|
232
|
-
[/\\./, "regexp"],
|
|
233
|
-
[/#.*$/, "comment"],
|
|
234
|
-
["///[igm]*", { token: "regexp", next: "@pop" }],
|
|
235
|
-
[/\//, "regexp"]
|
|
236
|
-
]
|
|
237
|
-
}
|
|
238
|
-
};
|
|
239
|
-
|
|
240
|
-
export { conf, language };
|
package/cpp/cpp.contribution.js
DELETED
|
@@ -1,29 +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: "c",
|
|
12
|
-
extensions: [".c", ".h"],
|
|
13
|
-
aliases: ["C", "c"],
|
|
14
|
-
loader: () => {
|
|
15
|
-
{
|
|
16
|
-
return import('./cpp.js');
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
registerLanguage({
|
|
21
|
-
id: "cpp",
|
|
22
|
-
extensions: [".cpp", ".cc", ".cxx", ".hpp", ".hh", ".hxx"],
|
|
23
|
-
aliases: ["C++", "Cpp", "cpp"],
|
|
24
|
-
loader: () => {
|
|
25
|
-
{
|
|
26
|
-
return import('./cpp.js');
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
});
|
package/cpp/cpp.js
DELETED
|
@@ -1,397 +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/cpp/cpp.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
|
-
],
|
|
27
|
-
surroundingPairs: [
|
|
28
|
-
{ open: "{", close: "}" },
|
|
29
|
-
{ open: "[", close: "]" },
|
|
30
|
-
{ open: "(", close: ")" },
|
|
31
|
-
{ open: '"', close: '"' },
|
|
32
|
-
{ open: "'", close: "'" }
|
|
33
|
-
],
|
|
34
|
-
folding: {
|
|
35
|
-
markers: {
|
|
36
|
-
start: new RegExp("^\\s*#pragma\\s+region\\b"),
|
|
37
|
-
end: new RegExp("^\\s*#pragma\\s+endregion\\b")
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
var language = {
|
|
42
|
-
defaultToken: "",
|
|
43
|
-
tokenPostfix: ".cpp",
|
|
44
|
-
brackets: [
|
|
45
|
-
{ token: "delimiter.curly", open: "{", close: "}" },
|
|
46
|
-
{ token: "delimiter.parenthesis", open: "(", close: ")" },
|
|
47
|
-
{ token: "delimiter.square", open: "[", close: "]" },
|
|
48
|
-
{ token: "delimiter.angle", open: "<", close: ">" }
|
|
49
|
-
],
|
|
50
|
-
keywords: [
|
|
51
|
-
"abstract",
|
|
52
|
-
"amp",
|
|
53
|
-
"array",
|
|
54
|
-
"auto",
|
|
55
|
-
"bool",
|
|
56
|
-
"break",
|
|
57
|
-
"case",
|
|
58
|
-
"catch",
|
|
59
|
-
"char",
|
|
60
|
-
"class",
|
|
61
|
-
"const",
|
|
62
|
-
"constexpr",
|
|
63
|
-
"const_cast",
|
|
64
|
-
"continue",
|
|
65
|
-
"cpu",
|
|
66
|
-
"decltype",
|
|
67
|
-
"default",
|
|
68
|
-
"delegate",
|
|
69
|
-
"delete",
|
|
70
|
-
"do",
|
|
71
|
-
"double",
|
|
72
|
-
"dynamic_cast",
|
|
73
|
-
"each",
|
|
74
|
-
"else",
|
|
75
|
-
"enum",
|
|
76
|
-
"event",
|
|
77
|
-
"explicit",
|
|
78
|
-
"export",
|
|
79
|
-
"extern",
|
|
80
|
-
"false",
|
|
81
|
-
"final",
|
|
82
|
-
"finally",
|
|
83
|
-
"float",
|
|
84
|
-
"for",
|
|
85
|
-
"friend",
|
|
86
|
-
"gcnew",
|
|
87
|
-
"generic",
|
|
88
|
-
"goto",
|
|
89
|
-
"if",
|
|
90
|
-
"in",
|
|
91
|
-
"initonly",
|
|
92
|
-
"inline",
|
|
93
|
-
"int",
|
|
94
|
-
"interface",
|
|
95
|
-
"interior_ptr",
|
|
96
|
-
"internal",
|
|
97
|
-
"literal",
|
|
98
|
-
"long",
|
|
99
|
-
"mutable",
|
|
100
|
-
"namespace",
|
|
101
|
-
"new",
|
|
102
|
-
"noexcept",
|
|
103
|
-
"nullptr",
|
|
104
|
-
"__nullptr",
|
|
105
|
-
"operator",
|
|
106
|
-
"override",
|
|
107
|
-
"partial",
|
|
108
|
-
"pascal",
|
|
109
|
-
"pin_ptr",
|
|
110
|
-
"private",
|
|
111
|
-
"property",
|
|
112
|
-
"protected",
|
|
113
|
-
"public",
|
|
114
|
-
"ref",
|
|
115
|
-
"register",
|
|
116
|
-
"reinterpret_cast",
|
|
117
|
-
"restrict",
|
|
118
|
-
"return",
|
|
119
|
-
"safe_cast",
|
|
120
|
-
"sealed",
|
|
121
|
-
"short",
|
|
122
|
-
"signed",
|
|
123
|
-
"sizeof",
|
|
124
|
-
"static",
|
|
125
|
-
"static_assert",
|
|
126
|
-
"static_cast",
|
|
127
|
-
"struct",
|
|
128
|
-
"switch",
|
|
129
|
-
"template",
|
|
130
|
-
"this",
|
|
131
|
-
"thread_local",
|
|
132
|
-
"throw",
|
|
133
|
-
"tile_static",
|
|
134
|
-
"true",
|
|
135
|
-
"try",
|
|
136
|
-
"typedef",
|
|
137
|
-
"typeid",
|
|
138
|
-
"typename",
|
|
139
|
-
"union",
|
|
140
|
-
"unsigned",
|
|
141
|
-
"using",
|
|
142
|
-
"virtual",
|
|
143
|
-
"void",
|
|
144
|
-
"volatile",
|
|
145
|
-
"wchar_t",
|
|
146
|
-
"where",
|
|
147
|
-
"while",
|
|
148
|
-
"_asm",
|
|
149
|
-
// reserved word with one underscores
|
|
150
|
-
"_based",
|
|
151
|
-
"_cdecl",
|
|
152
|
-
"_declspec",
|
|
153
|
-
"_fastcall",
|
|
154
|
-
"_if_exists",
|
|
155
|
-
"_if_not_exists",
|
|
156
|
-
"_inline",
|
|
157
|
-
"_multiple_inheritance",
|
|
158
|
-
"_pascal",
|
|
159
|
-
"_single_inheritance",
|
|
160
|
-
"_stdcall",
|
|
161
|
-
"_virtual_inheritance",
|
|
162
|
-
"_w64",
|
|
163
|
-
"__abstract",
|
|
164
|
-
// reserved word with two underscores
|
|
165
|
-
"__alignof",
|
|
166
|
-
"__asm",
|
|
167
|
-
"__assume",
|
|
168
|
-
"__based",
|
|
169
|
-
"__box",
|
|
170
|
-
"__builtin_alignof",
|
|
171
|
-
"__cdecl",
|
|
172
|
-
"__clrcall",
|
|
173
|
-
"__declspec",
|
|
174
|
-
"__delegate",
|
|
175
|
-
"__event",
|
|
176
|
-
"__except",
|
|
177
|
-
"__fastcall",
|
|
178
|
-
"__finally",
|
|
179
|
-
"__forceinline",
|
|
180
|
-
"__gc",
|
|
181
|
-
"__hook",
|
|
182
|
-
"__identifier",
|
|
183
|
-
"__if_exists",
|
|
184
|
-
"__if_not_exists",
|
|
185
|
-
"__inline",
|
|
186
|
-
"__int128",
|
|
187
|
-
"__int16",
|
|
188
|
-
"__int32",
|
|
189
|
-
"__int64",
|
|
190
|
-
"__int8",
|
|
191
|
-
"__interface",
|
|
192
|
-
"__leave",
|
|
193
|
-
"__m128",
|
|
194
|
-
"__m128d",
|
|
195
|
-
"__m128i",
|
|
196
|
-
"__m256",
|
|
197
|
-
"__m256d",
|
|
198
|
-
"__m256i",
|
|
199
|
-
"__m512",
|
|
200
|
-
"__m512d",
|
|
201
|
-
"__m512i",
|
|
202
|
-
"__m64",
|
|
203
|
-
"__multiple_inheritance",
|
|
204
|
-
"__newslot",
|
|
205
|
-
"__nogc",
|
|
206
|
-
"__noop",
|
|
207
|
-
"__nounwind",
|
|
208
|
-
"__novtordisp",
|
|
209
|
-
"__pascal",
|
|
210
|
-
"__pin",
|
|
211
|
-
"__pragma",
|
|
212
|
-
"__property",
|
|
213
|
-
"__ptr32",
|
|
214
|
-
"__ptr64",
|
|
215
|
-
"__raise",
|
|
216
|
-
"__restrict",
|
|
217
|
-
"__resume",
|
|
218
|
-
"__sealed",
|
|
219
|
-
"__single_inheritance",
|
|
220
|
-
"__stdcall",
|
|
221
|
-
"__super",
|
|
222
|
-
"__thiscall",
|
|
223
|
-
"__try",
|
|
224
|
-
"__try_cast",
|
|
225
|
-
"__typeof",
|
|
226
|
-
"__unaligned",
|
|
227
|
-
"__unhook",
|
|
228
|
-
"__uuidof",
|
|
229
|
-
"__value",
|
|
230
|
-
"__virtual_inheritance",
|
|
231
|
-
"__w64",
|
|
232
|
-
"__wchar_t"
|
|
233
|
-
],
|
|
234
|
-
operators: [
|
|
235
|
-
"=",
|
|
236
|
-
">",
|
|
237
|
-
"<",
|
|
238
|
-
"!",
|
|
239
|
-
"~",
|
|
240
|
-
"?",
|
|
241
|
-
":",
|
|
242
|
-
"==",
|
|
243
|
-
"<=",
|
|
244
|
-
">=",
|
|
245
|
-
"!=",
|
|
246
|
-
"&&",
|
|
247
|
-
"||",
|
|
248
|
-
"++",
|
|
249
|
-
"--",
|
|
250
|
-
"+",
|
|
251
|
-
"-",
|
|
252
|
-
"*",
|
|
253
|
-
"/",
|
|
254
|
-
"&",
|
|
255
|
-
"|",
|
|
256
|
-
"^",
|
|
257
|
-
"%",
|
|
258
|
-
"<<",
|
|
259
|
-
">>",
|
|
260
|
-
"+=",
|
|
261
|
-
"-=",
|
|
262
|
-
"*=",
|
|
263
|
-
"/=",
|
|
264
|
-
"&=",
|
|
265
|
-
"|=",
|
|
266
|
-
"^=",
|
|
267
|
-
"%=",
|
|
268
|
-
"<<=",
|
|
269
|
-
">>="
|
|
270
|
-
],
|
|
271
|
-
// we include these common regular expressions
|
|
272
|
-
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
|
273
|
-
escapes: /\\(?:[0abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
|
274
|
-
integersuffix: /([uU](ll|LL|l|L)|(ll|LL|l|L)?[uU]?)/,
|
|
275
|
-
floatsuffix: /[fFlL]?/,
|
|
276
|
-
encoding: /u|u8|U|L/,
|
|
277
|
-
// The main tokenizer for our languages
|
|
278
|
-
tokenizer: {
|
|
279
|
-
root: [
|
|
280
|
-
// C++ 11 Raw String
|
|
281
|
-
[/@encoding?R\"(?:([^ ()\\\t]*))\(/, { token: "string.raw.begin", next: "@raw.$1" }],
|
|
282
|
-
// identifiers and keywords
|
|
283
|
-
[
|
|
284
|
-
/[a-zA-Z_]\w*/,
|
|
285
|
-
{
|
|
286
|
-
cases: {
|
|
287
|
-
"@keywords": { token: "keyword.$0" },
|
|
288
|
-
"@default": "identifier"
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
],
|
|
292
|
-
// The preprocessor checks must be before whitespace as they check /^\s*#/ which
|
|
293
|
-
// otherwise fails to match later after other whitespace has been removed.
|
|
294
|
-
// Inclusion
|
|
295
|
-
[/^\s*#\s*include/, { token: "keyword.directive.include", next: "@include" }],
|
|
296
|
-
// Preprocessor directive
|
|
297
|
-
[/^\s*#\s*\w+/, "keyword.directive"],
|
|
298
|
-
// whitespace
|
|
299
|
-
{ include: "@whitespace" },
|
|
300
|
-
// [[ attributes ]].
|
|
301
|
-
[/\[\s*\[/, { token: "annotation", next: "@annotation" }],
|
|
302
|
-
// delimiters and operators
|
|
303
|
-
[/[{}()<>\[\]]/, "@brackets"],
|
|
304
|
-
[
|
|
305
|
-
/@symbols/,
|
|
306
|
-
{
|
|
307
|
-
cases: {
|
|
308
|
-
"@operators": "delimiter",
|
|
309
|
-
"@default": ""
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
],
|
|
313
|
-
// numbers
|
|
314
|
-
[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/, "number.float"],
|
|
315
|
-
[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/, "number.float"],
|
|
316
|
-
[/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/, "number.hex"],
|
|
317
|
-
[/0[0-7']*[0-7](@integersuffix)/, "number.octal"],
|
|
318
|
-
[/0[bB][0-1']*[0-1](@integersuffix)/, "number.binary"],
|
|
319
|
-
[/\d[\d']*\d(@integersuffix)/, "number"],
|
|
320
|
-
[/\d(@integersuffix)/, "number"],
|
|
321
|
-
// delimiter: after number because of .\d floats
|
|
322
|
-
[/[;,.]/, "delimiter"],
|
|
323
|
-
// strings
|
|
324
|
-
[/"([^"\\]|\\.)*$/, "string.invalid"],
|
|
325
|
-
// non-teminated string
|
|
326
|
-
[/"/, "string", "@string"],
|
|
327
|
-
// characters
|
|
328
|
-
[/'[^\\']'/, "string"],
|
|
329
|
-
[/(')(@escapes)(')/, ["string", "string.escape", "string"]],
|
|
330
|
-
[/'/, "string.invalid"]
|
|
331
|
-
],
|
|
332
|
-
whitespace: [
|
|
333
|
-
[/[ \t\r\n]+/, ""],
|
|
334
|
-
[/\/\*\*(?!\/)/, "comment.doc", "@doccomment"],
|
|
335
|
-
[/\/\*/, "comment", "@comment"],
|
|
336
|
-
[/\/\/.*\\$/, "comment", "@linecomment"],
|
|
337
|
-
[/\/\/.*$/, "comment"]
|
|
338
|
-
],
|
|
339
|
-
comment: [
|
|
340
|
-
[/[^\/*]+/, "comment"],
|
|
341
|
-
[/\*\//, "comment", "@pop"],
|
|
342
|
-
[/[\/*]/, "comment"]
|
|
343
|
-
],
|
|
344
|
-
//For use with continuous line comments
|
|
345
|
-
linecomment: [
|
|
346
|
-
[/.*[^\\]$/, "comment", "@pop"],
|
|
347
|
-
[/[^]+/, "comment"]
|
|
348
|
-
],
|
|
349
|
-
//Identical copy of comment above, except for the addition of .doc
|
|
350
|
-
doccomment: [
|
|
351
|
-
[/[^\/*]+/, "comment.doc"],
|
|
352
|
-
[/\*\//, "comment.doc", "@pop"],
|
|
353
|
-
[/[\/*]/, "comment.doc"]
|
|
354
|
-
],
|
|
355
|
-
string: [
|
|
356
|
-
[/[^\\"]+/, "string"],
|
|
357
|
-
[/@escapes/, "string.escape"],
|
|
358
|
-
[/\\./, "string.escape.invalid"],
|
|
359
|
-
[/"/, "string", "@pop"]
|
|
360
|
-
],
|
|
361
|
-
raw: [
|
|
362
|
-
[/[^)]+/, "string.raw"],
|
|
363
|
-
[/\)$S2\"/, { token: "string.raw.end", next: "@pop" }],
|
|
364
|
-
[/\)/, "string.raw"]
|
|
365
|
-
],
|
|
366
|
-
annotation: [
|
|
367
|
-
{ include: "@whitespace" },
|
|
368
|
-
[/using|alignas/, "keyword"],
|
|
369
|
-
[/[a-zA-Z0-9_]+/, "annotation"],
|
|
370
|
-
[/[,:]/, "delimiter"],
|
|
371
|
-
[/[()]/, "@brackets"],
|
|
372
|
-
[/\]\s*\]/, { token: "annotation", next: "@pop" }]
|
|
373
|
-
],
|
|
374
|
-
include: [
|
|
375
|
-
[
|
|
376
|
-
/(\s*)(<)([^<>]*)(>)/,
|
|
377
|
-
[
|
|
378
|
-
"",
|
|
379
|
-
"keyword.directive.include.begin",
|
|
380
|
-
"string.include.identifier",
|
|
381
|
-
{ token: "keyword.directive.include.end", next: "@pop" }
|
|
382
|
-
]
|
|
383
|
-
],
|
|
384
|
-
[
|
|
385
|
-
/(\s*)(")([^"]*)(")/,
|
|
386
|
-
[
|
|
387
|
-
"",
|
|
388
|
-
"keyword.directive.include.begin",
|
|
389
|
-
"string.include.identifier",
|
|
390
|
-
{ token: "keyword.directive.include.end", next: "@pop" }
|
|
391
|
-
]
|
|
392
|
-
]
|
|
393
|
-
]
|
|
394
|
-
}
|
|
395
|
-
};
|
|
396
|
-
|
|
397
|
-
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: "csharp",
|
|
12
|
-
extensions: [".cs", ".csx", ".cake"],
|
|
13
|
-
aliases: ["C#", "csharp"],
|
|
14
|
-
loader: () => {
|
|
15
|
-
{
|
|
16
|
-
return import('./csharp.js');
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
});
|