@codingame/monaco-vscode-standalone-languages 23.2.0 → 23.2.2
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/_.contribution.js +48 -0
- package/abap/abap.contribution.js +8 -0
- package/abap/abap.js +1397 -0
- package/apex/apex.contribution.js +9 -0
- package/apex/apex.js +329 -0
- package/azcli/azcli.contribution.js +8 -0
- package/azcli/azcli.js +67 -0
- package/bat/bat.contribution.js +8 -0
- package/bat/bat.js +99 -0
- package/bicep/bicep.contribution.js +8 -0
- package/bicep/bicep.js +108 -0
- package/cameligo/cameligo.contribution.js +8 -0
- package/cameligo/cameligo.js +173 -0
- package/clojure/clojure.contribution.js +8 -0
- package/clojure/clojure.js +760 -0
- package/coffee/coffee.contribution.js +9 -0
- package/coffee/coffee.js +231 -0
- package/cpp/cpp.contribution.js +14 -0
- package/cpp/cpp.js +388 -0
- package/csharp/csharp.contribution.js +8 -0
- package/csharp/csharp.js +325 -0
- package/csp/csp.contribution.js +8 -0
- package/csp/csp.js +52 -0
- package/css/css.contribution.js +9 -0
- package/css/css.js +184 -0
- package/cypher/cypher.contribution.js +8 -0
- package/cypher/cypher.js +262 -0
- package/dart/dart.contribution.js +9 -0
- package/dart/dart.js +280 -0
- package/dockerfile/dockerfile.contribution.js +9 -0
- package/dockerfile/dockerfile.js +129 -0
- package/ecl/ecl.contribution.js +8 -0
- package/ecl/ecl.js +455 -0
- package/elixir/elixir.contribution.js +8 -0
- package/elixir/elixir.js +568 -0
- package/flow9/flow9.contribution.js +8 -0
- package/flow9/flow9.js +141 -0
- package/freemarker2/freemarker2.contribution.js +52 -0
- package/freemarker2/freemarker2.js +990 -0
- package/fsharp/fsharp.contribution.js +8 -0
- package/fsharp/fsharp.js +216 -0
- package/go/go.contribution.js +8 -0
- package/go/go.js +217 -0
- package/graphql/graphql.contribution.js +9 -0
- package/graphql/graphql.js +150 -0
- package/handlebars/handlebars.contribution.js +9 -0
- package/handlebars/handlebars.js +413 -0
- package/hcl/hcl.contribution.js +8 -0
- package/hcl/hcl.js +182 -0
- package/html/html.contribution.js +9 -0
- package/html/html.js +302 -0
- package/index.js +81 -48
- package/ini/ini.contribution.js +9 -0
- package/ini/ini.js +70 -0
- package/java/java.contribution.js +9 -0
- package/java/java.js +231 -0
- package/javascript/javascript.contribution.js +11 -0
- package/javascript/javascript.js +70 -0
- package/julia/julia.contribution.js +8 -0
- package/julia/julia.js +510 -0
- package/kotlin/kotlin.contribution.js +9 -0
- package/kotlin/kotlin.js +251 -0
- package/less/less.contribution.js +9 -0
- package/less/less.js +160 -0
- package/lexon/lexon.contribution.js +8 -0
- package/lexon/lexon.js +156 -0
- package/liquid/liquid.contribution.js +9 -0
- package/liquid/liquid.js +234 -0
- package/lua/lua.contribution.js +8 -0
- package/lua/lua.js +161 -0
- package/m3/m3.contribution.js +8 -0
- package/m3/m3.js +209 -0
- package/markdown/markdown.contribution.js +8 -0
- package/markdown/markdown.js +228 -0
- package/mdx/mdx.contribution.js +8 -0
- package/mdx/mdx.js +158 -0
- package/mips/mips.contribution.js +9 -0
- package/mips/mips.js +197 -0
- package/msdax/msdax.contribution.js +8 -0
- package/msdax/msdax.js +374 -0
- package/mysql/mysql.contribution.js +8 -0
- package/mysql/mysql.js +877 -0
- package/objective-c/objective-c.contribution.js +8 -0
- package/objective-c/objective-c.js +182 -0
- package/package.json +2 -2
- package/pascal/pascal.contribution.js +9 -0
- package/pascal/pascal.js +250 -0
- package/pascaligo/pascaligo.contribution.js +8 -0
- package/pascaligo/pascaligo.js +163 -0
- package/perl/perl.contribution.js +8 -0
- package/perl/perl.js +625 -0
- package/pgsql/pgsql.contribution.js +8 -0
- package/pgsql/pgsql.js +850 -0
- package/php/php.contribution.js +9 -0
- package/php/php.js +499 -0
- package/pla/pla.contribution.js +7 -0
- package/pla/pla.js +136 -0
- package/postiats/postiats.contribution.js +8 -0
- package/postiats/postiats.js +906 -0
- package/powerquery/powerquery.contribution.js +8 -0
- package/powerquery/powerquery.js +889 -0
- package/powershell/powershell.contribution.js +8 -0
- package/powershell/powershell.js +238 -0
- package/protobuf/protobuf.contribution.js +8 -0
- package/protobuf/protobuf.js +419 -0
- package/pug/pug.contribution.js +8 -0
- package/pug/pug.js +401 -0
- package/python/python.contribution.js +9 -0
- package/python/python.js +294 -0
- package/qsharp/qsharp.contribution.js +8 -0
- package/qsharp/qsharp.js +300 -0
- package/r/r.contribution.js +8 -0
- package/r/r.js +242 -0
- package/razor/razor.contribution.js +9 -0
- package/razor/razor.js +544 -0
- package/redis/redis.contribution.js +8 -0
- package/redis/redis.js +301 -0
- package/redshift/redshift.contribution.js +8 -0
- package/redshift/redshift.js +808 -0
- package/restructuredtext/restructuredtext.contribution.js +8 -0
- package/restructuredtext/restructuredtext.js +173 -0
- package/ruby/ruby.contribution.js +9 -0
- package/ruby/ruby.js +510 -0
- package/rust/rust.contribution.js +8 -0
- package/rust/rust.js +342 -0
- package/sb/sb.contribution.js +8 -0
- package/sb/sb.js +114 -0
- package/scala/scala.contribution.js +9 -0
- package/scala/scala.js +369 -0
- package/scheme/scheme.contribution.js +8 -0
- package/scheme/scheme.js +107 -0
- package/scss/scss.contribution.js +9 -0
- package/scss/scss.js +259 -0
- package/shell/shell.contribution.js +8 -0
- package/shell/shell.js +220 -0
- package/solidity/solidity.contribution.js +8 -0
- package/solidity/solidity.js +1366 -0
- package/sophia/sophia.contribution.js +8 -0
- package/sophia/sophia.js +198 -0
- package/sparql/sparql.contribution.js +8 -0
- package/sparql/sparql.js +200 -0
- package/sql/sql.contribution.js +8 -0
- package/sql/sql.js +852 -0
- package/st/st.contribution.js +8 -0
- package/st/st.js +415 -0
- package/swift/swift.contribution.js +9 -0
- package/swift/swift.js +311 -0
- package/systemverilog/systemverilog.contribution.js +14 -0
- package/systemverilog/systemverilog.js +575 -0
- package/tcl/tcl.contribution.js +8 -0
- package/tcl/tcl.js +231 -0
- package/twig/twig.contribution.js +9 -0
- package/twig/twig.js +391 -0
- package/typescript/typescript.contribution.js +11 -0
- package/typescript/typescript.js +336 -0
- package/typespec/typespec.contribution.js +8 -0
- package/typespec/typespec.js +126 -0
- package/vb/vb.contribution.js +8 -0
- package/vb/vb.js +371 -0
- package/wgsl/wgsl.contribution.js +8 -0
- package/wgsl/wgsl.js +452 -0
- package/xml/xml.contribution.js +28 -0
- package/xml/xml.js +88 -0
- package/yaml/yaml.contribution.js +9 -0
- package/yaml/yaml.js +199 -0
package/html/html.js
ADDED
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import { languages } from 'monaco-editor';
|
|
2
|
+
|
|
3
|
+
const EMPTY_ELEMENTS = [
|
|
4
|
+
"area",
|
|
5
|
+
"base",
|
|
6
|
+
"br",
|
|
7
|
+
"col",
|
|
8
|
+
"embed",
|
|
9
|
+
"hr",
|
|
10
|
+
"img",
|
|
11
|
+
"input",
|
|
12
|
+
"keygen",
|
|
13
|
+
"link",
|
|
14
|
+
"menuitem",
|
|
15
|
+
"meta",
|
|
16
|
+
"param",
|
|
17
|
+
"source",
|
|
18
|
+
"track",
|
|
19
|
+
"wbr"
|
|
20
|
+
];
|
|
21
|
+
const conf = {
|
|
22
|
+
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,
|
|
23
|
+
comments: {
|
|
24
|
+
blockComment: ["<!--", "-->"]
|
|
25
|
+
},
|
|
26
|
+
brackets: [
|
|
27
|
+
["<!--", "-->"],
|
|
28
|
+
["<", ">"],
|
|
29
|
+
["{", "}"],
|
|
30
|
+
["(", ")"]
|
|
31
|
+
],
|
|
32
|
+
autoClosingPairs: [
|
|
33
|
+
{ open: "{", close: "}" },
|
|
34
|
+
{ open: "[", close: "]" },
|
|
35
|
+
{ open: "(", close: ")" },
|
|
36
|
+
{ open: '"', close: '"' },
|
|
37
|
+
{ open: "'", close: "'" }
|
|
38
|
+
],
|
|
39
|
+
surroundingPairs: [
|
|
40
|
+
{ open: '"', close: '"' },
|
|
41
|
+
{ open: "'", close: "'" },
|
|
42
|
+
{ open: "{", close: "}" },
|
|
43
|
+
{ open: "[", close: "]" },
|
|
44
|
+
{ open: "(", close: ")" },
|
|
45
|
+
{ open: "<", close: ">" }
|
|
46
|
+
],
|
|
47
|
+
onEnterRules: [
|
|
48
|
+
{
|
|
49
|
+
beforeText: new RegExp(
|
|
50
|
+
`<(?!(?:${EMPTY_ELEMENTS.join("|")}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,
|
|
51
|
+
"i"
|
|
52
|
+
),
|
|
53
|
+
afterText: /^<\/([_:\w][_:\w-.\d]*)\s*>$/i,
|
|
54
|
+
action: {
|
|
55
|
+
indentAction: languages.IndentAction.IndentOutdent
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
beforeText: new RegExp(
|
|
60
|
+
`<(?!(?:${EMPTY_ELEMENTS.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,
|
|
61
|
+
"i"
|
|
62
|
+
),
|
|
63
|
+
action: { indentAction: languages.IndentAction.Indent }
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
folding: {
|
|
67
|
+
markers: {
|
|
68
|
+
start: new RegExp("^\\s*<!--\\s*#region\\b.*-->"),
|
|
69
|
+
end: new RegExp("^\\s*<!--\\s*#endregion\\b.*-->")
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
const language = {
|
|
74
|
+
defaultToken: "",
|
|
75
|
+
tokenPostfix: ".html",
|
|
76
|
+
ignoreCase: true,
|
|
77
|
+
// The main tokenizer for our languages
|
|
78
|
+
tokenizer: {
|
|
79
|
+
root: [
|
|
80
|
+
[/<!DOCTYPE/, "metatag", "@doctype"],
|
|
81
|
+
[/<!--/, "comment", "@comment"],
|
|
82
|
+
[/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/, ["delimiter", "tag", "", "delimiter"]],
|
|
83
|
+
[/(<)(script)/, ["delimiter", { token: "tag", next: "@script" }]],
|
|
84
|
+
[/(<)(style)/, ["delimiter", { token: "tag", next: "@style" }]],
|
|
85
|
+
[/(<)((?:[\w\-]+:)?[\w\-]+)/, ["delimiter", { token: "tag", next: "@otherTag" }]],
|
|
86
|
+
[/(<\/)((?:[\w\-]+:)?[\w\-]+)/, ["delimiter", { token: "tag", next: "@otherTag" }]],
|
|
87
|
+
[/</, "delimiter"],
|
|
88
|
+
[/[^<]+/]
|
|
89
|
+
// text
|
|
90
|
+
],
|
|
91
|
+
doctype: [
|
|
92
|
+
[/[^>]+/, "metatag.content"],
|
|
93
|
+
[/>/, "metatag", "@pop"]
|
|
94
|
+
],
|
|
95
|
+
comment: [
|
|
96
|
+
[/-->/, "comment", "@pop"],
|
|
97
|
+
[/[^-]+/, "comment.content"],
|
|
98
|
+
[/./, "comment.content"]
|
|
99
|
+
],
|
|
100
|
+
otherTag: [
|
|
101
|
+
[/\/?>/, "delimiter", "@pop"],
|
|
102
|
+
[/"([^"]*)"/, "attribute.value"],
|
|
103
|
+
[/'([^']*)'/, "attribute.value"],
|
|
104
|
+
[/[\w\-]+/, "attribute.name"],
|
|
105
|
+
[/=/, "delimiter"],
|
|
106
|
+
[/[ \t\r\n]+/]
|
|
107
|
+
// whitespace
|
|
108
|
+
],
|
|
109
|
+
// -- BEGIN <script> tags handling
|
|
110
|
+
// After <script
|
|
111
|
+
script: [
|
|
112
|
+
[/type/, "attribute.name", "@scriptAfterType"],
|
|
113
|
+
[/"([^"]*)"/, "attribute.value"],
|
|
114
|
+
[/'([^']*)'/, "attribute.value"],
|
|
115
|
+
[/[\w\-]+/, "attribute.name"],
|
|
116
|
+
[/=/, "delimiter"],
|
|
117
|
+
[
|
|
118
|
+
/>/,
|
|
119
|
+
{
|
|
120
|
+
token: "delimiter",
|
|
121
|
+
next: "@scriptEmbedded",
|
|
122
|
+
nextEmbedded: "text/javascript"
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
[/[ \t\r\n]+/],
|
|
126
|
+
// whitespace
|
|
127
|
+
[/(<\/)(script\s*)(>)/, ["delimiter", "tag", { token: "delimiter", next: "@pop" }]]
|
|
128
|
+
],
|
|
129
|
+
// After <script ... type
|
|
130
|
+
scriptAfterType: [
|
|
131
|
+
[/=/, "delimiter", "@scriptAfterTypeEquals"],
|
|
132
|
+
[
|
|
133
|
+
/>/,
|
|
134
|
+
{
|
|
135
|
+
token: "delimiter",
|
|
136
|
+
next: "@scriptEmbedded",
|
|
137
|
+
nextEmbedded: "text/javascript"
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
// cover invalid e.g. <script type>
|
|
141
|
+
[/[ \t\r\n]+/],
|
|
142
|
+
// whitespace
|
|
143
|
+
[/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
|
|
144
|
+
],
|
|
145
|
+
// After <script ... type =
|
|
146
|
+
scriptAfterTypeEquals: [
|
|
147
|
+
[
|
|
148
|
+
/"module"/,
|
|
149
|
+
{
|
|
150
|
+
token: "attribute.value",
|
|
151
|
+
switchTo: "@scriptWithCustomType.text/javascript"
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
[
|
|
155
|
+
/'module'/,
|
|
156
|
+
{
|
|
157
|
+
token: "attribute.value",
|
|
158
|
+
switchTo: "@scriptWithCustomType.text/javascript"
|
|
159
|
+
}
|
|
160
|
+
],
|
|
161
|
+
[
|
|
162
|
+
/"([^"]*)"/,
|
|
163
|
+
{
|
|
164
|
+
token: "attribute.value",
|
|
165
|
+
switchTo: "@scriptWithCustomType.$1"
|
|
166
|
+
}
|
|
167
|
+
],
|
|
168
|
+
[
|
|
169
|
+
/'([^']*)'/,
|
|
170
|
+
{
|
|
171
|
+
token: "attribute.value",
|
|
172
|
+
switchTo: "@scriptWithCustomType.$1"
|
|
173
|
+
}
|
|
174
|
+
],
|
|
175
|
+
[
|
|
176
|
+
/>/,
|
|
177
|
+
{
|
|
178
|
+
token: "delimiter",
|
|
179
|
+
next: "@scriptEmbedded",
|
|
180
|
+
nextEmbedded: "text/javascript"
|
|
181
|
+
}
|
|
182
|
+
],
|
|
183
|
+
// cover invalid e.g. <script type=>
|
|
184
|
+
[/[ \t\r\n]+/],
|
|
185
|
+
// whitespace
|
|
186
|
+
[/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
|
|
187
|
+
],
|
|
188
|
+
// After <script ... type = $S2
|
|
189
|
+
scriptWithCustomType: [
|
|
190
|
+
[
|
|
191
|
+
/>/,
|
|
192
|
+
{
|
|
193
|
+
token: "delimiter",
|
|
194
|
+
next: "@scriptEmbedded.$S2",
|
|
195
|
+
nextEmbedded: "$S2"
|
|
196
|
+
}
|
|
197
|
+
],
|
|
198
|
+
[/"([^"]*)"/, "attribute.value"],
|
|
199
|
+
[/'([^']*)'/, "attribute.value"],
|
|
200
|
+
[/[\w\-]+/, "attribute.name"],
|
|
201
|
+
[/=/, "delimiter"],
|
|
202
|
+
[/[ \t\r\n]+/],
|
|
203
|
+
// whitespace
|
|
204
|
+
[/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
|
|
205
|
+
],
|
|
206
|
+
scriptEmbedded: [
|
|
207
|
+
[/<\/script/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }],
|
|
208
|
+
[/[^<]+/, ""]
|
|
209
|
+
],
|
|
210
|
+
// -- END <script> tags handling
|
|
211
|
+
// -- BEGIN <style> tags handling
|
|
212
|
+
// After <style
|
|
213
|
+
style: [
|
|
214
|
+
[/type/, "attribute.name", "@styleAfterType"],
|
|
215
|
+
[/"([^"]*)"/, "attribute.value"],
|
|
216
|
+
[/'([^']*)'/, "attribute.value"],
|
|
217
|
+
[/[\w\-]+/, "attribute.name"],
|
|
218
|
+
[/=/, "delimiter"],
|
|
219
|
+
[
|
|
220
|
+
/>/,
|
|
221
|
+
{
|
|
222
|
+
token: "delimiter",
|
|
223
|
+
next: "@styleEmbedded",
|
|
224
|
+
nextEmbedded: "text/css"
|
|
225
|
+
}
|
|
226
|
+
],
|
|
227
|
+
[/[ \t\r\n]+/],
|
|
228
|
+
// whitespace
|
|
229
|
+
[/(<\/)(style\s*)(>)/, ["delimiter", "tag", { token: "delimiter", next: "@pop" }]]
|
|
230
|
+
],
|
|
231
|
+
// After <style ... type
|
|
232
|
+
styleAfterType: [
|
|
233
|
+
[/=/, "delimiter", "@styleAfterTypeEquals"],
|
|
234
|
+
[
|
|
235
|
+
/>/,
|
|
236
|
+
{
|
|
237
|
+
token: "delimiter",
|
|
238
|
+
next: "@styleEmbedded",
|
|
239
|
+
nextEmbedded: "text/css"
|
|
240
|
+
}
|
|
241
|
+
],
|
|
242
|
+
// cover invalid e.g. <style type>
|
|
243
|
+
[/[ \t\r\n]+/],
|
|
244
|
+
// whitespace
|
|
245
|
+
[/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
|
|
246
|
+
],
|
|
247
|
+
// After <style ... type =
|
|
248
|
+
styleAfterTypeEquals: [
|
|
249
|
+
[
|
|
250
|
+
/"([^"]*)"/,
|
|
251
|
+
{
|
|
252
|
+
token: "attribute.value",
|
|
253
|
+
switchTo: "@styleWithCustomType.$1"
|
|
254
|
+
}
|
|
255
|
+
],
|
|
256
|
+
[
|
|
257
|
+
/'([^']*)'/,
|
|
258
|
+
{
|
|
259
|
+
token: "attribute.value",
|
|
260
|
+
switchTo: "@styleWithCustomType.$1"
|
|
261
|
+
}
|
|
262
|
+
],
|
|
263
|
+
[
|
|
264
|
+
/>/,
|
|
265
|
+
{
|
|
266
|
+
token: "delimiter",
|
|
267
|
+
next: "@styleEmbedded",
|
|
268
|
+
nextEmbedded: "text/css"
|
|
269
|
+
}
|
|
270
|
+
],
|
|
271
|
+
// cover invalid e.g. <style type=>
|
|
272
|
+
[/[ \t\r\n]+/],
|
|
273
|
+
// whitespace
|
|
274
|
+
[/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
|
|
275
|
+
],
|
|
276
|
+
// After <style ... type = $S2
|
|
277
|
+
styleWithCustomType: [
|
|
278
|
+
[
|
|
279
|
+
/>/,
|
|
280
|
+
{
|
|
281
|
+
token: "delimiter",
|
|
282
|
+
next: "@styleEmbedded.$S2",
|
|
283
|
+
nextEmbedded: "$S2"
|
|
284
|
+
}
|
|
285
|
+
],
|
|
286
|
+
[/"([^"]*)"/, "attribute.value"],
|
|
287
|
+
[/'([^']*)'/, "attribute.value"],
|
|
288
|
+
[/[\w\-]+/, "attribute.name"],
|
|
289
|
+
[/=/, "delimiter"],
|
|
290
|
+
[/[ \t\r\n]+/],
|
|
291
|
+
// whitespace
|
|
292
|
+
[/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
|
|
293
|
+
],
|
|
294
|
+
styleEmbedded: [
|
|
295
|
+
[/<\/style/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }],
|
|
296
|
+
[/[^<]+/, ""]
|
|
297
|
+
]
|
|
298
|
+
// -- END <style> tags handling
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
export { conf, language };
|
package/index.js
CHANGED
|
@@ -1,48 +1,81 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
1
|
+
import './abap/abap.contribution.js';
|
|
2
|
+
import './apex/apex.contribution.js';
|
|
3
|
+
import './azcli/azcli.contribution.js';
|
|
4
|
+
import './bat/bat.contribution.js';
|
|
5
|
+
import './bicep/bicep.contribution.js';
|
|
6
|
+
import './cameligo/cameligo.contribution.js';
|
|
7
|
+
import './clojure/clojure.contribution.js';
|
|
8
|
+
import './coffee/coffee.contribution.js';
|
|
9
|
+
import './cpp/cpp.contribution.js';
|
|
10
|
+
import './csharp/csharp.contribution.js';
|
|
11
|
+
import './csp/csp.contribution.js';
|
|
12
|
+
import './css/css.contribution.js';
|
|
13
|
+
import './cypher/cypher.contribution.js';
|
|
14
|
+
import './dart/dart.contribution.js';
|
|
15
|
+
import './dockerfile/dockerfile.contribution.js';
|
|
16
|
+
import './ecl/ecl.contribution.js';
|
|
17
|
+
import './elixir/elixir.contribution.js';
|
|
18
|
+
import './flow9/flow9.contribution.js';
|
|
19
|
+
import './fsharp/fsharp.contribution.js';
|
|
20
|
+
import './freemarker2/freemarker2.contribution.js';
|
|
21
|
+
import './go/go.contribution.js';
|
|
22
|
+
import './graphql/graphql.contribution.js';
|
|
23
|
+
import './handlebars/handlebars.contribution.js';
|
|
24
|
+
import './hcl/hcl.contribution.js';
|
|
25
|
+
import './html/html.contribution.js';
|
|
26
|
+
import './ini/ini.contribution.js';
|
|
27
|
+
import './java/java.contribution.js';
|
|
28
|
+
import './javascript/javascript.contribution.js';
|
|
29
|
+
import './julia/julia.contribution.js';
|
|
30
|
+
import './kotlin/kotlin.contribution.js';
|
|
31
|
+
import './less/less.contribution.js';
|
|
32
|
+
import './lexon/lexon.contribution.js';
|
|
33
|
+
import './lua/lua.contribution.js';
|
|
34
|
+
import './liquid/liquid.contribution.js';
|
|
35
|
+
import './m3/m3.contribution.js';
|
|
36
|
+
import './markdown/markdown.contribution.js';
|
|
37
|
+
import './mdx/mdx.contribution.js';
|
|
38
|
+
import './mips/mips.contribution.js';
|
|
39
|
+
import './msdax/msdax.contribution.js';
|
|
40
|
+
import './mysql/mysql.contribution.js';
|
|
41
|
+
import './objective-c/objective-c.contribution.js';
|
|
42
|
+
import './pascal/pascal.contribution.js';
|
|
43
|
+
import './pascaligo/pascaligo.contribution.js';
|
|
44
|
+
import './perl/perl.contribution.js';
|
|
45
|
+
import './pgsql/pgsql.contribution.js';
|
|
46
|
+
import './php/php.contribution.js';
|
|
47
|
+
import './pla/pla.contribution.js';
|
|
48
|
+
import './postiats/postiats.contribution.js';
|
|
49
|
+
import './powerquery/powerquery.contribution.js';
|
|
50
|
+
import './powershell/powershell.contribution.js';
|
|
51
|
+
import './protobuf/protobuf.contribution.js';
|
|
52
|
+
import './pug/pug.contribution.js';
|
|
53
|
+
import './python/python.contribution.js';
|
|
54
|
+
import './qsharp/qsharp.contribution.js';
|
|
55
|
+
import './r/r.contribution.js';
|
|
56
|
+
import './razor/razor.contribution.js';
|
|
57
|
+
import './redis/redis.contribution.js';
|
|
58
|
+
import './redshift/redshift.contribution.js';
|
|
59
|
+
import './restructuredtext/restructuredtext.contribution.js';
|
|
60
|
+
import './ruby/ruby.contribution.js';
|
|
61
|
+
import './rust/rust.contribution.js';
|
|
62
|
+
import './sb/sb.contribution.js';
|
|
63
|
+
import './scala/scala.contribution.js';
|
|
64
|
+
import './scheme/scheme.contribution.js';
|
|
65
|
+
import './scss/scss.contribution.js';
|
|
66
|
+
import './shell/shell.contribution.js';
|
|
67
|
+
import './solidity/solidity.contribution.js';
|
|
68
|
+
import './sophia/sophia.contribution.js';
|
|
69
|
+
import './sparql/sparql.contribution.js';
|
|
70
|
+
import './sql/sql.contribution.js';
|
|
71
|
+
import './st/st.contribution.js';
|
|
72
|
+
import './swift/swift.contribution.js';
|
|
73
|
+
import './systemverilog/systemverilog.contribution.js';
|
|
74
|
+
import './tcl/tcl.contribution.js';
|
|
75
|
+
import './twig/twig.contribution.js';
|
|
76
|
+
import './typescript/typescript.contribution.js';
|
|
77
|
+
import './typespec/typespec.contribution.js';
|
|
78
|
+
import './vb/vb.contribution.js';
|
|
79
|
+
import './wgsl/wgsl.contribution.js';
|
|
80
|
+
import './xml/xml.contribution.js';
|
|
81
|
+
import './yaml/yaml.contribution.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { registerLanguage } from '../_.contribution.js';
|
|
2
|
+
|
|
3
|
+
registerLanguage({
|
|
4
|
+
id: "ini",
|
|
5
|
+
extensions: [".ini", ".properties", ".gitconfig"],
|
|
6
|
+
filenames: ["config", ".gitattributes", ".gitconfig", ".editorconfig"],
|
|
7
|
+
aliases: ["Ini", "ini"],
|
|
8
|
+
loader: () => import('./ini.js')
|
|
9
|
+
});
|
package/ini/ini.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
const conf = {
|
|
2
|
+
comments: {
|
|
3
|
+
lineComment: "#"
|
|
4
|
+
},
|
|
5
|
+
brackets: [
|
|
6
|
+
["{", "}"],
|
|
7
|
+
["[", "]"],
|
|
8
|
+
["(", ")"]
|
|
9
|
+
],
|
|
10
|
+
autoClosingPairs: [
|
|
11
|
+
{ open: "{", close: "}" },
|
|
12
|
+
{ open: "[", close: "]" },
|
|
13
|
+
{ open: "(", close: ")" },
|
|
14
|
+
{ open: '"', close: '"' },
|
|
15
|
+
{ open: "'", close: "'" }
|
|
16
|
+
],
|
|
17
|
+
surroundingPairs: [
|
|
18
|
+
{ open: "{", close: "}" },
|
|
19
|
+
{ open: "[", close: "]" },
|
|
20
|
+
{ open: "(", close: ")" },
|
|
21
|
+
{ open: '"', close: '"' },
|
|
22
|
+
{ open: "'", close: "'" }
|
|
23
|
+
]
|
|
24
|
+
};
|
|
25
|
+
const language = {
|
|
26
|
+
defaultToken: "",
|
|
27
|
+
tokenPostfix: ".ini",
|
|
28
|
+
// we include these common regular expressions
|
|
29
|
+
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
|
30
|
+
// The main tokenizer for our languages
|
|
31
|
+
tokenizer: {
|
|
32
|
+
root: [
|
|
33
|
+
// sections
|
|
34
|
+
[/^\[[^\]]*\]/, "metatag"],
|
|
35
|
+
// keys
|
|
36
|
+
[/(^\w+)(\s*)(\=)/, ["key", "", "delimiter"]],
|
|
37
|
+
// whitespace
|
|
38
|
+
{ include: "@whitespace" },
|
|
39
|
+
// numbers
|
|
40
|
+
[/\d+/, "number"],
|
|
41
|
+
// strings: recover on non-terminated strings
|
|
42
|
+
[/"([^"\\]|\\.)*$/, "string.invalid"],
|
|
43
|
+
// non-teminated string
|
|
44
|
+
[/'([^'\\]|\\.)*$/, "string.invalid"],
|
|
45
|
+
// non-teminated string
|
|
46
|
+
[/"/, "string", '@string."'],
|
|
47
|
+
[/'/, "string", "@string.'"]
|
|
48
|
+
],
|
|
49
|
+
whitespace: [
|
|
50
|
+
[/[ \t\r\n]+/, ""],
|
|
51
|
+
[/^\s*[#;].*$/, "comment"]
|
|
52
|
+
],
|
|
53
|
+
string: [
|
|
54
|
+
[/[^\\"']+/, "string"],
|
|
55
|
+
[/@escapes/, "string.escape"],
|
|
56
|
+
[/\\./, "string.escape.invalid"],
|
|
57
|
+
[
|
|
58
|
+
/["']/,
|
|
59
|
+
{
|
|
60
|
+
cases: {
|
|
61
|
+
"$#==$S2": { token: "string", next: "@pop" },
|
|
62
|
+
"@default": "string"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export { conf, language };
|