@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/tcl/tcl.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/tcl/tcl.ts
|
|
10
|
-
var conf = {
|
|
11
|
-
brackets: [
|
|
12
|
-
["{", "}"],
|
|
13
|
-
["[", "]"],
|
|
14
|
-
["(", ")"]
|
|
15
|
-
],
|
|
16
|
-
autoClosingPairs: [
|
|
17
|
-
{ open: "{", close: "}" },
|
|
18
|
-
{ open: "[", close: "]" },
|
|
19
|
-
{ open: "(", close: ")" },
|
|
20
|
-
{ open: '"', close: '"' },
|
|
21
|
-
{ open: "'", close: "'" }
|
|
22
|
-
],
|
|
23
|
-
surroundingPairs: [
|
|
24
|
-
{ open: "{", close: "}" },
|
|
25
|
-
{ open: "[", close: "]" },
|
|
26
|
-
{ open: "(", close: ")" },
|
|
27
|
-
{ open: '"', close: '"' },
|
|
28
|
-
{ open: "'", close: "'" }
|
|
29
|
-
]
|
|
30
|
-
};
|
|
31
|
-
var language = {
|
|
32
|
-
tokenPostfix: ".tcl",
|
|
33
|
-
specialFunctions: [
|
|
34
|
-
"set",
|
|
35
|
-
"unset",
|
|
36
|
-
"rename",
|
|
37
|
-
"variable",
|
|
38
|
-
"proc",
|
|
39
|
-
"coroutine",
|
|
40
|
-
"foreach",
|
|
41
|
-
"incr",
|
|
42
|
-
"append",
|
|
43
|
-
"lappend",
|
|
44
|
-
"linsert",
|
|
45
|
-
"lreplace"
|
|
46
|
-
],
|
|
47
|
-
mainFunctions: [
|
|
48
|
-
"if",
|
|
49
|
-
"then",
|
|
50
|
-
"elseif",
|
|
51
|
-
"else",
|
|
52
|
-
"case",
|
|
53
|
-
"switch",
|
|
54
|
-
"while",
|
|
55
|
-
"for",
|
|
56
|
-
"break",
|
|
57
|
-
"continue",
|
|
58
|
-
"return",
|
|
59
|
-
"package",
|
|
60
|
-
"namespace",
|
|
61
|
-
"catch",
|
|
62
|
-
"exit",
|
|
63
|
-
"eval",
|
|
64
|
-
"expr",
|
|
65
|
-
"uplevel",
|
|
66
|
-
"upvar"
|
|
67
|
-
],
|
|
68
|
-
builtinFunctions: [
|
|
69
|
-
"file",
|
|
70
|
-
"info",
|
|
71
|
-
"concat",
|
|
72
|
-
"join",
|
|
73
|
-
"lindex",
|
|
74
|
-
"list",
|
|
75
|
-
"llength",
|
|
76
|
-
"lrange",
|
|
77
|
-
"lsearch",
|
|
78
|
-
"lsort",
|
|
79
|
-
"split",
|
|
80
|
-
"array",
|
|
81
|
-
"parray",
|
|
82
|
-
"binary",
|
|
83
|
-
"format",
|
|
84
|
-
"regexp",
|
|
85
|
-
"regsub",
|
|
86
|
-
"scan",
|
|
87
|
-
"string",
|
|
88
|
-
"subst",
|
|
89
|
-
"dict",
|
|
90
|
-
"cd",
|
|
91
|
-
"clock",
|
|
92
|
-
"exec",
|
|
93
|
-
"glob",
|
|
94
|
-
"pid",
|
|
95
|
-
"pwd",
|
|
96
|
-
"close",
|
|
97
|
-
"eof",
|
|
98
|
-
"fblocked",
|
|
99
|
-
"fconfigure",
|
|
100
|
-
"fcopy",
|
|
101
|
-
"fileevent",
|
|
102
|
-
"flush",
|
|
103
|
-
"gets",
|
|
104
|
-
"open",
|
|
105
|
-
"puts",
|
|
106
|
-
"read",
|
|
107
|
-
"seek",
|
|
108
|
-
"socket",
|
|
109
|
-
"tell",
|
|
110
|
-
"interp",
|
|
111
|
-
"after",
|
|
112
|
-
"auto_execok",
|
|
113
|
-
"auto_load",
|
|
114
|
-
"auto_mkindex",
|
|
115
|
-
"auto_reset",
|
|
116
|
-
"bgerror",
|
|
117
|
-
"error",
|
|
118
|
-
"global",
|
|
119
|
-
"history",
|
|
120
|
-
"load",
|
|
121
|
-
"source",
|
|
122
|
-
"time",
|
|
123
|
-
"trace",
|
|
124
|
-
"unknown",
|
|
125
|
-
"unset",
|
|
126
|
-
"update",
|
|
127
|
-
"vwait",
|
|
128
|
-
"winfo",
|
|
129
|
-
"wm",
|
|
130
|
-
"bind",
|
|
131
|
-
"event",
|
|
132
|
-
"pack",
|
|
133
|
-
"place",
|
|
134
|
-
"grid",
|
|
135
|
-
"font",
|
|
136
|
-
"bell",
|
|
137
|
-
"clipboard",
|
|
138
|
-
"destroy",
|
|
139
|
-
"focus",
|
|
140
|
-
"grab",
|
|
141
|
-
"lower",
|
|
142
|
-
"option",
|
|
143
|
-
"raise",
|
|
144
|
-
"selection",
|
|
145
|
-
"send",
|
|
146
|
-
"tk",
|
|
147
|
-
"tkwait",
|
|
148
|
-
"tk_bisque",
|
|
149
|
-
"tk_focusNext",
|
|
150
|
-
"tk_focusPrev",
|
|
151
|
-
"tk_focusFollowsMouse",
|
|
152
|
-
"tk_popup",
|
|
153
|
-
"tk_setPalette"
|
|
154
|
-
],
|
|
155
|
-
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
|
156
|
-
brackets: [
|
|
157
|
-
{ open: "(", close: ")", token: "delimiter.parenthesis" },
|
|
158
|
-
{ open: "{", close: "}", token: "delimiter.curly" },
|
|
159
|
-
{ open: "[", close: "]", token: "delimiter.square" }
|
|
160
|
-
],
|
|
161
|
-
escapes: /\\(?:[abfnrtv\\"'\[\]\{\};\$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
|
162
|
-
variables: /(?:\$+(?:(?:\:\:?)?[a-zA-Z_]\w*)+)/,
|
|
163
|
-
tokenizer: {
|
|
164
|
-
root: [
|
|
165
|
-
// identifiers and keywords
|
|
166
|
-
[
|
|
167
|
-
/[a-zA-Z_]\w*/,
|
|
168
|
-
{
|
|
169
|
-
cases: {
|
|
170
|
-
"@specialFunctions": {
|
|
171
|
-
token: "keyword.flow",
|
|
172
|
-
next: "@specialFunc"
|
|
173
|
-
},
|
|
174
|
-
"@mainFunctions": "keyword",
|
|
175
|
-
"@builtinFunctions": "variable",
|
|
176
|
-
"@default": "operator.scss"
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
],
|
|
180
|
-
[/\s+\-+(?!\d|\.)\w*|{\*}/, "metatag"],
|
|
181
|
-
// whitespace
|
|
182
|
-
{ include: "@whitespace" },
|
|
183
|
-
// delimiters and operators
|
|
184
|
-
[/[{}()\[\]]/, "@brackets"],
|
|
185
|
-
[/@symbols/, "operator"],
|
|
186
|
-
[/\$+(?:\:\:)?\{/, { token: "identifier", next: "@nestedVariable" }],
|
|
187
|
-
[/@variables/, "type.identifier"],
|
|
188
|
-
[/\.(?!\d|\.)[\w\-]*/, "operator.sql"],
|
|
189
|
-
// numbers
|
|
190
|
-
[/\d+(\.\d+)?/, "number"],
|
|
191
|
-
[/\d+/, "number"],
|
|
192
|
-
// delimiter
|
|
193
|
-
[/;/, "delimiter"],
|
|
194
|
-
// strings
|
|
195
|
-
[/"/, { token: "string.quote", bracket: "@open", next: "@dstring" }],
|
|
196
|
-
[/'/, { token: "string.quote", bracket: "@open", next: "@sstring" }]
|
|
197
|
-
],
|
|
198
|
-
dstring: [
|
|
199
|
-
[/\[/, { token: "@brackets", next: "@nestedCall" }],
|
|
200
|
-
[/\$+(?:\:\:)?\{/, { token: "identifier", next: "@nestedVariable" }],
|
|
201
|
-
[/@variables/, "type.identifier"],
|
|
202
|
-
[/[^\\$\[\]"]+/, "string"],
|
|
203
|
-
[/@escapes/, "string.escape"],
|
|
204
|
-
[/"/, { token: "string.quote", bracket: "@close", next: "@pop" }]
|
|
205
|
-
],
|
|
206
|
-
sstring: [
|
|
207
|
-
[/\[/, { token: "@brackets", next: "@nestedCall" }],
|
|
208
|
-
[/\$+(?:\:\:)?\{/, { token: "identifier", next: "@nestedVariable" }],
|
|
209
|
-
[/@variables/, "type.identifier"],
|
|
210
|
-
[/[^\\$\[\]']+/, "string"],
|
|
211
|
-
[/@escapes/, "string.escape"],
|
|
212
|
-
[/'/, { token: "string.quote", bracket: "@close", next: "@pop" }]
|
|
213
|
-
],
|
|
214
|
-
whitespace: [
|
|
215
|
-
[/[ \t\r\n]+/, "white"],
|
|
216
|
-
[/#.*\\$/, { token: "comment", next: "@newlineComment" }],
|
|
217
|
-
[/#.*(?!\\)$/, "comment"]
|
|
218
|
-
],
|
|
219
|
-
newlineComment: [
|
|
220
|
-
[/.*\\$/, "comment"],
|
|
221
|
-
[/.*(?!\\)$/, { token: "comment", next: "@pop" }]
|
|
222
|
-
],
|
|
223
|
-
nestedVariable: [
|
|
224
|
-
[/[^\{\}\$]+/, "type.identifier"],
|
|
225
|
-
[/\}/, { token: "identifier", next: "@pop" }]
|
|
226
|
-
],
|
|
227
|
-
nestedCall: [
|
|
228
|
-
[/\[/, { token: "@brackets", next: "@nestedCall" }],
|
|
229
|
-
[/\]/, { token: "@brackets", next: "@pop" }],
|
|
230
|
-
{ include: "root" }
|
|
231
|
-
],
|
|
232
|
-
specialFunc: [
|
|
233
|
-
[/"/, { token: "string", next: "@dstring" }],
|
|
234
|
-
[/'/, { token: "string", next: "@sstring" }],
|
|
235
|
-
[/\S+/, { token: "type", next: "@pop" }]
|
|
236
|
-
]
|
|
237
|
-
}
|
|
238
|
-
};
|
|
239
|
-
|
|
240
|
-
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: "twig",
|
|
12
|
-
extensions: [".twig"],
|
|
13
|
-
aliases: ["Twig", "twig"],
|
|
14
|
-
mimetypes: ["text/x-twig"],
|
|
15
|
-
loader: () => {
|
|
16
|
-
{
|
|
17
|
-
return import('./twig.js');
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
});
|
package/twig/twig.js
DELETED
|
@@ -1,400 +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/twig/twig.ts
|
|
10
|
-
var conf = {
|
|
11
|
-
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,
|
|
12
|
-
comments: {
|
|
13
|
-
blockComment: ["{#", "#}"]
|
|
14
|
-
},
|
|
15
|
-
brackets: [
|
|
16
|
-
["{#", "#}"],
|
|
17
|
-
["{%", "%}"],
|
|
18
|
-
["{{", "}}"],
|
|
19
|
-
["(", ")"],
|
|
20
|
-
["[", "]"],
|
|
21
|
-
// HTML
|
|
22
|
-
["<!--", "-->"],
|
|
23
|
-
["<", ">"]
|
|
24
|
-
],
|
|
25
|
-
autoClosingPairs: [
|
|
26
|
-
{ open: "{# ", close: " #}" },
|
|
27
|
-
{ open: "{% ", close: " %}" },
|
|
28
|
-
{ open: "{{ ", close: " }}" },
|
|
29
|
-
{ open: "[", close: "]" },
|
|
30
|
-
{ open: "(", close: ")" },
|
|
31
|
-
{ open: '"', close: '"' },
|
|
32
|
-
{ open: "'", close: "'" }
|
|
33
|
-
],
|
|
34
|
-
surroundingPairs: [
|
|
35
|
-
{ open: '"', close: '"' },
|
|
36
|
-
{ open: "'", close: "'" },
|
|
37
|
-
// HTML
|
|
38
|
-
{ open: "<", close: ">" }
|
|
39
|
-
]
|
|
40
|
-
};
|
|
41
|
-
var language = {
|
|
42
|
-
defaultToken: "",
|
|
43
|
-
tokenPostfix: "",
|
|
44
|
-
ignoreCase: true,
|
|
45
|
-
keywords: [
|
|
46
|
-
// (opening) tags
|
|
47
|
-
"apply",
|
|
48
|
-
"autoescape",
|
|
49
|
-
"block",
|
|
50
|
-
"deprecated",
|
|
51
|
-
"do",
|
|
52
|
-
"embed",
|
|
53
|
-
"extends",
|
|
54
|
-
"flush",
|
|
55
|
-
"for",
|
|
56
|
-
"from",
|
|
57
|
-
"if",
|
|
58
|
-
"import",
|
|
59
|
-
"include",
|
|
60
|
-
"macro",
|
|
61
|
-
"sandbox",
|
|
62
|
-
"set",
|
|
63
|
-
"use",
|
|
64
|
-
"verbatim",
|
|
65
|
-
"with",
|
|
66
|
-
// closing tags
|
|
67
|
-
"endapply",
|
|
68
|
-
"endautoescape",
|
|
69
|
-
"endblock",
|
|
70
|
-
"endembed",
|
|
71
|
-
"endfor",
|
|
72
|
-
"endif",
|
|
73
|
-
"endmacro",
|
|
74
|
-
"endsandbox",
|
|
75
|
-
"endset",
|
|
76
|
-
"endwith",
|
|
77
|
-
// literals
|
|
78
|
-
"true",
|
|
79
|
-
"false"
|
|
80
|
-
],
|
|
81
|
-
tokenizer: {
|
|
82
|
-
root: [
|
|
83
|
-
// whitespace
|
|
84
|
-
[/\s+/],
|
|
85
|
-
// Twig Tag Delimiters
|
|
86
|
-
[/{#/, "comment.twig", "@commentState"],
|
|
87
|
-
[/{%[-~]?/, "delimiter.twig", "@blockState"],
|
|
88
|
-
[/{{[-~]?/, "delimiter.twig", "@variableState"],
|
|
89
|
-
// HTML
|
|
90
|
-
[/<!DOCTYPE/, "metatag.html", "@doctype"],
|
|
91
|
-
[/<!--/, "comment.html", "@comment"],
|
|
92
|
-
[/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/, ["delimiter.html", "tag.html", "", "delimiter.html"]],
|
|
93
|
-
[/(<)(script)/, ["delimiter.html", { token: "tag.html", next: "@script" }]],
|
|
94
|
-
[/(<)(style)/, ["delimiter.html", { token: "tag.html", next: "@style" }]],
|
|
95
|
-
[/(<)((?:[\w\-]+:)?[\w\-]+)/, ["delimiter.html", { token: "tag.html", next: "@otherTag" }]],
|
|
96
|
-
[/(<\/)((?:[\w\-]+:)?[\w\-]+)/, ["delimiter.html", { token: "tag.html", next: "@otherTag" }]],
|
|
97
|
-
[/</, "delimiter.html"],
|
|
98
|
-
[/[^<{]+/]
|
|
99
|
-
// text
|
|
100
|
-
],
|
|
101
|
-
/**
|
|
102
|
-
* Comment Tag Handling
|
|
103
|
-
*/
|
|
104
|
-
commentState: [
|
|
105
|
-
[/#}/, "comment.twig", "@pop"],
|
|
106
|
-
[/./, "comment.twig"]
|
|
107
|
-
],
|
|
108
|
-
/**
|
|
109
|
-
* Block Tag Handling
|
|
110
|
-
*/
|
|
111
|
-
blockState: [
|
|
112
|
-
[/[-~]?%}/, "delimiter.twig", "@pop"],
|
|
113
|
-
// whitespace
|
|
114
|
-
[/\s+/],
|
|
115
|
-
// verbatim
|
|
116
|
-
// Unlike other blocks, verbatim ehas its own state
|
|
117
|
-
// transition to ensure we mark its contents as strings.
|
|
118
|
-
[
|
|
119
|
-
/(verbatim)(\s*)([-~]?%})/,
|
|
120
|
-
["keyword.twig", "", { token: "delimiter.twig", next: "@rawDataState" }]
|
|
121
|
-
],
|
|
122
|
-
{ include: "expression" }
|
|
123
|
-
],
|
|
124
|
-
rawDataState: [
|
|
125
|
-
// endverbatim
|
|
126
|
-
[
|
|
127
|
-
/({%[-~]?)(\s*)(endverbatim)(\s*)([-~]?%})/,
|
|
128
|
-
["delimiter.twig", "", "keyword.twig", "", { token: "delimiter.twig", next: "@popall" }]
|
|
129
|
-
],
|
|
130
|
-
[/./, "string.twig"]
|
|
131
|
-
],
|
|
132
|
-
/**
|
|
133
|
-
* Variable Tag Handling
|
|
134
|
-
*/
|
|
135
|
-
variableState: [[/[-~]?}}/, "delimiter.twig", "@pop"], { include: "expression" }],
|
|
136
|
-
stringState: [
|
|
137
|
-
// closing double quoted string
|
|
138
|
-
[/"/, "string.twig", "@pop"],
|
|
139
|
-
// interpolation start
|
|
140
|
-
[/#{\s*/, "string.twig", "@interpolationState"],
|
|
141
|
-
// string part
|
|
142
|
-
[/[^#"\\]*(?:(?:\\.|#(?!\{))[^#"\\]*)*/, "string.twig"]
|
|
143
|
-
],
|
|
144
|
-
interpolationState: [
|
|
145
|
-
// interpolation end
|
|
146
|
-
[/}/, "string.twig", "@pop"],
|
|
147
|
-
{ include: "expression" }
|
|
148
|
-
],
|
|
149
|
-
/**
|
|
150
|
-
* Expression Handling
|
|
151
|
-
*/
|
|
152
|
-
expression: [
|
|
153
|
-
// whitespace
|
|
154
|
-
[/\s+/],
|
|
155
|
-
// operators - math
|
|
156
|
-
[/\+|-|\/{1,2}|%|\*{1,2}/, "operators.twig"],
|
|
157
|
-
// operators - logic
|
|
158
|
-
[/(and|or|not|b-and|b-xor|b-or)(\s+)/, ["operators.twig", ""]],
|
|
159
|
-
// operators - comparison (symbols)
|
|
160
|
-
[/==|!=|<|>|>=|<=/, "operators.twig"],
|
|
161
|
-
// operators - comparison (words)
|
|
162
|
-
[/(starts with|ends with|matches)(\s+)/, ["operators.twig", ""]],
|
|
163
|
-
// operators - containment
|
|
164
|
-
[/(in)(\s+)/, ["operators.twig", ""]],
|
|
165
|
-
// operators - test
|
|
166
|
-
[/(is)(\s+)/, ["operators.twig", ""]],
|
|
167
|
-
// operators - misc
|
|
168
|
-
[/\||~|:|\.{1,2}|\?{1,2}/, "operators.twig"],
|
|
169
|
-
// names
|
|
170
|
-
[
|
|
171
|
-
/[^\W\d][\w]*/,
|
|
172
|
-
{
|
|
173
|
-
cases: {
|
|
174
|
-
"@keywords": "keyword.twig",
|
|
175
|
-
"@default": "variable.twig"
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
],
|
|
179
|
-
// numbers
|
|
180
|
-
[/\d+(\.\d+)?/, "number.twig"],
|
|
181
|
-
// punctuation
|
|
182
|
-
[/\(|\)|\[|\]|{|}|,/, "delimiter.twig"],
|
|
183
|
-
// strings
|
|
184
|
-
[/"([^#"\\]*(?:\\.[^#"\\]*)*)"|\'([^\'\\]*(?:\\.[^\'\\]*)*)\'/, "string.twig"],
|
|
185
|
-
// opening double quoted string
|
|
186
|
-
[/"/, "string.twig", "@stringState"],
|
|
187
|
-
// misc syntactic constructs
|
|
188
|
-
// These are not operators per se, but for the purposes of lexical analysis we
|
|
189
|
-
// can treat them as such.
|
|
190
|
-
// arrow functions
|
|
191
|
-
[/=>/, "operators.twig"],
|
|
192
|
-
// assignment
|
|
193
|
-
[/=/, "operators.twig"]
|
|
194
|
-
],
|
|
195
|
-
/**
|
|
196
|
-
* HTML
|
|
197
|
-
*/
|
|
198
|
-
doctype: [
|
|
199
|
-
[/[^>]+/, "metatag.content.html"],
|
|
200
|
-
[/>/, "metatag.html", "@pop"]
|
|
201
|
-
],
|
|
202
|
-
comment: [
|
|
203
|
-
[/-->/, "comment.html", "@pop"],
|
|
204
|
-
[/[^-]+/, "comment.content.html"],
|
|
205
|
-
[/./, "comment.content.html"]
|
|
206
|
-
],
|
|
207
|
-
otherTag: [
|
|
208
|
-
[/\/?>/, "delimiter.html", "@pop"],
|
|
209
|
-
[/"([^"]*)"/, "attribute.value.html"],
|
|
210
|
-
[/'([^']*)'/, "attribute.value.html"],
|
|
211
|
-
[/[\w\-]+/, "attribute.name.html"],
|
|
212
|
-
[/=/, "delimiter.html"],
|
|
213
|
-
[/[ \t\r\n]+/]
|
|
214
|
-
// whitespace
|
|
215
|
-
],
|
|
216
|
-
// -- BEGIN <script> tags handling
|
|
217
|
-
// After <script
|
|
218
|
-
script: [
|
|
219
|
-
[/type/, "attribute.name.html", "@scriptAfterType"],
|
|
220
|
-
[/"([^"]*)"/, "attribute.value.html"],
|
|
221
|
-
[/'([^']*)'/, "attribute.value.html"],
|
|
222
|
-
[/[\w\-]+/, "attribute.name.html"],
|
|
223
|
-
[/=/, "delimiter.html"],
|
|
224
|
-
[
|
|
225
|
-
/>/,
|
|
226
|
-
{
|
|
227
|
-
token: "delimiter.html",
|
|
228
|
-
next: "@scriptEmbedded",
|
|
229
|
-
nextEmbedded: "text/javascript"
|
|
230
|
-
}
|
|
231
|
-
],
|
|
232
|
-
[/[ \t\r\n]+/],
|
|
233
|
-
// whitespace
|
|
234
|
-
[
|
|
235
|
-
/(<\/)(script\s*)(>)/,
|
|
236
|
-
["delimiter.html", "tag.html", { token: "delimiter.html", next: "@pop" }]
|
|
237
|
-
]
|
|
238
|
-
],
|
|
239
|
-
// After <script ... type
|
|
240
|
-
scriptAfterType: [
|
|
241
|
-
[/=/, "delimiter.html", "@scriptAfterTypeEquals"],
|
|
242
|
-
[
|
|
243
|
-
/>/,
|
|
244
|
-
{
|
|
245
|
-
token: "delimiter.html",
|
|
246
|
-
next: "@scriptEmbedded",
|
|
247
|
-
nextEmbedded: "text/javascript"
|
|
248
|
-
}
|
|
249
|
-
],
|
|
250
|
-
// cover invalid e.g. <script type>
|
|
251
|
-
[/[ \t\r\n]+/],
|
|
252
|
-
// whitespace
|
|
253
|
-
[/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
|
|
254
|
-
],
|
|
255
|
-
// After <script ... type =
|
|
256
|
-
scriptAfterTypeEquals: [
|
|
257
|
-
[
|
|
258
|
-
/"([^"]*)"/,
|
|
259
|
-
{
|
|
260
|
-
token: "attribute.value.html",
|
|
261
|
-
switchTo: "@scriptWithCustomType.$1"
|
|
262
|
-
}
|
|
263
|
-
],
|
|
264
|
-
[
|
|
265
|
-
/'([^']*)'/,
|
|
266
|
-
{
|
|
267
|
-
token: "attribute.value.html",
|
|
268
|
-
switchTo: "@scriptWithCustomType.$1"
|
|
269
|
-
}
|
|
270
|
-
],
|
|
271
|
-
[
|
|
272
|
-
/>/,
|
|
273
|
-
{
|
|
274
|
-
token: "delimiter.html",
|
|
275
|
-
next: "@scriptEmbedded",
|
|
276
|
-
nextEmbedded: "text/javascript"
|
|
277
|
-
}
|
|
278
|
-
],
|
|
279
|
-
// cover invalid e.g. <script type=>
|
|
280
|
-
[/[ \t\r\n]+/],
|
|
281
|
-
// whitespace
|
|
282
|
-
[/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
|
|
283
|
-
],
|
|
284
|
-
// After <script ... type = $S2
|
|
285
|
-
scriptWithCustomType: [
|
|
286
|
-
[
|
|
287
|
-
/>/,
|
|
288
|
-
{
|
|
289
|
-
token: "delimiter.html",
|
|
290
|
-
next: "@scriptEmbedded.$S2",
|
|
291
|
-
nextEmbedded: "$S2"
|
|
292
|
-
}
|
|
293
|
-
],
|
|
294
|
-
[/"([^"]*)"/, "attribute.value.html"],
|
|
295
|
-
[/'([^']*)'/, "attribute.value.html"],
|
|
296
|
-
[/[\w\-]+/, "attribute.name.html"],
|
|
297
|
-
[/=/, "delimiter.html"],
|
|
298
|
-
[/[ \t\r\n]+/],
|
|
299
|
-
// whitespace
|
|
300
|
-
[/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
|
|
301
|
-
],
|
|
302
|
-
scriptEmbedded: [
|
|
303
|
-
[/<\/script/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }],
|
|
304
|
-
[/[^<]+/, ""]
|
|
305
|
-
],
|
|
306
|
-
// -- END <script> tags handling
|
|
307
|
-
// -- BEGIN <style> tags handling
|
|
308
|
-
// After <style
|
|
309
|
-
style: [
|
|
310
|
-
[/type/, "attribute.name.html", "@styleAfterType"],
|
|
311
|
-
[/"([^"]*)"/, "attribute.value.html"],
|
|
312
|
-
[/'([^']*)'/, "attribute.value.html"],
|
|
313
|
-
[/[\w\-]+/, "attribute.name.html"],
|
|
314
|
-
[/=/, "delimiter.html"],
|
|
315
|
-
[
|
|
316
|
-
/>/,
|
|
317
|
-
{
|
|
318
|
-
token: "delimiter.html",
|
|
319
|
-
next: "@styleEmbedded",
|
|
320
|
-
nextEmbedded: "text/css"
|
|
321
|
-
}
|
|
322
|
-
],
|
|
323
|
-
[/[ \t\r\n]+/],
|
|
324
|
-
// whitespace
|
|
325
|
-
[
|
|
326
|
-
/(<\/)(style\s*)(>)/,
|
|
327
|
-
["delimiter.html", "tag.html", { token: "delimiter.html", next: "@pop" }]
|
|
328
|
-
]
|
|
329
|
-
],
|
|
330
|
-
// After <style ... type
|
|
331
|
-
styleAfterType: [
|
|
332
|
-
[/=/, "delimiter.html", "@styleAfterTypeEquals"],
|
|
333
|
-
[
|
|
334
|
-
/>/,
|
|
335
|
-
{
|
|
336
|
-
token: "delimiter.html",
|
|
337
|
-
next: "@styleEmbedded",
|
|
338
|
-
nextEmbedded: "text/css"
|
|
339
|
-
}
|
|
340
|
-
],
|
|
341
|
-
// cover invalid e.g. <style type>
|
|
342
|
-
[/[ \t\r\n]+/],
|
|
343
|
-
// whitespace
|
|
344
|
-
[/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
|
|
345
|
-
],
|
|
346
|
-
// After <style ... type =
|
|
347
|
-
styleAfterTypeEquals: [
|
|
348
|
-
[
|
|
349
|
-
/"([^"]*)"/,
|
|
350
|
-
{
|
|
351
|
-
token: "attribute.value.html",
|
|
352
|
-
switchTo: "@styleWithCustomType.$1"
|
|
353
|
-
}
|
|
354
|
-
],
|
|
355
|
-
[
|
|
356
|
-
/'([^']*)'/,
|
|
357
|
-
{
|
|
358
|
-
token: "attribute.value.html",
|
|
359
|
-
switchTo: "@styleWithCustomType.$1"
|
|
360
|
-
}
|
|
361
|
-
],
|
|
362
|
-
[
|
|
363
|
-
/>/,
|
|
364
|
-
{
|
|
365
|
-
token: "delimiter.html",
|
|
366
|
-
next: "@styleEmbedded",
|
|
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: "delimiter.html",
|
|
381
|
-
next: "@styleEmbedded.$S2",
|
|
382
|
-
nextEmbedded: "$S2"
|
|
383
|
-
}
|
|
384
|
-
],
|
|
385
|
-
[/"([^"]*)"/, "attribute.value.html"],
|
|
386
|
-
[/'([^']*)'/, "attribute.value.html"],
|
|
387
|
-
[/[\w\-]+/, "attribute.name.html"],
|
|
388
|
-
[/=/, "delimiter.html"],
|
|
389
|
-
[/[ \t\r\n]+/],
|
|
390
|
-
// whitespace
|
|
391
|
-
[/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
|
|
392
|
-
],
|
|
393
|
-
styleEmbedded: [
|
|
394
|
-
[/<\/style/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }],
|
|
395
|
-
[/[^<]+/, ""]
|
|
396
|
-
]
|
|
397
|
-
}
|
|
398
|
-
};
|
|
399
|
-
|
|
400
|
-
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: "typescript",
|
|
12
|
-
extensions: [".ts", ".tsx", ".cts", ".mts"],
|
|
13
|
-
aliases: ["TypeScript", "ts", "typescript"],
|
|
14
|
-
mimetypes: ["text/typescript"],
|
|
15
|
-
loader: () => {
|
|
16
|
-
{
|
|
17
|
-
return import('./typescript.js');
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
});
|