online-compiler-widget 0.0.4 → 1.0.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/dist/abap-CrvW7_qN.js +1398 -0
- package/dist/apex-BAOI8p1v.js +327 -0
- package/dist/assets/css.worker-Cb0JI69t.js +93 -0
- package/dist/assets/html.worker-BNFZMwEc.js +470 -0
- package/dist/assets/json.worker-BCybXpia.js +58 -0
- package/dist/assets/ts.worker-DAVh1bw1.js +67731 -0
- package/dist/azcli-BlCk_UqW.js +68 -0
- package/dist/bat-DPoEelVx.js +100 -0
- package/dist/bicep-Cp1F394l.js +102 -0
- package/dist/cameligo-CWqtSlQs.js +174 -0
- package/dist/clojure-CKBp32Gf.js +761 -0
- package/dist/coffee-CDo6vc-J.js +232 -0
- package/dist/cpp-DokufPgf.js +389 -0
- package/dist/csharp-BQi3szM0.js +326 -0
- package/dist/csp-BSGtCCZ-.js +53 -0
- package/dist/css-DEPFDJfb.js +187 -0
- package/dist/cssMode-nHrB9Mnr.js +141 -0
- package/dist/cypher-DAb1vOxS.js +263 -0
- package/dist/dart-C8p4jewR.js +281 -0
- package/dist/dockerfile-DP0iLFPN.js +130 -0
- package/dist/ecl-BDQHA6fi.js +456 -0
- package/dist/elixir-D4II6kDM.js +569 -0
- package/dist/flow9-StcnL-VB.js +142 -0
- package/dist/freemarker2-BoiXdkJM.js +982 -0
- package/dist/fsharp-DdUVp3EN.js +217 -0
- package/dist/go-D1-I258M.js +218 -0
- package/dist/graphql-DWkL3f8U.js +151 -0
- package/dist/handlebars-C7PJzkmo.js +412 -0
- package/dist/hcl-D_0MNifv.js +183 -0
- package/dist/html-D_xe_tUa.js +301 -0
- package/dist/htmlMode-Dk_luXu_.js +152 -0
- package/dist/index-Ds0EJmOd.js +129200 -0
- package/dist/index.js +14 -0
- package/dist/ini-C4I2-MT7.js +71 -0
- package/dist/java-OBvaP_SS.js +232 -0
- package/dist/javascript-CUK67ITD.js +70 -0
- package/dist/jsonMode-BIAYTpVF.js +569 -0
- package/dist/julia-BmDH8Kkf.js +511 -0
- package/dist/kotlin-Dhu5AGOD.js +252 -0
- package/dist/less-CzmjXREq.js +162 -0
- package/dist/lexon-CV2c4pN9.js +157 -0
- package/dist/liquid-Cgsk8EmK.js +233 -0
- package/dist/lspLanguageFeatures-HqO1l9Me.js +1458 -0
- package/dist/lua-CFY5U8qF.js +162 -0
- package/dist/m3-BL_AnZVh.js +210 -0
- package/dist/markdown-CWKQPXCv.js +229 -0
- package/dist/mdx-QboWmT4M.js +158 -0
- package/dist/mips-ButYmJ5E.js +198 -0
- package/dist/msdax-C3cnXqDh.js +375 -0
- package/dist/mysql-YlSHaf6G.js +878 -0
- package/dist/objective-c-Dwnlproe.js +183 -0
- package/dist/pascal-UzGbSWEN.js +251 -0
- package/dist/pascaligo-CslTgu68.js +164 -0
- package/dist/perl-oj6r_mgw.js +626 -0
- package/dist/pgsql-DSBO0Mev.js +851 -0
- package/dist/php-YzCD--7j.js +500 -0
- package/dist/pla-CmylB8vQ.js +137 -0
- package/dist/postiats-CLFW5gNY.js +907 -0
- package/dist/powerquery-CmOWUvlh.js +890 -0
- package/dist/powershell-fHQcmBLK.js +239 -0
- package/dist/protobuf-p5BArb-9.js +420 -0
- package/dist/pug-gVdUDvqf.js +402 -0
- package/dist/python-kIZaMFF7.js +294 -0
- package/dist/qsharp-DnrWSUlt.js +301 -0
- package/dist/r-Cv309K2z.js +243 -0
- package/dist/razor-ms2cCMGp.js +543 -0
- package/dist/redis-DTcS4wMj.js +302 -0
- package/dist/redshift-hLxZVESM.js +809 -0
- package/dist/restructuredtext-C898lK4f.js +174 -0
- package/dist/ruby-CgKtnJIQ.js +511 -0
- package/dist/rust-bj8oxVnh.js +343 -0
- package/dist/sb-DWynz26l.js +115 -0
- package/dist/scala-BL5z1UEd.js +370 -0
- package/dist/scheme-DUJsH6VU.js +108 -0
- package/dist/scss-CxjmhvaL.js +262 -0
- package/dist/shell-D14Zs1dF.js +221 -0
- package/dist/solidity-WyRm-BGK.js +1367 -0
- package/dist/sophia-CKk-_Oa5.js +199 -0
- package/dist/sparql-DHtmINMZ.js +201 -0
- package/dist/sql-Dqaj5JHC.js +853 -0
- package/dist/st-Bj2IIaop.js +416 -0
- package/dist/style.css +1 -0
- package/dist/swift-DwxP72iM.js +312 -0
- package/dist/systemverilog-D7wJfuql.js +576 -0
- package/dist/tcl-0ApMt-eC.js +232 -0
- package/dist/tsMode-BiXWAJYS.js +946 -0
- package/dist/twig-DxwbdmvQ.js +392 -0
- package/dist/typescript-ByMmjZ38.js +336 -0
- package/dist/typespec-Fd-JwSuS.js +117 -0
- package/dist/vb-CxuyYE1I.js +372 -0
- package/dist/wgsl-DoEGc31J.js +439 -0
- package/dist/xml-iOXTZgNN.js +88 -0
- package/dist/yaml-RRlyy-QW.js +199 -0
- package/package.json +41 -36
- package/FileStorage/obj/FileStorage.csproj.EntityFrameworkCore.targets +0 -28
- package/README.md +0 -1
- package/eslint.config.js +0 -26
- package/index.html +0 -13
- package/index.tsx +0 -3
- package/openapitools.json +0 -7
- package/pnpm-workspace.yaml +0 -2
- package/public/vite.svg +0 -1
- package/src/App.css +0 -49
- package/src/App.tsx +0 -84
- package/src/api/.openapi-generator/FILES +0 -25
- package/src/api/.openapi-generator/VERSION +0 -1
- package/src/api/.openapi-generator-ignore +0 -23
- package/src/api/api.ts +0 -1312
- package/src/api/base.ts +0 -62
- package/src/api/common.ts +0 -113
- package/src/api/configuration.ts +0 -121
- package/src/api/docs/CompilationError.md +0 -26
- package/src/api/docs/CompileRequest.md +0 -22
- package/src/api/docs/CompileResult.md +0 -28
- package/src/api/docs/CompilerApi.md +0 -263
- package/src/api/docs/CreateFileDto.md +0 -22
- package/src/api/docs/CreateProjectRequest.md +0 -20
- package/src/api/docs/FileApi.md +0 -274
- package/src/api/docs/ProcessStatus.md +0 -28
- package/src/api/docs/ProjectApi.md +0 -362
- package/src/api/docs/ProjectInfo.md +0 -24
- package/src/api/docs/ProjectStats.md +0 -28
- package/src/api/docs/RenameFileDto.md +0 -20
- package/src/api/docs/RenameProjectRequest.md +0 -20
- package/src/api/docs/RunRequest.md +0 -24
- package/src/api/docs/RunResult.md +0 -30
- package/src/api/docs/RunningProjectInfo.md +0 -26
- package/src/api/docs/UpdateFileDto.md +0 -20
- package/src/api/git_push.sh +0 -57
- package/src/api/index.ts +0 -18
- package/src/assets/Badge.svg +0 -17
- package/src/assets/closeIcon.svg +0 -20
- package/src/assets/documentIcon.svg +0 -11
- package/src/assets/history.svg +0 -11
- package/src/assets/output.svg +0 -12
- package/src/assets/plus.svg +0 -20
- package/src/assets/react.svg +0 -1
- package/src/assets/save-icon.svg +0 -11
- package/src/assets/shield.svg +0 -10
- package/src/assets/start.svg +0 -11
- package/src/assets/stop.svg +0 -11
- package/src/components/CompilerWidget.module.scss +0 -169
- package/src/components/CompilerWidget.tsx +0 -331
- package/src/components/FileExplorer.module.scss +0 -372
- package/src/components/FileExplorer.tsx +0 -285
- package/src/components/MonacoEditorWrapper.module.scss +0 -29
- package/src/components/MonacoEditorWrapper.tsx +0 -74
- package/src/components/OutputPanel.module.scss +0 -123
- package/src/components/OutputPanel.tsx +0 -53
- package/src/components/RunContainer.module.scss +0 -150
- package/src/components/RunContainer.tsx +0 -34
- package/src/hooks/useCompiler.ts +0 -228
- package/src/hooks/useInitialNodes.ts +0 -0
- package/src/index.css +0 -78
- package/src/main.tsx +0 -8
- package/src/types/EditorDocument.ts +0 -8
- package/swagger.json +0 -1020
- package/tsconfig.app.json +0 -29
- package/tsconfig.json +0 -7
- package/tsconfig.node.json +0 -26
- package/vite.config.ts +0 -8
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
const t = {
|
|
2
|
+
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,
|
|
3
|
+
comments: {
|
|
4
|
+
blockComment: ["{#", "#}"]
|
|
5
|
+
},
|
|
6
|
+
brackets: [
|
|
7
|
+
["{#", "#}"],
|
|
8
|
+
["{%", "%}"],
|
|
9
|
+
["{{", "}}"],
|
|
10
|
+
["(", ")"],
|
|
11
|
+
["[", "]"],
|
|
12
|
+
// HTML
|
|
13
|
+
["<!--", "-->"],
|
|
14
|
+
["<", ">"]
|
|
15
|
+
],
|
|
16
|
+
autoClosingPairs: [
|
|
17
|
+
{ open: "{# ", close: " #}" },
|
|
18
|
+
{ open: "{% ", close: " %}" },
|
|
19
|
+
{ open: "{{ ", close: " }}" },
|
|
20
|
+
{ open: "[", close: "]" },
|
|
21
|
+
{ open: "(", close: ")" },
|
|
22
|
+
{ open: '"', close: '"' },
|
|
23
|
+
{ open: "'", close: "'" }
|
|
24
|
+
],
|
|
25
|
+
surroundingPairs: [
|
|
26
|
+
{ open: '"', close: '"' },
|
|
27
|
+
{ open: "'", close: "'" },
|
|
28
|
+
// HTML
|
|
29
|
+
{ open: "<", close: ">" }
|
|
30
|
+
]
|
|
31
|
+
}, e = {
|
|
32
|
+
defaultToken: "",
|
|
33
|
+
tokenPostfix: "",
|
|
34
|
+
ignoreCase: !0,
|
|
35
|
+
keywords: [
|
|
36
|
+
// (opening) tags
|
|
37
|
+
"apply",
|
|
38
|
+
"autoescape",
|
|
39
|
+
"block",
|
|
40
|
+
"deprecated",
|
|
41
|
+
"do",
|
|
42
|
+
"embed",
|
|
43
|
+
"extends",
|
|
44
|
+
"flush",
|
|
45
|
+
"for",
|
|
46
|
+
"from",
|
|
47
|
+
"if",
|
|
48
|
+
"import",
|
|
49
|
+
"include",
|
|
50
|
+
"macro",
|
|
51
|
+
"sandbox",
|
|
52
|
+
"set",
|
|
53
|
+
"use",
|
|
54
|
+
"verbatim",
|
|
55
|
+
"with",
|
|
56
|
+
// closing tags
|
|
57
|
+
"endapply",
|
|
58
|
+
"endautoescape",
|
|
59
|
+
"endblock",
|
|
60
|
+
"endembed",
|
|
61
|
+
"endfor",
|
|
62
|
+
"endif",
|
|
63
|
+
"endmacro",
|
|
64
|
+
"endsandbox",
|
|
65
|
+
"endset",
|
|
66
|
+
"endwith",
|
|
67
|
+
// literals
|
|
68
|
+
"true",
|
|
69
|
+
"false"
|
|
70
|
+
],
|
|
71
|
+
tokenizer: {
|
|
72
|
+
root: [
|
|
73
|
+
// whitespace
|
|
74
|
+
[/\s+/],
|
|
75
|
+
// Twig Tag Delimiters
|
|
76
|
+
[/{#/, "comment.twig", "@commentState"],
|
|
77
|
+
[/{%[-~]?/, "delimiter.twig", "@blockState"],
|
|
78
|
+
[/{{[-~]?/, "delimiter.twig", "@variableState"],
|
|
79
|
+
// HTML
|
|
80
|
+
[/<!DOCTYPE/, "metatag.html", "@doctype"],
|
|
81
|
+
[/<!--/, "comment.html", "@comment"],
|
|
82
|
+
[/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/, ["delimiter.html", "tag.html", "", "delimiter.html"]],
|
|
83
|
+
[/(<)(script)/, ["delimiter.html", { token: "tag.html", next: "@script" }]],
|
|
84
|
+
[/(<)(style)/, ["delimiter.html", { token: "tag.html", next: "@style" }]],
|
|
85
|
+
[/(<)((?:[\w\-]+:)?[\w\-]+)/, ["delimiter.html", { token: "tag.html", next: "@otherTag" }]],
|
|
86
|
+
[/(<\/)((?:[\w\-]+:)?[\w\-]+)/, ["delimiter.html", { token: "tag.html", next: "@otherTag" }]],
|
|
87
|
+
[/</, "delimiter.html"],
|
|
88
|
+
[/[^<{]+/]
|
|
89
|
+
// text
|
|
90
|
+
],
|
|
91
|
+
/**
|
|
92
|
+
* Comment Tag Handling
|
|
93
|
+
*/
|
|
94
|
+
commentState: [
|
|
95
|
+
[/#}/, "comment.twig", "@pop"],
|
|
96
|
+
[/./, "comment.twig"]
|
|
97
|
+
],
|
|
98
|
+
/**
|
|
99
|
+
* Block Tag Handling
|
|
100
|
+
*/
|
|
101
|
+
blockState: [
|
|
102
|
+
[/[-~]?%}/, "delimiter.twig", "@pop"],
|
|
103
|
+
// whitespace
|
|
104
|
+
[/\s+/],
|
|
105
|
+
// verbatim
|
|
106
|
+
// Unlike other blocks, verbatim ehas its own state
|
|
107
|
+
// transition to ensure we mark its contents as strings.
|
|
108
|
+
[
|
|
109
|
+
/(verbatim)(\s*)([-~]?%})/,
|
|
110
|
+
["keyword.twig", "", { token: "delimiter.twig", next: "@rawDataState" }]
|
|
111
|
+
],
|
|
112
|
+
{ include: "expression" }
|
|
113
|
+
],
|
|
114
|
+
rawDataState: [
|
|
115
|
+
// endverbatim
|
|
116
|
+
[
|
|
117
|
+
/({%[-~]?)(\s*)(endverbatim)(\s*)([-~]?%})/,
|
|
118
|
+
["delimiter.twig", "", "keyword.twig", "", { token: "delimiter.twig", next: "@popall" }]
|
|
119
|
+
],
|
|
120
|
+
[/./, "string.twig"]
|
|
121
|
+
],
|
|
122
|
+
/**
|
|
123
|
+
* Variable Tag Handling
|
|
124
|
+
*/
|
|
125
|
+
variableState: [[/[-~]?}}/, "delimiter.twig", "@pop"], { include: "expression" }],
|
|
126
|
+
stringState: [
|
|
127
|
+
// closing double quoted string
|
|
128
|
+
[/"/, "string.twig", "@pop"],
|
|
129
|
+
// interpolation start
|
|
130
|
+
[/#{\s*/, "string.twig", "@interpolationState"],
|
|
131
|
+
// string part
|
|
132
|
+
[/[^#"\\]*(?:(?:\\.|#(?!\{))[^#"\\]*)*/, "string.twig"]
|
|
133
|
+
],
|
|
134
|
+
interpolationState: [
|
|
135
|
+
// interpolation end
|
|
136
|
+
[/}/, "string.twig", "@pop"],
|
|
137
|
+
{ include: "expression" }
|
|
138
|
+
],
|
|
139
|
+
/**
|
|
140
|
+
* Expression Handling
|
|
141
|
+
*/
|
|
142
|
+
expression: [
|
|
143
|
+
// whitespace
|
|
144
|
+
[/\s+/],
|
|
145
|
+
// operators - math
|
|
146
|
+
[/\+|-|\/{1,2}|%|\*{1,2}/, "operators.twig"],
|
|
147
|
+
// operators - logic
|
|
148
|
+
[/(and|or|not|b-and|b-xor|b-or)(\s+)/, ["operators.twig", ""]],
|
|
149
|
+
// operators - comparison (symbols)
|
|
150
|
+
[/==|!=|<|>|>=|<=/, "operators.twig"],
|
|
151
|
+
// operators - comparison (words)
|
|
152
|
+
[/(starts with|ends with|matches)(\s+)/, ["operators.twig", ""]],
|
|
153
|
+
// operators - containment
|
|
154
|
+
[/(in)(\s+)/, ["operators.twig", ""]],
|
|
155
|
+
// operators - test
|
|
156
|
+
[/(is)(\s+)/, ["operators.twig", ""]],
|
|
157
|
+
// operators - misc
|
|
158
|
+
[/\||~|:|\.{1,2}|\?{1,2}/, "operators.twig"],
|
|
159
|
+
// names
|
|
160
|
+
[
|
|
161
|
+
/[^\W\d][\w]*/,
|
|
162
|
+
{
|
|
163
|
+
cases: {
|
|
164
|
+
"@keywords": "keyword.twig",
|
|
165
|
+
"@default": "variable.twig"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
],
|
|
169
|
+
// numbers
|
|
170
|
+
[/\d+(\.\d+)?/, "number.twig"],
|
|
171
|
+
// punctuation
|
|
172
|
+
[/\(|\)|\[|\]|{|}|,/, "delimiter.twig"],
|
|
173
|
+
// strings
|
|
174
|
+
[/"([^#"\\]*(?:\\.[^#"\\]*)*)"|\'([^\'\\]*(?:\\.[^\'\\]*)*)\'/, "string.twig"],
|
|
175
|
+
// opening double quoted string
|
|
176
|
+
[/"/, "string.twig", "@stringState"],
|
|
177
|
+
// misc syntactic constructs
|
|
178
|
+
// These are not operators per se, but for the purposes of lexical analysis we
|
|
179
|
+
// can treat them as such.
|
|
180
|
+
// arrow functions
|
|
181
|
+
[/=>/, "operators.twig"],
|
|
182
|
+
// assignment
|
|
183
|
+
[/=/, "operators.twig"]
|
|
184
|
+
],
|
|
185
|
+
/**
|
|
186
|
+
* HTML
|
|
187
|
+
*/
|
|
188
|
+
doctype: [
|
|
189
|
+
[/[^>]+/, "metatag.content.html"],
|
|
190
|
+
[/>/, "metatag.html", "@pop"]
|
|
191
|
+
],
|
|
192
|
+
comment: [
|
|
193
|
+
[/-->/, "comment.html", "@pop"],
|
|
194
|
+
[/[^-]+/, "comment.content.html"],
|
|
195
|
+
[/./, "comment.content.html"]
|
|
196
|
+
],
|
|
197
|
+
otherTag: [
|
|
198
|
+
[/\/?>/, "delimiter.html", "@pop"],
|
|
199
|
+
[/"([^"]*)"/, "attribute.value.html"],
|
|
200
|
+
[/'([^']*)'/, "attribute.value.html"],
|
|
201
|
+
[/[\w\-]+/, "attribute.name.html"],
|
|
202
|
+
[/=/, "delimiter.html"],
|
|
203
|
+
[/[ \t\r\n]+/]
|
|
204
|
+
// whitespace
|
|
205
|
+
],
|
|
206
|
+
// -- BEGIN <script> tags handling
|
|
207
|
+
// After <script
|
|
208
|
+
script: [
|
|
209
|
+
[/type/, "attribute.name.html", "@scriptAfterType"],
|
|
210
|
+
[/"([^"]*)"/, "attribute.value.html"],
|
|
211
|
+
[/'([^']*)'/, "attribute.value.html"],
|
|
212
|
+
[/[\w\-]+/, "attribute.name.html"],
|
|
213
|
+
[/=/, "delimiter.html"],
|
|
214
|
+
[
|
|
215
|
+
/>/,
|
|
216
|
+
{
|
|
217
|
+
token: "delimiter.html",
|
|
218
|
+
next: "@scriptEmbedded",
|
|
219
|
+
nextEmbedded: "text/javascript"
|
|
220
|
+
}
|
|
221
|
+
],
|
|
222
|
+
[/[ \t\r\n]+/],
|
|
223
|
+
// whitespace
|
|
224
|
+
[
|
|
225
|
+
/(<\/)(script\s*)(>)/,
|
|
226
|
+
["delimiter.html", "tag.html", { token: "delimiter.html", next: "@pop" }]
|
|
227
|
+
]
|
|
228
|
+
],
|
|
229
|
+
// After <script ... type
|
|
230
|
+
scriptAfterType: [
|
|
231
|
+
[/=/, "delimiter.html", "@scriptAfterTypeEquals"],
|
|
232
|
+
[
|
|
233
|
+
/>/,
|
|
234
|
+
{
|
|
235
|
+
token: "delimiter.html",
|
|
236
|
+
next: "@scriptEmbedded",
|
|
237
|
+
nextEmbedded: "text/javascript"
|
|
238
|
+
}
|
|
239
|
+
],
|
|
240
|
+
// cover invalid e.g. <script type>
|
|
241
|
+
[/[ \t\r\n]+/],
|
|
242
|
+
// whitespace
|
|
243
|
+
[/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
|
|
244
|
+
],
|
|
245
|
+
// After <script ... type =
|
|
246
|
+
scriptAfterTypeEquals: [
|
|
247
|
+
[
|
|
248
|
+
/"([^"]*)"/,
|
|
249
|
+
{
|
|
250
|
+
token: "attribute.value.html",
|
|
251
|
+
switchTo: "@scriptWithCustomType.$1"
|
|
252
|
+
}
|
|
253
|
+
],
|
|
254
|
+
[
|
|
255
|
+
/'([^']*)'/,
|
|
256
|
+
{
|
|
257
|
+
token: "attribute.value.html",
|
|
258
|
+
switchTo: "@scriptWithCustomType.$1"
|
|
259
|
+
}
|
|
260
|
+
],
|
|
261
|
+
[
|
|
262
|
+
/>/,
|
|
263
|
+
{
|
|
264
|
+
token: "delimiter.html",
|
|
265
|
+
next: "@scriptEmbedded",
|
|
266
|
+
nextEmbedded: "text/javascript"
|
|
267
|
+
}
|
|
268
|
+
],
|
|
269
|
+
// cover invalid e.g. <script type=>
|
|
270
|
+
[/[ \t\r\n]+/],
|
|
271
|
+
// whitespace
|
|
272
|
+
[/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
|
|
273
|
+
],
|
|
274
|
+
// After <script ... type = $S2
|
|
275
|
+
scriptWithCustomType: [
|
|
276
|
+
[
|
|
277
|
+
/>/,
|
|
278
|
+
{
|
|
279
|
+
token: "delimiter.html",
|
|
280
|
+
next: "@scriptEmbedded.$S2",
|
|
281
|
+
nextEmbedded: "$S2"
|
|
282
|
+
}
|
|
283
|
+
],
|
|
284
|
+
[/"([^"]*)"/, "attribute.value.html"],
|
|
285
|
+
[/'([^']*)'/, "attribute.value.html"],
|
|
286
|
+
[/[\w\-]+/, "attribute.name.html"],
|
|
287
|
+
[/=/, "delimiter.html"],
|
|
288
|
+
[/[ \t\r\n]+/],
|
|
289
|
+
// whitespace
|
|
290
|
+
[/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
|
|
291
|
+
],
|
|
292
|
+
scriptEmbedded: [
|
|
293
|
+
[/<\/script/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }],
|
|
294
|
+
[/[^<]+/, ""]
|
|
295
|
+
],
|
|
296
|
+
// -- END <script> tags handling
|
|
297
|
+
// -- BEGIN <style> tags handling
|
|
298
|
+
// After <style
|
|
299
|
+
style: [
|
|
300
|
+
[/type/, "attribute.name.html", "@styleAfterType"],
|
|
301
|
+
[/"([^"]*)"/, "attribute.value.html"],
|
|
302
|
+
[/'([^']*)'/, "attribute.value.html"],
|
|
303
|
+
[/[\w\-]+/, "attribute.name.html"],
|
|
304
|
+
[/=/, "delimiter.html"],
|
|
305
|
+
[
|
|
306
|
+
/>/,
|
|
307
|
+
{
|
|
308
|
+
token: "delimiter.html",
|
|
309
|
+
next: "@styleEmbedded",
|
|
310
|
+
nextEmbedded: "text/css"
|
|
311
|
+
}
|
|
312
|
+
],
|
|
313
|
+
[/[ \t\r\n]+/],
|
|
314
|
+
// whitespace
|
|
315
|
+
[
|
|
316
|
+
/(<\/)(style\s*)(>)/,
|
|
317
|
+
["delimiter.html", "tag.html", { token: "delimiter.html", next: "@pop" }]
|
|
318
|
+
]
|
|
319
|
+
],
|
|
320
|
+
// After <style ... type
|
|
321
|
+
styleAfterType: [
|
|
322
|
+
[/=/, "delimiter.html", "@styleAfterTypeEquals"],
|
|
323
|
+
[
|
|
324
|
+
/>/,
|
|
325
|
+
{
|
|
326
|
+
token: "delimiter.html",
|
|
327
|
+
next: "@styleEmbedded",
|
|
328
|
+
nextEmbedded: "text/css"
|
|
329
|
+
}
|
|
330
|
+
],
|
|
331
|
+
// cover invalid e.g. <style type>
|
|
332
|
+
[/[ \t\r\n]+/],
|
|
333
|
+
// whitespace
|
|
334
|
+
[/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
|
|
335
|
+
],
|
|
336
|
+
// After <style ... type =
|
|
337
|
+
styleAfterTypeEquals: [
|
|
338
|
+
[
|
|
339
|
+
/"([^"]*)"/,
|
|
340
|
+
{
|
|
341
|
+
token: "attribute.value.html",
|
|
342
|
+
switchTo: "@styleWithCustomType.$1"
|
|
343
|
+
}
|
|
344
|
+
],
|
|
345
|
+
[
|
|
346
|
+
/'([^']*)'/,
|
|
347
|
+
{
|
|
348
|
+
token: "attribute.value.html",
|
|
349
|
+
switchTo: "@styleWithCustomType.$1"
|
|
350
|
+
}
|
|
351
|
+
],
|
|
352
|
+
[
|
|
353
|
+
/>/,
|
|
354
|
+
{
|
|
355
|
+
token: "delimiter.html",
|
|
356
|
+
next: "@styleEmbedded",
|
|
357
|
+
nextEmbedded: "text/css"
|
|
358
|
+
}
|
|
359
|
+
],
|
|
360
|
+
// cover invalid e.g. <style type=>
|
|
361
|
+
[/[ \t\r\n]+/],
|
|
362
|
+
// whitespace
|
|
363
|
+
[/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
|
|
364
|
+
],
|
|
365
|
+
// After <style ... type = $S2
|
|
366
|
+
styleWithCustomType: [
|
|
367
|
+
[
|
|
368
|
+
/>/,
|
|
369
|
+
{
|
|
370
|
+
token: "delimiter.html",
|
|
371
|
+
next: "@styleEmbedded.$S2",
|
|
372
|
+
nextEmbedded: "$S2"
|
|
373
|
+
}
|
|
374
|
+
],
|
|
375
|
+
[/"([^"]*)"/, "attribute.value.html"],
|
|
376
|
+
[/'([^']*)'/, "attribute.value.html"],
|
|
377
|
+
[/[\w\-]+/, "attribute.name.html"],
|
|
378
|
+
[/=/, "delimiter.html"],
|
|
379
|
+
[/[ \t\r\n]+/],
|
|
380
|
+
// whitespace
|
|
381
|
+
[/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
|
|
382
|
+
],
|
|
383
|
+
styleEmbedded: [
|
|
384
|
+
[/<\/style/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }],
|
|
385
|
+
[/[^<]+/, ""]
|
|
386
|
+
]
|
|
387
|
+
}
|
|
388
|
+
};
|
|
389
|
+
export {
|
|
390
|
+
t as conf,
|
|
391
|
+
e as language
|
|
392
|
+
};
|