@codingame/monaco-vscode-standalone-languages 23.1.0 → 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,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: "fsharp",
|
|
12
|
-
extensions: [".fs", ".fsi", ".ml", ".mli", ".fsx", ".fsscript"],
|
|
13
|
-
aliases: ["F#", "FSharp", "fsharp"],
|
|
14
|
-
loader: () => {
|
|
15
|
-
{
|
|
16
|
-
return import('./fsharp.js');
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
});
|
package/fsharp/fsharp.js
DELETED
|
@@ -1,225 +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/fsharp/fsharp.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
|
-
],
|
|
26
|
-
surroundingPairs: [
|
|
27
|
-
{ open: "{", close: "}" },
|
|
28
|
-
{ open: "[", close: "]" },
|
|
29
|
-
{ open: "(", close: ")" },
|
|
30
|
-
{ open: '"', close: '"' },
|
|
31
|
-
{ open: "'", close: "'" }
|
|
32
|
-
],
|
|
33
|
-
folding: {
|
|
34
|
-
markers: {
|
|
35
|
-
start: new RegExp("^\\s*//\\s*#region\\b|^\\s*\\(\\*\\s*#region(.*)\\*\\)"),
|
|
36
|
-
end: new RegExp("^\\s*//\\s*#endregion\\b|^\\s*\\(\\*\\s*#endregion\\s*\\*\\)")
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
var language = {
|
|
41
|
-
defaultToken: "",
|
|
42
|
-
tokenPostfix: ".fs",
|
|
43
|
-
keywords: [
|
|
44
|
-
"abstract",
|
|
45
|
-
"and",
|
|
46
|
-
"atomic",
|
|
47
|
-
"as",
|
|
48
|
-
"assert",
|
|
49
|
-
"asr",
|
|
50
|
-
"base",
|
|
51
|
-
"begin",
|
|
52
|
-
"break",
|
|
53
|
-
"checked",
|
|
54
|
-
"component",
|
|
55
|
-
"const",
|
|
56
|
-
"constraint",
|
|
57
|
-
"constructor",
|
|
58
|
-
"continue",
|
|
59
|
-
"class",
|
|
60
|
-
"default",
|
|
61
|
-
"delegate",
|
|
62
|
-
"do",
|
|
63
|
-
"done",
|
|
64
|
-
"downcast",
|
|
65
|
-
"downto",
|
|
66
|
-
"elif",
|
|
67
|
-
"else",
|
|
68
|
-
"end",
|
|
69
|
-
"exception",
|
|
70
|
-
"eager",
|
|
71
|
-
"event",
|
|
72
|
-
"external",
|
|
73
|
-
"extern",
|
|
74
|
-
"false",
|
|
75
|
-
"finally",
|
|
76
|
-
"for",
|
|
77
|
-
"fun",
|
|
78
|
-
"function",
|
|
79
|
-
"fixed",
|
|
80
|
-
"functor",
|
|
81
|
-
"global",
|
|
82
|
-
"if",
|
|
83
|
-
"in",
|
|
84
|
-
"include",
|
|
85
|
-
"inherit",
|
|
86
|
-
"inline",
|
|
87
|
-
"interface",
|
|
88
|
-
"internal",
|
|
89
|
-
"land",
|
|
90
|
-
"lor",
|
|
91
|
-
"lsl",
|
|
92
|
-
"lsr",
|
|
93
|
-
"lxor",
|
|
94
|
-
"lazy",
|
|
95
|
-
"let",
|
|
96
|
-
"match",
|
|
97
|
-
"member",
|
|
98
|
-
"mod",
|
|
99
|
-
"module",
|
|
100
|
-
"mutable",
|
|
101
|
-
"namespace",
|
|
102
|
-
"method",
|
|
103
|
-
"mixin",
|
|
104
|
-
"new",
|
|
105
|
-
"not",
|
|
106
|
-
"null",
|
|
107
|
-
"of",
|
|
108
|
-
"open",
|
|
109
|
-
"or",
|
|
110
|
-
"object",
|
|
111
|
-
"override",
|
|
112
|
-
"private",
|
|
113
|
-
"parallel",
|
|
114
|
-
"process",
|
|
115
|
-
"protected",
|
|
116
|
-
"pure",
|
|
117
|
-
"public",
|
|
118
|
-
"rec",
|
|
119
|
-
"return",
|
|
120
|
-
"static",
|
|
121
|
-
"sealed",
|
|
122
|
-
"struct",
|
|
123
|
-
"sig",
|
|
124
|
-
"then",
|
|
125
|
-
"to",
|
|
126
|
-
"true",
|
|
127
|
-
"tailcall",
|
|
128
|
-
"trait",
|
|
129
|
-
"try",
|
|
130
|
-
"type",
|
|
131
|
-
"upcast",
|
|
132
|
-
"use",
|
|
133
|
-
"val",
|
|
134
|
-
"void",
|
|
135
|
-
"virtual",
|
|
136
|
-
"volatile",
|
|
137
|
-
"when",
|
|
138
|
-
"while",
|
|
139
|
-
"with",
|
|
140
|
-
"yield"
|
|
141
|
-
],
|
|
142
|
-
// we include these common regular expressions
|
|
143
|
-
symbols: /[=><!~?:&|+\-*\^%;\.,\/]+/,
|
|
144
|
-
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
|
145
|
-
integersuffix: /[uU]?[yslnLI]?/,
|
|
146
|
-
floatsuffix: /[fFmM]?/,
|
|
147
|
-
// The main tokenizer for our languages
|
|
148
|
-
tokenizer: {
|
|
149
|
-
root: [
|
|
150
|
-
// identifiers and keywords
|
|
151
|
-
[
|
|
152
|
-
/[a-zA-Z_]\w*/,
|
|
153
|
-
{
|
|
154
|
-
cases: {
|
|
155
|
-
"@keywords": { token: "keyword.$0" },
|
|
156
|
-
"@default": "identifier"
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
],
|
|
160
|
-
// whitespace
|
|
161
|
-
{ include: "@whitespace" },
|
|
162
|
-
// [< attributes >].
|
|
163
|
-
[/\[<.*>\]/, "annotation"],
|
|
164
|
-
// Preprocessor directive
|
|
165
|
-
[/^#(if|else|endif)/, "keyword"],
|
|
166
|
-
// delimiters and operators
|
|
167
|
-
[/[{}()\[\]]/, "@brackets"],
|
|
168
|
-
[/[<>](?!@symbols)/, "@brackets"],
|
|
169
|
-
[/@symbols/, "delimiter"],
|
|
170
|
-
// numbers
|
|
171
|
-
[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/, "number.float"],
|
|
172
|
-
[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/, "number.float"],
|
|
173
|
-
[/0x[0-9a-fA-F]+LF/, "number.float"],
|
|
174
|
-
[/0x[0-9a-fA-F]+(@integersuffix)/, "number.hex"],
|
|
175
|
-
[/0b[0-1]+(@integersuffix)/, "number.bin"],
|
|
176
|
-
[/\d+(@integersuffix)/, "number"],
|
|
177
|
-
// delimiter: after number because of .\d floats
|
|
178
|
-
[/[;,.]/, "delimiter"],
|
|
179
|
-
// strings
|
|
180
|
-
[/"([^"\\]|\\.)*$/, "string.invalid"],
|
|
181
|
-
// non-teminated string
|
|
182
|
-
[/"""/, "string", '@string."""'],
|
|
183
|
-
[/"/, "string", '@string."'],
|
|
184
|
-
// literal string
|
|
185
|
-
[/\@"/, { token: "string.quote", next: "@litstring" }],
|
|
186
|
-
// characters
|
|
187
|
-
[/'[^\\']'B?/, "string"],
|
|
188
|
-
[/(')(@escapes)(')/, ["string", "string.escape", "string"]],
|
|
189
|
-
[/'/, "string.invalid"]
|
|
190
|
-
],
|
|
191
|
-
whitespace: [
|
|
192
|
-
[/[ \t\r\n]+/, ""],
|
|
193
|
-
[/\(\*(?!\))/, "comment", "@comment"],
|
|
194
|
-
[/\/\/.*$/, "comment"]
|
|
195
|
-
],
|
|
196
|
-
comment: [
|
|
197
|
-
[/[^*(]+/, "comment"],
|
|
198
|
-
[/\*\)/, "comment", "@pop"],
|
|
199
|
-
[/\*/, "comment"],
|
|
200
|
-
[/\(\*\)/, "comment"],
|
|
201
|
-
[/\(/, "comment"]
|
|
202
|
-
],
|
|
203
|
-
string: [
|
|
204
|
-
[/[^\\"]+/, "string"],
|
|
205
|
-
[/@escapes/, "string.escape"],
|
|
206
|
-
[/\\./, "string.escape.invalid"],
|
|
207
|
-
[
|
|
208
|
-
/("""|"B?)/,
|
|
209
|
-
{
|
|
210
|
-
cases: {
|
|
211
|
-
"$#==$S2": { token: "string", next: "@pop" },
|
|
212
|
-
"@default": "string"
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
]
|
|
216
|
-
],
|
|
217
|
-
litstring: [
|
|
218
|
-
[/[^"]+/, "string"],
|
|
219
|
-
[/""/, "string.escape"],
|
|
220
|
-
[/"/, { token: "string.quote", next: "@pop" }]
|
|
221
|
-
]
|
|
222
|
-
}
|
|
223
|
-
};
|
|
224
|
-
|
|
225
|
-
export { conf, language };
|
package/go/go.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: "go",
|
|
12
|
-
extensions: [".go"],
|
|
13
|
-
aliases: ["Go"],
|
|
14
|
-
loader: () => {
|
|
15
|
-
{
|
|
16
|
-
return import('./go.js');
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
});
|
package/go/go.js
DELETED
|
@@ -1,226 +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/go/go.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"] },
|
|
25
|
-
{ open: '"', close: '"', notIn: ["string"] },
|
|
26
|
-
{ open: "'", close: "'", notIn: ["string", "comment"] }
|
|
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: ".go",
|
|
40
|
-
keywords: [
|
|
41
|
-
"break",
|
|
42
|
-
"case",
|
|
43
|
-
"chan",
|
|
44
|
-
"const",
|
|
45
|
-
"continue",
|
|
46
|
-
"default",
|
|
47
|
-
"defer",
|
|
48
|
-
"else",
|
|
49
|
-
"fallthrough",
|
|
50
|
-
"for",
|
|
51
|
-
"func",
|
|
52
|
-
"go",
|
|
53
|
-
"goto",
|
|
54
|
-
"if",
|
|
55
|
-
"import",
|
|
56
|
-
"interface",
|
|
57
|
-
"map",
|
|
58
|
-
"package",
|
|
59
|
-
"range",
|
|
60
|
-
"return",
|
|
61
|
-
"select",
|
|
62
|
-
"struct",
|
|
63
|
-
"switch",
|
|
64
|
-
"type",
|
|
65
|
-
"var",
|
|
66
|
-
"bool",
|
|
67
|
-
"true",
|
|
68
|
-
"false",
|
|
69
|
-
"uint8",
|
|
70
|
-
"uint16",
|
|
71
|
-
"uint32",
|
|
72
|
-
"uint64",
|
|
73
|
-
"int8",
|
|
74
|
-
"int16",
|
|
75
|
-
"int32",
|
|
76
|
-
"int64",
|
|
77
|
-
"float32",
|
|
78
|
-
"float64",
|
|
79
|
-
"complex64",
|
|
80
|
-
"complex128",
|
|
81
|
-
"byte",
|
|
82
|
-
"rune",
|
|
83
|
-
"uint",
|
|
84
|
-
"int",
|
|
85
|
-
"uintptr",
|
|
86
|
-
"string",
|
|
87
|
-
"nil"
|
|
88
|
-
],
|
|
89
|
-
operators: [
|
|
90
|
-
"+",
|
|
91
|
-
"-",
|
|
92
|
-
"*",
|
|
93
|
-
"/",
|
|
94
|
-
"%",
|
|
95
|
-
"&",
|
|
96
|
-
"|",
|
|
97
|
-
"^",
|
|
98
|
-
"<<",
|
|
99
|
-
">>",
|
|
100
|
-
"&^",
|
|
101
|
-
"+=",
|
|
102
|
-
"-=",
|
|
103
|
-
"*=",
|
|
104
|
-
"/=",
|
|
105
|
-
"%=",
|
|
106
|
-
"&=",
|
|
107
|
-
"|=",
|
|
108
|
-
"^=",
|
|
109
|
-
"<<=",
|
|
110
|
-
">>=",
|
|
111
|
-
"&^=",
|
|
112
|
-
"&&",
|
|
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
|
-
// we include these common regular expressions
|
|
139
|
-
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
|
140
|
-
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
|
141
|
-
// The main tokenizer for our languages
|
|
142
|
-
tokenizer: {
|
|
143
|
-
root: [
|
|
144
|
-
// identifiers and keywords
|
|
145
|
-
[
|
|
146
|
-
/[a-zA-Z_]\w*/,
|
|
147
|
-
{
|
|
148
|
-
cases: {
|
|
149
|
-
"@keywords": { token: "keyword.$0" },
|
|
150
|
-
"@default": "identifier"
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
],
|
|
154
|
-
// whitespace
|
|
155
|
-
{ include: "@whitespace" },
|
|
156
|
-
// [[ attributes ]].
|
|
157
|
-
[/\[\[.*\]\]/, "annotation"],
|
|
158
|
-
// Preprocessor directive
|
|
159
|
-
[/^\s*#\w+/, "keyword"],
|
|
160
|
-
// delimiters and operators
|
|
161
|
-
[/[{}()\[\]]/, "@brackets"],
|
|
162
|
-
[/[<>](?!@symbols)/, "@brackets"],
|
|
163
|
-
[
|
|
164
|
-
/@symbols/,
|
|
165
|
-
{
|
|
166
|
-
cases: {
|
|
167
|
-
"@operators": "delimiter",
|
|
168
|
-
"@default": ""
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
],
|
|
172
|
-
// numbers
|
|
173
|
-
[/\d*\d+[eE]([\-+]?\d+)?/, "number.float"],
|
|
174
|
-
[/\d*\.\d+([eE][\-+]?\d+)?/, "number.float"],
|
|
175
|
-
[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/, "number.hex"],
|
|
176
|
-
[/0[0-7']*[0-7]/, "number.octal"],
|
|
177
|
-
[/0[bB][0-1']*[0-1]/, "number.binary"],
|
|
178
|
-
[/\d[\d']*/, "number"],
|
|
179
|
-
[/\d/, "number"],
|
|
180
|
-
// delimiter: after number because of .\d floats
|
|
181
|
-
[/[;,.]/, "delimiter"],
|
|
182
|
-
// strings
|
|
183
|
-
[/"([^"\\]|\\.)*$/, "string.invalid"],
|
|
184
|
-
// non-teminated string
|
|
185
|
-
[/"/, "string", "@string"],
|
|
186
|
-
[/`/, "string", "@rawstring"],
|
|
187
|
-
// characters
|
|
188
|
-
[/'[^\\']'/, "string"],
|
|
189
|
-
[/(')(@escapes)(')/, ["string", "string.escape", "string"]],
|
|
190
|
-
[/'/, "string.invalid"]
|
|
191
|
-
],
|
|
192
|
-
whitespace: [
|
|
193
|
-
[/[ \t\r\n]+/, ""],
|
|
194
|
-
[/\/\*\*(?!\/)/, "comment.doc", "@doccomment"],
|
|
195
|
-
[/\/\*/, "comment", "@comment"],
|
|
196
|
-
[/\/\/.*$/, "comment"]
|
|
197
|
-
],
|
|
198
|
-
comment: [
|
|
199
|
-
[/[^\/*]+/, "comment"],
|
|
200
|
-
// [/\/\*/, 'comment', '@push' ], // nested comment not allowed :-(
|
|
201
|
-
// [/\/\*/, 'comment.invalid' ], // this breaks block comments in the shape of /* //*/
|
|
202
|
-
[/\*\//, "comment", "@pop"],
|
|
203
|
-
[/[\/*]/, "comment"]
|
|
204
|
-
],
|
|
205
|
-
//Identical copy of comment above, except for the addition of .doc
|
|
206
|
-
doccomment: [
|
|
207
|
-
[/[^\/*]+/, "comment.doc"],
|
|
208
|
-
// [/\/\*/, 'comment.doc', '@push' ], // nested comment not allowed :-(
|
|
209
|
-
[/\/\*/, "comment.doc.invalid"],
|
|
210
|
-
[/\*\//, "comment.doc", "@pop"],
|
|
211
|
-
[/[\/*]/, "comment.doc"]
|
|
212
|
-
],
|
|
213
|
-
string: [
|
|
214
|
-
[/[^\\"]+/, "string"],
|
|
215
|
-
[/@escapes/, "string.escape"],
|
|
216
|
-
[/\\./, "string.escape.invalid"],
|
|
217
|
-
[/"/, "string", "@pop"]
|
|
218
|
-
],
|
|
219
|
-
rawstring: [
|
|
220
|
-
[/[^\`]/, "string"],
|
|
221
|
-
[/`/, "string", "@pop"]
|
|
222
|
-
]
|
|
223
|
-
}
|
|
224
|
-
};
|
|
225
|
-
|
|
226
|
-
export { conf, language };
|
|
@@ -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: "graphql",
|
|
12
|
-
extensions: [".graphql", ".gql"],
|
|
13
|
-
aliases: ["GraphQL", "graphql", "gql"],
|
|
14
|
-
mimetypes: ["application/graphql"],
|
|
15
|
-
loader: () => {
|
|
16
|
-
{
|
|
17
|
-
return import('./graphql.js');
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
});
|
package/graphql/graphql.js
DELETED
|
@@ -1,159 +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/graphql/graphql.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
|
-
{ open: '"', close: '"', notIn: ["string", "comment"] }
|
|
25
|
-
],
|
|
26
|
-
surroundingPairs: [
|
|
27
|
-
{ open: "{", close: "}" },
|
|
28
|
-
{ open: "[", close: "]" },
|
|
29
|
-
{ open: "(", close: ")" },
|
|
30
|
-
{ open: '"""', close: '"""' },
|
|
31
|
-
{ open: '"', close: '"' }
|
|
32
|
-
],
|
|
33
|
-
folding: {
|
|
34
|
-
offSide: true
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
var language = {
|
|
38
|
-
// Set defaultToken to invalid to see what you do not tokenize yet
|
|
39
|
-
defaultToken: "invalid",
|
|
40
|
-
tokenPostfix: ".gql",
|
|
41
|
-
keywords: [
|
|
42
|
-
"null",
|
|
43
|
-
"true",
|
|
44
|
-
"false",
|
|
45
|
-
"query",
|
|
46
|
-
"mutation",
|
|
47
|
-
"subscription",
|
|
48
|
-
"extend",
|
|
49
|
-
"schema",
|
|
50
|
-
"directive",
|
|
51
|
-
"scalar",
|
|
52
|
-
"type",
|
|
53
|
-
"interface",
|
|
54
|
-
"union",
|
|
55
|
-
"enum",
|
|
56
|
-
"input",
|
|
57
|
-
"implements",
|
|
58
|
-
"fragment",
|
|
59
|
-
"on"
|
|
60
|
-
],
|
|
61
|
-
typeKeywords: ["Int", "Float", "String", "Boolean", "ID"],
|
|
62
|
-
directiveLocations: [
|
|
63
|
-
"SCHEMA",
|
|
64
|
-
"SCALAR",
|
|
65
|
-
"OBJECT",
|
|
66
|
-
"FIELD_DEFINITION",
|
|
67
|
-
"ARGUMENT_DEFINITION",
|
|
68
|
-
"INTERFACE",
|
|
69
|
-
"UNION",
|
|
70
|
-
"ENUM",
|
|
71
|
-
"ENUM_VALUE",
|
|
72
|
-
"INPUT_OBJECT",
|
|
73
|
-
"INPUT_FIELD_DEFINITION",
|
|
74
|
-
"QUERY",
|
|
75
|
-
"MUTATION",
|
|
76
|
-
"SUBSCRIPTION",
|
|
77
|
-
"FIELD",
|
|
78
|
-
"FRAGMENT_DEFINITION",
|
|
79
|
-
"FRAGMENT_SPREAD",
|
|
80
|
-
"INLINE_FRAGMENT",
|
|
81
|
-
"VARIABLE_DEFINITION"
|
|
82
|
-
],
|
|
83
|
-
operators: ["=", "!", "?", ":", "&", "|"],
|
|
84
|
-
// we include these common regular expressions
|
|
85
|
-
symbols: /[=!?:&|]+/,
|
|
86
|
-
// https://facebook.github.io/graphql/draft/#sec-String-Value
|
|
87
|
-
escapes: /\\(?:["\\\/bfnrt]|u[0-9A-Fa-f]{4})/,
|
|
88
|
-
// The main tokenizer for our languages
|
|
89
|
-
tokenizer: {
|
|
90
|
-
root: [
|
|
91
|
-
// fields and argument names
|
|
92
|
-
[
|
|
93
|
-
/[a-z_][\w$]*/,
|
|
94
|
-
{
|
|
95
|
-
cases: {
|
|
96
|
-
"@keywords": "keyword",
|
|
97
|
-
"@default": "key.identifier"
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
],
|
|
101
|
-
// identify typed input variables
|
|
102
|
-
[
|
|
103
|
-
/[$][\w$]*/,
|
|
104
|
-
{
|
|
105
|
-
cases: {
|
|
106
|
-
"@keywords": "keyword",
|
|
107
|
-
"@default": "argument.identifier"
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
],
|
|
111
|
-
// to show class names nicely
|
|
112
|
-
[
|
|
113
|
-
/[A-Z][\w\$]*/,
|
|
114
|
-
{
|
|
115
|
-
cases: {
|
|
116
|
-
"@typeKeywords": "keyword",
|
|
117
|
-
"@default": "type.identifier"
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
],
|
|
121
|
-
// whitespace
|
|
122
|
-
{ include: "@whitespace" },
|
|
123
|
-
// delimiters and operators
|
|
124
|
-
[/[{}()\[\]]/, "@brackets"],
|
|
125
|
-
[/@symbols/, { cases: { "@operators": "operator", "@default": "" } }],
|
|
126
|
-
// @ annotations.
|
|
127
|
-
// As an example, we emit a debugging log message on these tokens.
|
|
128
|
-
// Note: message are supressed during the first load -- change some lines to see them.
|
|
129
|
-
[/@\s*[a-zA-Z_\$][\w\$]*/, { token: "annotation", log: "annotation token: $0" }],
|
|
130
|
-
// numbers
|
|
131
|
-
[/\d*\.\d+([eE][\-+]?\d+)?/, "number.float"],
|
|
132
|
-
[/0[xX][0-9a-fA-F]+/, "number.hex"],
|
|
133
|
-
[/\d+/, "number"],
|
|
134
|
-
// delimiter: after number because of .\d floats
|
|
135
|
-
[/[;,.]/, "delimiter"],
|
|
136
|
-
[/"""/, { token: "string", next: "@mlstring", nextEmbedded: "markdown" }],
|
|
137
|
-
// strings
|
|
138
|
-
[/"([^"\\]|\\.)*$/, "string.invalid"],
|
|
139
|
-
// non-teminated string
|
|
140
|
-
[/"/, { token: "string.quote", bracket: "@open", next: "@string" }]
|
|
141
|
-
],
|
|
142
|
-
mlstring: [
|
|
143
|
-
[/[^"]+/, "string"],
|
|
144
|
-
['"""', { token: "string", next: "@pop", nextEmbedded: "@pop" }]
|
|
145
|
-
],
|
|
146
|
-
string: [
|
|
147
|
-
[/[^\\"]+/, "string"],
|
|
148
|
-
[/@escapes/, "string.escape"],
|
|
149
|
-
[/\\./, "string.escape.invalid"],
|
|
150
|
-
[/"/, { token: "string.quote", bracket: "@close", next: "@pop" }]
|
|
151
|
-
],
|
|
152
|
-
whitespace: [
|
|
153
|
-
[/[ \t\r\n]+/, ""],
|
|
154
|
-
[/#.*$/, "comment"]
|
|
155
|
-
]
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
export { conf, language };
|
|
@@ -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: "handlebars",
|
|
12
|
-
extensions: [".handlebars", ".hbs"],
|
|
13
|
-
aliases: ["Handlebars", "handlebars", "hbs"],
|
|
14
|
-
mimetypes: ["text/x-handlebars-template"],
|
|
15
|
-
loader: () => {
|
|
16
|
-
{
|
|
17
|
-
return import('./handlebars.js');
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
});
|