@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
package/handlebars/handlebars.js
DELETED
|
@@ -1,439 +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/handlebars/handlebars.ts
|
|
29
|
-
var EMPTY_ELEMENTS = [
|
|
30
|
-
"area",
|
|
31
|
-
"base",
|
|
32
|
-
"br",
|
|
33
|
-
"col",
|
|
34
|
-
"embed",
|
|
35
|
-
"hr",
|
|
36
|
-
"img",
|
|
37
|
-
"input",
|
|
38
|
-
"keygen",
|
|
39
|
-
"link",
|
|
40
|
-
"menuitem",
|
|
41
|
-
"meta",
|
|
42
|
-
"param",
|
|
43
|
-
"source",
|
|
44
|
-
"track",
|
|
45
|
-
"wbr"
|
|
46
|
-
];
|
|
47
|
-
var conf = {
|
|
48
|
-
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,
|
|
49
|
-
comments: {
|
|
50
|
-
blockComment: ["{{!--", "--}}"]
|
|
51
|
-
},
|
|
52
|
-
brackets: [
|
|
53
|
-
["<!--", "-->"],
|
|
54
|
-
["<", ">"],
|
|
55
|
-
["{{", "}}"],
|
|
56
|
-
["{", "}"],
|
|
57
|
-
["(", ")"]
|
|
58
|
-
],
|
|
59
|
-
autoClosingPairs: [
|
|
60
|
-
{ open: "{", close: "}" },
|
|
61
|
-
{ open: "[", close: "]" },
|
|
62
|
-
{ open: "(", close: ")" },
|
|
63
|
-
{ open: '"', close: '"' },
|
|
64
|
-
{ open: "'", close: "'" }
|
|
65
|
-
],
|
|
66
|
-
surroundingPairs: [
|
|
67
|
-
{ open: "<", close: ">" },
|
|
68
|
-
{ open: '"', close: '"' },
|
|
69
|
-
{ open: "'", close: "'" }
|
|
70
|
-
],
|
|
71
|
-
onEnterRules: [
|
|
72
|
-
{
|
|
73
|
-
beforeText: new RegExp(
|
|
74
|
-
`<(?!(?:${EMPTY_ELEMENTS.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,
|
|
75
|
-
"i"
|
|
76
|
-
),
|
|
77
|
-
afterText: /^<\/(\w[\w\d]*)\s*>$/i,
|
|
78
|
-
action: {
|
|
79
|
-
indentAction: monaco_editor_core_exports.languages.IndentAction.IndentOutdent
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
beforeText: new RegExp(
|
|
84
|
-
`<(?!(?:${EMPTY_ELEMENTS.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,
|
|
85
|
-
"i"
|
|
86
|
-
),
|
|
87
|
-
action: { indentAction: monaco_editor_core_exports.languages.IndentAction.Indent }
|
|
88
|
-
}
|
|
89
|
-
]
|
|
90
|
-
};
|
|
91
|
-
var language = {
|
|
92
|
-
defaultToken: "",
|
|
93
|
-
tokenPostfix: "",
|
|
94
|
-
// ignoreCase: true,
|
|
95
|
-
// The main tokenizer for our languages
|
|
96
|
-
tokenizer: {
|
|
97
|
-
root: [
|
|
98
|
-
[/\{\{!--/, "comment.block.start.handlebars", "@commentBlock"],
|
|
99
|
-
[/\{\{!/, "comment.start.handlebars", "@comment"],
|
|
100
|
-
[/\{\{/, { token: "@rematch", switchTo: "@handlebarsInSimpleState.root" }],
|
|
101
|
-
[/<!DOCTYPE/, "metatag.html", "@doctype"],
|
|
102
|
-
[/<!--/, "comment.html", "@commentHtml"],
|
|
103
|
-
[/(<)(\w+)(\/>)/, ["delimiter.html", "tag.html", "delimiter.html"]],
|
|
104
|
-
[/(<)(script)/, ["delimiter.html", { token: "tag.html", next: "@script" }]],
|
|
105
|
-
[/(<)(style)/, ["delimiter.html", { token: "tag.html", next: "@style" }]],
|
|
106
|
-
[/(<)([:\w]+)/, ["delimiter.html", { token: "tag.html", next: "@otherTag" }]],
|
|
107
|
-
[/(<\/)(\w+)/, ["delimiter.html", { token: "tag.html", next: "@otherTag" }]],
|
|
108
|
-
[/</, "delimiter.html"],
|
|
109
|
-
[/\{/, "delimiter.html"],
|
|
110
|
-
[/[^<{]+/]
|
|
111
|
-
// text
|
|
112
|
-
],
|
|
113
|
-
doctype: [
|
|
114
|
-
[
|
|
115
|
-
/\{\{/,
|
|
116
|
-
{
|
|
117
|
-
token: "@rematch",
|
|
118
|
-
switchTo: "@handlebarsInSimpleState.comment"
|
|
119
|
-
}
|
|
120
|
-
],
|
|
121
|
-
[/[^>]+/, "metatag.content.html"],
|
|
122
|
-
[/>/, "metatag.html", "@pop"]
|
|
123
|
-
],
|
|
124
|
-
comment: [
|
|
125
|
-
[/\}\}/, "comment.end.handlebars", "@pop"],
|
|
126
|
-
[/./, "comment.content.handlebars"]
|
|
127
|
-
],
|
|
128
|
-
commentBlock: [
|
|
129
|
-
[/--\}\}/, "comment.block.end.handlebars", "@pop"],
|
|
130
|
-
[/./, "comment.content.handlebars"]
|
|
131
|
-
],
|
|
132
|
-
commentHtml: [
|
|
133
|
-
[
|
|
134
|
-
/\{\{/,
|
|
135
|
-
{
|
|
136
|
-
token: "@rematch",
|
|
137
|
-
switchTo: "@handlebarsInSimpleState.comment"
|
|
138
|
-
}
|
|
139
|
-
],
|
|
140
|
-
[/-->/, "comment.html", "@pop"],
|
|
141
|
-
[/[^-]+/, "comment.content.html"],
|
|
142
|
-
[/./, "comment.content.html"]
|
|
143
|
-
],
|
|
144
|
-
otherTag: [
|
|
145
|
-
[
|
|
146
|
-
/\{\{/,
|
|
147
|
-
{
|
|
148
|
-
token: "@rematch",
|
|
149
|
-
switchTo: "@handlebarsInSimpleState.otherTag"
|
|
150
|
-
}
|
|
151
|
-
],
|
|
152
|
-
[/\/?>/, "delimiter.html", "@pop"],
|
|
153
|
-
[/"([^"]*)"/, "attribute.value"],
|
|
154
|
-
[/'([^']*)'/, "attribute.value"],
|
|
155
|
-
[/[\w\-]+/, "attribute.name"],
|
|
156
|
-
[/=/, "delimiter"],
|
|
157
|
-
[/[ \t\r\n]+/]
|
|
158
|
-
// whitespace
|
|
159
|
-
],
|
|
160
|
-
// -- BEGIN <script> tags handling
|
|
161
|
-
// After <script
|
|
162
|
-
script: [
|
|
163
|
-
[
|
|
164
|
-
/\{\{/,
|
|
165
|
-
{
|
|
166
|
-
token: "@rematch",
|
|
167
|
-
switchTo: "@handlebarsInSimpleState.script"
|
|
168
|
-
}
|
|
169
|
-
],
|
|
170
|
-
[/type/, "attribute.name", "@scriptAfterType"],
|
|
171
|
-
[/"([^"]*)"/, "attribute.value"],
|
|
172
|
-
[/'([^']*)'/, "attribute.value"],
|
|
173
|
-
[/[\w\-]+/, "attribute.name"],
|
|
174
|
-
[/=/, "delimiter"],
|
|
175
|
-
[
|
|
176
|
-
/>/,
|
|
177
|
-
{
|
|
178
|
-
token: "delimiter.html",
|
|
179
|
-
next: "@scriptEmbedded.text/javascript",
|
|
180
|
-
nextEmbedded: "text/javascript"
|
|
181
|
-
}
|
|
182
|
-
],
|
|
183
|
-
[/[ \t\r\n]+/],
|
|
184
|
-
// whitespace
|
|
185
|
-
[
|
|
186
|
-
/(<\/)(script\s*)(>)/,
|
|
187
|
-
["delimiter.html", "tag.html", { token: "delimiter.html", next: "@pop" }]
|
|
188
|
-
]
|
|
189
|
-
],
|
|
190
|
-
// After <script ... type
|
|
191
|
-
scriptAfterType: [
|
|
192
|
-
[
|
|
193
|
-
/\{\{/,
|
|
194
|
-
{
|
|
195
|
-
token: "@rematch",
|
|
196
|
-
switchTo: "@handlebarsInSimpleState.scriptAfterType"
|
|
197
|
-
}
|
|
198
|
-
],
|
|
199
|
-
[/=/, "delimiter", "@scriptAfterTypeEquals"],
|
|
200
|
-
[
|
|
201
|
-
/>/,
|
|
202
|
-
{
|
|
203
|
-
token: "delimiter.html",
|
|
204
|
-
next: "@scriptEmbedded.text/javascript",
|
|
205
|
-
nextEmbedded: "text/javascript"
|
|
206
|
-
}
|
|
207
|
-
],
|
|
208
|
-
// cover invalid e.g. <script type>
|
|
209
|
-
[/[ \t\r\n]+/],
|
|
210
|
-
// whitespace
|
|
211
|
-
[/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
|
|
212
|
-
],
|
|
213
|
-
// After <script ... type =
|
|
214
|
-
scriptAfterTypeEquals: [
|
|
215
|
-
[
|
|
216
|
-
/\{\{/,
|
|
217
|
-
{
|
|
218
|
-
token: "@rematch",
|
|
219
|
-
switchTo: "@handlebarsInSimpleState.scriptAfterTypeEquals"
|
|
220
|
-
}
|
|
221
|
-
],
|
|
222
|
-
[
|
|
223
|
-
/"([^"]*)"/,
|
|
224
|
-
{
|
|
225
|
-
token: "attribute.value",
|
|
226
|
-
switchTo: "@scriptWithCustomType.$1"
|
|
227
|
-
}
|
|
228
|
-
],
|
|
229
|
-
[
|
|
230
|
-
/'([^']*)'/,
|
|
231
|
-
{
|
|
232
|
-
token: "attribute.value",
|
|
233
|
-
switchTo: "@scriptWithCustomType.$1"
|
|
234
|
-
}
|
|
235
|
-
],
|
|
236
|
-
[
|
|
237
|
-
/>/,
|
|
238
|
-
{
|
|
239
|
-
token: "delimiter.html",
|
|
240
|
-
next: "@scriptEmbedded.text/javascript",
|
|
241
|
-
nextEmbedded: "text/javascript"
|
|
242
|
-
}
|
|
243
|
-
],
|
|
244
|
-
// cover invalid e.g. <script type=>
|
|
245
|
-
[/[ \t\r\n]+/],
|
|
246
|
-
// whitespace
|
|
247
|
-
[/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
|
|
248
|
-
],
|
|
249
|
-
// After <script ... type = $S2
|
|
250
|
-
scriptWithCustomType: [
|
|
251
|
-
[
|
|
252
|
-
/\{\{/,
|
|
253
|
-
{
|
|
254
|
-
token: "@rematch",
|
|
255
|
-
switchTo: "@handlebarsInSimpleState.scriptWithCustomType.$S2"
|
|
256
|
-
}
|
|
257
|
-
],
|
|
258
|
-
[
|
|
259
|
-
/>/,
|
|
260
|
-
{
|
|
261
|
-
token: "delimiter.html",
|
|
262
|
-
next: "@scriptEmbedded.$S2",
|
|
263
|
-
nextEmbedded: "$S2"
|
|
264
|
-
}
|
|
265
|
-
],
|
|
266
|
-
[/"([^"]*)"/, "attribute.value"],
|
|
267
|
-
[/'([^']*)'/, "attribute.value"],
|
|
268
|
-
[/[\w\-]+/, "attribute.name"],
|
|
269
|
-
[/=/, "delimiter"],
|
|
270
|
-
[/[ \t\r\n]+/],
|
|
271
|
-
// whitespace
|
|
272
|
-
[/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
|
|
273
|
-
],
|
|
274
|
-
scriptEmbedded: [
|
|
275
|
-
[
|
|
276
|
-
/\{\{/,
|
|
277
|
-
{
|
|
278
|
-
token: "@rematch",
|
|
279
|
-
switchTo: "@handlebarsInEmbeddedState.scriptEmbedded.$S2",
|
|
280
|
-
nextEmbedded: "@pop"
|
|
281
|
-
}
|
|
282
|
-
],
|
|
283
|
-
[/<\/script/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }]
|
|
284
|
-
],
|
|
285
|
-
// -- END <script> tags handling
|
|
286
|
-
// -- BEGIN <style> tags handling
|
|
287
|
-
// After <style
|
|
288
|
-
style: [
|
|
289
|
-
[
|
|
290
|
-
/\{\{/,
|
|
291
|
-
{
|
|
292
|
-
token: "@rematch",
|
|
293
|
-
switchTo: "@handlebarsInSimpleState.style"
|
|
294
|
-
}
|
|
295
|
-
],
|
|
296
|
-
[/type/, "attribute.name", "@styleAfterType"],
|
|
297
|
-
[/"([^"]*)"/, "attribute.value"],
|
|
298
|
-
[/'([^']*)'/, "attribute.value"],
|
|
299
|
-
[/[\w\-]+/, "attribute.name"],
|
|
300
|
-
[/=/, "delimiter"],
|
|
301
|
-
[
|
|
302
|
-
/>/,
|
|
303
|
-
{
|
|
304
|
-
token: "delimiter.html",
|
|
305
|
-
next: "@styleEmbedded.text/css",
|
|
306
|
-
nextEmbedded: "text/css"
|
|
307
|
-
}
|
|
308
|
-
],
|
|
309
|
-
[/[ \t\r\n]+/],
|
|
310
|
-
// whitespace
|
|
311
|
-
[
|
|
312
|
-
/(<\/)(style\s*)(>)/,
|
|
313
|
-
["delimiter.html", "tag.html", { token: "delimiter.html", next: "@pop" }]
|
|
314
|
-
]
|
|
315
|
-
],
|
|
316
|
-
// After <style ... type
|
|
317
|
-
styleAfterType: [
|
|
318
|
-
[
|
|
319
|
-
/\{\{/,
|
|
320
|
-
{
|
|
321
|
-
token: "@rematch",
|
|
322
|
-
switchTo: "@handlebarsInSimpleState.styleAfterType"
|
|
323
|
-
}
|
|
324
|
-
],
|
|
325
|
-
[/=/, "delimiter", "@styleAfterTypeEquals"],
|
|
326
|
-
[
|
|
327
|
-
/>/,
|
|
328
|
-
{
|
|
329
|
-
token: "delimiter.html",
|
|
330
|
-
next: "@styleEmbedded.text/css",
|
|
331
|
-
nextEmbedded: "text/css"
|
|
332
|
-
}
|
|
333
|
-
],
|
|
334
|
-
// cover invalid e.g. <style type>
|
|
335
|
-
[/[ \t\r\n]+/],
|
|
336
|
-
// whitespace
|
|
337
|
-
[/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
|
|
338
|
-
],
|
|
339
|
-
// After <style ... type =
|
|
340
|
-
styleAfterTypeEquals: [
|
|
341
|
-
[
|
|
342
|
-
/\{\{/,
|
|
343
|
-
{
|
|
344
|
-
token: "@rematch",
|
|
345
|
-
switchTo: "@handlebarsInSimpleState.styleAfterTypeEquals"
|
|
346
|
-
}
|
|
347
|
-
],
|
|
348
|
-
[
|
|
349
|
-
/"([^"]*)"/,
|
|
350
|
-
{
|
|
351
|
-
token: "attribute.value",
|
|
352
|
-
switchTo: "@styleWithCustomType.$1"
|
|
353
|
-
}
|
|
354
|
-
],
|
|
355
|
-
[
|
|
356
|
-
/'([^']*)'/,
|
|
357
|
-
{
|
|
358
|
-
token: "attribute.value",
|
|
359
|
-
switchTo: "@styleWithCustomType.$1"
|
|
360
|
-
}
|
|
361
|
-
],
|
|
362
|
-
[
|
|
363
|
-
/>/,
|
|
364
|
-
{
|
|
365
|
-
token: "delimiter.html",
|
|
366
|
-
next: "@styleEmbedded.text/css",
|
|
367
|
-
nextEmbedded: "text/css"
|
|
368
|
-
}
|
|
369
|
-
],
|
|
370
|
-
// cover invalid e.g. <style type=>
|
|
371
|
-
[/[ \t\r\n]+/],
|
|
372
|
-
// whitespace
|
|
373
|
-
[/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
|
|
374
|
-
],
|
|
375
|
-
// After <style ... type = $S2
|
|
376
|
-
styleWithCustomType: [
|
|
377
|
-
[
|
|
378
|
-
/\{\{/,
|
|
379
|
-
{
|
|
380
|
-
token: "@rematch",
|
|
381
|
-
switchTo: "@handlebarsInSimpleState.styleWithCustomType.$S2"
|
|
382
|
-
}
|
|
383
|
-
],
|
|
384
|
-
[
|
|
385
|
-
/>/,
|
|
386
|
-
{
|
|
387
|
-
token: "delimiter.html",
|
|
388
|
-
next: "@styleEmbedded.$S2",
|
|
389
|
-
nextEmbedded: "$S2"
|
|
390
|
-
}
|
|
391
|
-
],
|
|
392
|
-
[/"([^"]*)"/, "attribute.value"],
|
|
393
|
-
[/'([^']*)'/, "attribute.value"],
|
|
394
|
-
[/[\w\-]+/, "attribute.name"],
|
|
395
|
-
[/=/, "delimiter"],
|
|
396
|
-
[/[ \t\r\n]+/],
|
|
397
|
-
// whitespace
|
|
398
|
-
[/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
|
|
399
|
-
],
|
|
400
|
-
styleEmbedded: [
|
|
401
|
-
[
|
|
402
|
-
/\{\{/,
|
|
403
|
-
{
|
|
404
|
-
token: "@rematch",
|
|
405
|
-
switchTo: "@handlebarsInEmbeddedState.styleEmbedded.$S2",
|
|
406
|
-
nextEmbedded: "@pop"
|
|
407
|
-
}
|
|
408
|
-
],
|
|
409
|
-
[/<\/style/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }]
|
|
410
|
-
],
|
|
411
|
-
// -- END <style> tags handling
|
|
412
|
-
handlebarsInSimpleState: [
|
|
413
|
-
[/\{\{\{?/, "delimiter.handlebars"],
|
|
414
|
-
[/\}\}\}?/, { token: "delimiter.handlebars", switchTo: "@$S2.$S3" }],
|
|
415
|
-
{ include: "handlebarsRoot" }
|
|
416
|
-
],
|
|
417
|
-
handlebarsInEmbeddedState: [
|
|
418
|
-
[/\{\{\{?/, "delimiter.handlebars"],
|
|
419
|
-
[
|
|
420
|
-
/\}\}\}?/,
|
|
421
|
-
{
|
|
422
|
-
token: "delimiter.handlebars",
|
|
423
|
-
switchTo: "@$S2.$S3",
|
|
424
|
-
nextEmbedded: "$S3"
|
|
425
|
-
}
|
|
426
|
-
],
|
|
427
|
-
{ include: "handlebarsRoot" }
|
|
428
|
-
],
|
|
429
|
-
handlebarsRoot: [
|
|
430
|
-
[/"[^"]*"/, "string.handlebars"],
|
|
431
|
-
[/[#/][^\s}]+/, "keyword.helper.handlebars"],
|
|
432
|
-
[/else\b/, "keyword.helper.handlebars"],
|
|
433
|
-
[/[\s]+/],
|
|
434
|
-
[/[^}]/, "variable.parameter.handlebars"]
|
|
435
|
-
]
|
|
436
|
-
}
|
|
437
|
-
};
|
|
438
|
-
|
|
439
|
-
export { conf, language };
|
package/hcl/hcl.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: "hcl",
|
|
12
|
-
extensions: [".tf", ".tfvars", ".hcl"],
|
|
13
|
-
aliases: ["Terraform", "tf", "HCL", "hcl"],
|
|
14
|
-
loader: () => {
|
|
15
|
-
{
|
|
16
|
-
return import('./hcl.js');
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
});
|
package/hcl/hcl.js
DELETED
|
@@ -1,191 +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/hcl/hcl.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
|
-
],
|
|
26
|
-
surroundingPairs: [
|
|
27
|
-
{ open: "{", close: "}" },
|
|
28
|
-
{ open: "[", close: "]" },
|
|
29
|
-
{ open: "(", close: ")" },
|
|
30
|
-
{ open: '"', close: '"' }
|
|
31
|
-
]
|
|
32
|
-
};
|
|
33
|
-
var language = {
|
|
34
|
-
defaultToken: "",
|
|
35
|
-
tokenPostfix: ".hcl",
|
|
36
|
-
keywords: [
|
|
37
|
-
"var",
|
|
38
|
-
"local",
|
|
39
|
-
"path",
|
|
40
|
-
"for_each",
|
|
41
|
-
"any",
|
|
42
|
-
"string",
|
|
43
|
-
"number",
|
|
44
|
-
"bool",
|
|
45
|
-
"true",
|
|
46
|
-
"false",
|
|
47
|
-
"null",
|
|
48
|
-
"if ",
|
|
49
|
-
"else ",
|
|
50
|
-
"endif ",
|
|
51
|
-
"for ",
|
|
52
|
-
"in",
|
|
53
|
-
"endfor"
|
|
54
|
-
],
|
|
55
|
-
operators: [
|
|
56
|
-
"=",
|
|
57
|
-
">=",
|
|
58
|
-
"<=",
|
|
59
|
-
"==",
|
|
60
|
-
"!=",
|
|
61
|
-
"+",
|
|
62
|
-
"-",
|
|
63
|
-
"*",
|
|
64
|
-
"/",
|
|
65
|
-
"%",
|
|
66
|
-
"&&",
|
|
67
|
-
"||",
|
|
68
|
-
"!",
|
|
69
|
-
"<",
|
|
70
|
-
">",
|
|
71
|
-
"?",
|
|
72
|
-
"...",
|
|
73
|
-
":"
|
|
74
|
-
],
|
|
75
|
-
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
|
76
|
-
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
|
77
|
-
terraformFunctions: /(abs|ceil|floor|log|max|min|pow|signum|chomp|format|formatlist|indent|join|lower|regex|regexall|replace|split|strrev|substr|title|trimspace|upper|chunklist|coalesce|coalescelist|compact|concat|contains|distinct|element|flatten|index|keys|length|list|lookup|map|matchkeys|merge|range|reverse|setintersection|setproduct|setunion|slice|sort|transpose|values|zipmap|base64decode|base64encode|base64gzip|csvdecode|jsondecode|jsonencode|urlencode|yamldecode|yamlencode|abspath|dirname|pathexpand|basename|file|fileexists|fileset|filebase64|templatefile|formatdate|timeadd|timestamp|base64sha256|base64sha512|bcrypt|filebase64sha256|filebase64sha512|filemd5|filemd1|filesha256|filesha512|md5|rsadecrypt|sha1|sha256|sha512|uuid|uuidv5|cidrhost|cidrnetmask|cidrsubnet|tobool|tolist|tomap|tonumber|toset|tostring)/,
|
|
78
|
-
terraformMainBlocks: /(module|data|terraform|resource|provider|variable|output|locals)/,
|
|
79
|
-
tokenizer: {
|
|
80
|
-
root: [
|
|
81
|
-
// highlight main blocks
|
|
82
|
-
[
|
|
83
|
-
/^@terraformMainBlocks([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)(\{)/,
|
|
84
|
-
["type", "", "string", "", "string", "", "@brackets"]
|
|
85
|
-
],
|
|
86
|
-
// highlight all the remaining blocks
|
|
87
|
-
[
|
|
88
|
-
/(\w+[ \t]+)([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)(\{)/,
|
|
89
|
-
["identifier", "", "string", "", "string", "", "@brackets"]
|
|
90
|
-
],
|
|
91
|
-
// highlight block
|
|
92
|
-
[
|
|
93
|
-
/(\w+[ \t]+)([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)([\w-]+|"[\w-]+"|)(=)(\{)/,
|
|
94
|
-
["identifier", "", "string", "", "operator", "", "@brackets"]
|
|
95
|
-
],
|
|
96
|
-
// terraform general highlight - shared with expressions
|
|
97
|
-
{ include: "@terraform" }
|
|
98
|
-
],
|
|
99
|
-
terraform: [
|
|
100
|
-
// highlight terraform functions
|
|
101
|
-
[/@terraformFunctions(\()/, ["type", "@brackets"]],
|
|
102
|
-
// all other words are variables or keywords
|
|
103
|
-
[
|
|
104
|
-
/[a-zA-Z_]\w*-*/,
|
|
105
|
-
// must work with variables such as foo-bar and also with negative numbers
|
|
106
|
-
{
|
|
107
|
-
cases: {
|
|
108
|
-
"@keywords": { token: "keyword.$0" },
|
|
109
|
-
"@default": "variable"
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
],
|
|
113
|
-
{ include: "@whitespace" },
|
|
114
|
-
{ include: "@heredoc" },
|
|
115
|
-
// delimiters and operators
|
|
116
|
-
[/[{}()\[\]]/, "@brackets"],
|
|
117
|
-
[/[<>](?!@symbols)/, "@brackets"],
|
|
118
|
-
[
|
|
119
|
-
/@symbols/,
|
|
120
|
-
{
|
|
121
|
-
cases: {
|
|
122
|
-
"@operators": "operator",
|
|
123
|
-
"@default": ""
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
],
|
|
127
|
-
// numbers
|
|
128
|
-
[/\d*\d+[eE]([\-+]?\d+)?/, "number.float"],
|
|
129
|
-
[/\d*\.\d+([eE][\-+]?\d+)?/, "number.float"],
|
|
130
|
-
[/\d[\d']*/, "number"],
|
|
131
|
-
[/\d/, "number"],
|
|
132
|
-
[/[;,.]/, "delimiter"],
|
|
133
|
-
// delimiter: after number because of .\d floats
|
|
134
|
-
// strings
|
|
135
|
-
[/"/, "string", "@string"],
|
|
136
|
-
// this will include expressions
|
|
137
|
-
[/'/, "invalid"]
|
|
138
|
-
],
|
|
139
|
-
heredoc: [
|
|
140
|
-
[/<<[-]*\s*["]?([\w\-]+)["]?/, { token: "string.heredoc.delimiter", next: "@heredocBody.$1" }]
|
|
141
|
-
],
|
|
142
|
-
heredocBody: [
|
|
143
|
-
[
|
|
144
|
-
/([\w\-]+)$/,
|
|
145
|
-
{
|
|
146
|
-
cases: {
|
|
147
|
-
"$1==$S2": [
|
|
148
|
-
{
|
|
149
|
-
token: "string.heredoc.delimiter",
|
|
150
|
-
next: "@popall"
|
|
151
|
-
}
|
|
152
|
-
],
|
|
153
|
-
"@default": "string.heredoc"
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
],
|
|
157
|
-
[/./, "string.heredoc"]
|
|
158
|
-
],
|
|
159
|
-
whitespace: [
|
|
160
|
-
[/[ \t\r\n]+/, ""],
|
|
161
|
-
[/\/\*/, "comment", "@comment"],
|
|
162
|
-
[/\/\/.*$/, "comment"],
|
|
163
|
-
[/#.*$/, "comment"]
|
|
164
|
-
],
|
|
165
|
-
comment: [
|
|
166
|
-
[/[^\/*]+/, "comment"],
|
|
167
|
-
[/\*\//, "comment", "@pop"],
|
|
168
|
-
[/[\/*]/, "comment"]
|
|
169
|
-
],
|
|
170
|
-
string: [
|
|
171
|
-
[/\$\{/, { token: "delimiter", next: "@stringExpression" }],
|
|
172
|
-
[/[^\\"\$]+/, "string"],
|
|
173
|
-
[/@escapes/, "string.escape"],
|
|
174
|
-
[/\\./, "string.escape.invalid"],
|
|
175
|
-
[/"/, "string", "@popall"]
|
|
176
|
-
],
|
|
177
|
-
stringInsideExpression: [
|
|
178
|
-
[/[^\\"]+/, "string"],
|
|
179
|
-
[/@escapes/, "string.escape"],
|
|
180
|
-
[/\\./, "string.escape.invalid"],
|
|
181
|
-
[/"/, "string", "@pop"]
|
|
182
|
-
],
|
|
183
|
-
stringExpression: [
|
|
184
|
-
[/\}/, { token: "delimiter", next: "@pop" }],
|
|
185
|
-
[/"/, "string", "@stringInsideExpression"],
|
|
186
|
-
{ include: "@terraform" }
|
|
187
|
-
]
|
|
188
|
-
}
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
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: "html",
|
|
12
|
-
extensions: [".html", ".htm", ".shtml", ".xhtml", ".mdoc", ".jsp", ".asp", ".aspx", ".jshtm"],
|
|
13
|
-
aliases: ["HTML", "htm", "html", "xhtml"],
|
|
14
|
-
mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
|
|
15
|
-
loader: () => {
|
|
16
|
-
{
|
|
17
|
-
return import('./html.js');
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
});
|