online-compiler-widget 0.0.3 → 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 -279
- 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,158 @@
|
|
|
1
|
+
import { l as e } from "./index-Ds0EJmOd.js";
|
|
2
|
+
const i = {
|
|
3
|
+
comments: {
|
|
4
|
+
blockComment: ["{/*", "*/}"]
|
|
5
|
+
},
|
|
6
|
+
brackets: [["{", "}"]],
|
|
7
|
+
autoClosingPairs: [
|
|
8
|
+
{ open: '"', close: '"' },
|
|
9
|
+
{ open: "'", close: "'" },
|
|
10
|
+
{ open: "“", close: "”" },
|
|
11
|
+
{ open: "‘", close: "’" },
|
|
12
|
+
{ open: "`", close: "`" },
|
|
13
|
+
{ open: "{", close: "}" },
|
|
14
|
+
{ open: "(", close: ")" },
|
|
15
|
+
{ open: "_", close: "_" },
|
|
16
|
+
{ open: "**", close: "**" },
|
|
17
|
+
{ open: "<", close: ">" }
|
|
18
|
+
],
|
|
19
|
+
onEnterRules: [
|
|
20
|
+
{
|
|
21
|
+
beforeText: /^\s*- .+/,
|
|
22
|
+
action: { indentAction: e.IndentAction.None, appendText: "- " }
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
beforeText: /^\s*\+ .+/,
|
|
26
|
+
action: { indentAction: e.IndentAction.None, appendText: "+ " }
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
beforeText: /^\s*\* .+/,
|
|
30
|
+
action: { indentAction: e.IndentAction.None, appendText: "* " }
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
beforeText: /^> /,
|
|
34
|
+
action: { indentAction: e.IndentAction.None, appendText: "> " }
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
beforeText: /<\w+/,
|
|
38
|
+
action: { indentAction: e.IndentAction.Indent }
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
beforeText: /\s+>\s*$/,
|
|
42
|
+
action: { indentAction: e.IndentAction.Indent }
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
beforeText: /<\/\w+>/,
|
|
46
|
+
action: { indentAction: e.IndentAction.Outdent }
|
|
47
|
+
},
|
|
48
|
+
...Array.from({ length: 100 }, (n, t) => ({
|
|
49
|
+
beforeText: new RegExp(`^${t}\\. .+`),
|
|
50
|
+
action: { indentAction: e.IndentAction.None, appendText: `${t + 1}. ` }
|
|
51
|
+
}))
|
|
52
|
+
]
|
|
53
|
+
}, s = {
|
|
54
|
+
defaultToken: "",
|
|
55
|
+
tokenPostfix: ".mdx",
|
|
56
|
+
control: /[!#()*+.[\\\]_`{}\-]/,
|
|
57
|
+
escapes: /\\@control/,
|
|
58
|
+
tokenizer: {
|
|
59
|
+
root: [
|
|
60
|
+
[/^---$/, { token: "meta.content", next: "@frontmatter", nextEmbedded: "yaml" }],
|
|
61
|
+
[/^\s*import/, { token: "keyword", next: "@import", nextEmbedded: "js" }],
|
|
62
|
+
[/^\s*export/, { token: "keyword", next: "@export", nextEmbedded: "js" }],
|
|
63
|
+
[/<\w+/, { token: "type.identifier", next: "@jsx" }],
|
|
64
|
+
[/<\/?\w+>/, "type.identifier"],
|
|
65
|
+
[
|
|
66
|
+
/^(\s*)(>*\s*)(#{1,6}\s)/,
|
|
67
|
+
[{ token: "white" }, { token: "comment" }, { token: "keyword", next: "@header" }]
|
|
68
|
+
],
|
|
69
|
+
[/^(\s*)(>*\s*)([*+-])(\s+)/, ["white", "comment", "keyword", "white"]],
|
|
70
|
+
[/^(\s*)(>*\s*)(\d{1,9}\.)(\s+)/, ["white", "comment", "number", "white"]],
|
|
71
|
+
[/^(\s*)(>*\s*)(\d{1,9}\.)(\s+)/, ["white", "comment", "number", "white"]],
|
|
72
|
+
[/^(\s*)(>*\s*)(-{3,}|\*{3,}|_{3,})$/, ["white", "comment", "keyword"]],
|
|
73
|
+
[/`{3,}(\s.*)?$/, { token: "string", next: "@codeblock_backtick" }],
|
|
74
|
+
[/~{3,}(\s.*)?$/, { token: "string", next: "@codeblock_tilde" }],
|
|
75
|
+
[
|
|
76
|
+
/`{3,}(\S+).*$/,
|
|
77
|
+
{ token: "string", next: "@codeblock_highlight_backtick", nextEmbedded: "$1" }
|
|
78
|
+
],
|
|
79
|
+
[
|
|
80
|
+
/~{3,}(\S+).*$/,
|
|
81
|
+
{ token: "string", next: "@codeblock_highlight_tilde", nextEmbedded: "$1" }
|
|
82
|
+
],
|
|
83
|
+
[/^(\s*)(-{4,})$/, ["white", "comment"]],
|
|
84
|
+
[/^(\s*)(>+)/, ["white", "comment"]],
|
|
85
|
+
{ include: "content" }
|
|
86
|
+
],
|
|
87
|
+
content: [
|
|
88
|
+
[
|
|
89
|
+
/(\[)(.+)(]\()(.+)(\s+".*")(\))/,
|
|
90
|
+
["", "string.link", "", "type.identifier", "string.link", ""]
|
|
91
|
+
],
|
|
92
|
+
[/(\[)(.+)(]\()(.+)(\))/, ["", "type.identifier", "", "string.link", ""]],
|
|
93
|
+
[/(\[)(.+)(]\[)(.+)(])/, ["", "type.identifier", "", "type.identifier", ""]],
|
|
94
|
+
[/(\[)(.+)(]:\s+)(\S*)/, ["", "type.identifier", "", "string.link"]],
|
|
95
|
+
[/(\[)(.+)(])/, ["", "type.identifier", ""]],
|
|
96
|
+
[/`.*`/, "variable.source"],
|
|
97
|
+
[/_/, { token: "emphasis", next: "@emphasis_underscore" }],
|
|
98
|
+
[/\*(?!\*)/, { token: "emphasis", next: "@emphasis_asterisk" }],
|
|
99
|
+
[/\*\*/, { token: "strong", next: "@strong" }],
|
|
100
|
+
[/{/, { token: "delimiter.bracket", next: "@expression", nextEmbedded: "js" }]
|
|
101
|
+
],
|
|
102
|
+
import: [[/'\s*(;|$)/, { token: "string", next: "@pop", nextEmbedded: "@pop" }]],
|
|
103
|
+
expression: [
|
|
104
|
+
[/{/, { token: "delimiter.bracket", next: "@expression" }],
|
|
105
|
+
[/}/, { token: "delimiter.bracket", next: "@pop", nextEmbedded: "@pop" }]
|
|
106
|
+
],
|
|
107
|
+
export: [[/^\s*$/, { token: "delimiter.bracket", next: "@pop", nextEmbedded: "@pop" }]],
|
|
108
|
+
jsx: [
|
|
109
|
+
[/\s+/, ""],
|
|
110
|
+
[/(\w+)(=)("(?:[^"\\]|\\.)*")/, ["attribute.name", "operator", "string"]],
|
|
111
|
+
[/(\w+)(=)('(?:[^'\\]|\\.)*')/, ["attribute.name", "operator", "string"]],
|
|
112
|
+
[/(\w+(?=\s|>|={|$))/, ["attribute.name"]],
|
|
113
|
+
[/={/, { token: "delimiter.bracket", next: "@expression", nextEmbedded: "js" }],
|
|
114
|
+
[/>/, { token: "type.identifier", next: "@pop" }]
|
|
115
|
+
],
|
|
116
|
+
header: [
|
|
117
|
+
[/.$/, { token: "keyword", next: "@pop" }],
|
|
118
|
+
{ include: "content" },
|
|
119
|
+
[/./, { token: "keyword" }]
|
|
120
|
+
],
|
|
121
|
+
strong: [
|
|
122
|
+
[/\*\*/, { token: "strong", next: "@pop" }],
|
|
123
|
+
{ include: "content" },
|
|
124
|
+
[/./, { token: "strong" }]
|
|
125
|
+
],
|
|
126
|
+
emphasis_underscore: [
|
|
127
|
+
[/_/, { token: "emphasis", next: "@pop" }],
|
|
128
|
+
{ include: "content" },
|
|
129
|
+
[/./, { token: "emphasis" }]
|
|
130
|
+
],
|
|
131
|
+
emphasis_asterisk: [
|
|
132
|
+
[/\*(?!\*)/, { token: "emphasis", next: "@pop" }],
|
|
133
|
+
{ include: "content" },
|
|
134
|
+
[/./, { token: "emphasis" }]
|
|
135
|
+
],
|
|
136
|
+
frontmatter: [[/^---$/, { token: "meta.content", nextEmbedded: "@pop", next: "@pop" }]],
|
|
137
|
+
codeblock_highlight_backtick: [
|
|
138
|
+
[/\s*`{3,}\s*$/, { token: "string", next: "@pop", nextEmbedded: "@pop" }],
|
|
139
|
+
[/.*$/, "variable.source"]
|
|
140
|
+
],
|
|
141
|
+
codeblock_highlight_tilde: [
|
|
142
|
+
[/\s*~{3,}\s*$/, { token: "string", next: "@pop", nextEmbedded: "@pop" }],
|
|
143
|
+
[/.*$/, "variable.source"]
|
|
144
|
+
],
|
|
145
|
+
codeblock_backtick: [
|
|
146
|
+
[/\s*`{3,}\s*$/, { token: "string", next: "@pop" }],
|
|
147
|
+
[/.*$/, "variable.source"]
|
|
148
|
+
],
|
|
149
|
+
codeblock_tilde: [
|
|
150
|
+
[/\s*~{3,}\s*$/, { token: "string", next: "@pop" }],
|
|
151
|
+
[/.*$/, "variable.source"]
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
export {
|
|
156
|
+
i as conf,
|
|
157
|
+
s as language
|
|
158
|
+
};
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
|
3
|
+
comments: {
|
|
4
|
+
blockComment: ["###", "###"],
|
|
5
|
+
lineComment: "#"
|
|
6
|
+
},
|
|
7
|
+
folding: {
|
|
8
|
+
markers: {
|
|
9
|
+
start: new RegExp("^\\s*#region\\b"),
|
|
10
|
+
end: new RegExp("^\\s*#endregion\\b")
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}, t = {
|
|
14
|
+
defaultToken: "",
|
|
15
|
+
ignoreCase: !1,
|
|
16
|
+
tokenPostfix: ".mips",
|
|
17
|
+
regEx: /\/(?!\/\/)(?:[^\/\\]|\\.)*\/[igm]*/,
|
|
18
|
+
keywords: [
|
|
19
|
+
".data",
|
|
20
|
+
".text",
|
|
21
|
+
"syscall",
|
|
22
|
+
"trap",
|
|
23
|
+
"add",
|
|
24
|
+
"addu",
|
|
25
|
+
"addi",
|
|
26
|
+
"addiu",
|
|
27
|
+
"and",
|
|
28
|
+
"andi",
|
|
29
|
+
"div",
|
|
30
|
+
"divu",
|
|
31
|
+
"mult",
|
|
32
|
+
"multu",
|
|
33
|
+
"nor",
|
|
34
|
+
"or",
|
|
35
|
+
"ori",
|
|
36
|
+
"sll",
|
|
37
|
+
"slv",
|
|
38
|
+
"sra",
|
|
39
|
+
"srav",
|
|
40
|
+
"srl",
|
|
41
|
+
"srlv",
|
|
42
|
+
"sub",
|
|
43
|
+
"subu",
|
|
44
|
+
"xor",
|
|
45
|
+
"xori",
|
|
46
|
+
"lhi",
|
|
47
|
+
"lho",
|
|
48
|
+
"lhi",
|
|
49
|
+
"llo",
|
|
50
|
+
"slt",
|
|
51
|
+
"slti",
|
|
52
|
+
"sltu",
|
|
53
|
+
"sltiu",
|
|
54
|
+
"beq",
|
|
55
|
+
"bgtz",
|
|
56
|
+
"blez",
|
|
57
|
+
"bne",
|
|
58
|
+
"j",
|
|
59
|
+
"jal",
|
|
60
|
+
"jalr",
|
|
61
|
+
"jr",
|
|
62
|
+
"lb",
|
|
63
|
+
"lbu",
|
|
64
|
+
"lh",
|
|
65
|
+
"lhu",
|
|
66
|
+
"lw",
|
|
67
|
+
"li",
|
|
68
|
+
"la",
|
|
69
|
+
"sb",
|
|
70
|
+
"sh",
|
|
71
|
+
"sw",
|
|
72
|
+
"mfhi",
|
|
73
|
+
"mflo",
|
|
74
|
+
"mthi",
|
|
75
|
+
"mtlo",
|
|
76
|
+
"move"
|
|
77
|
+
],
|
|
78
|
+
// we include these common regular expressions
|
|
79
|
+
symbols: /[\.,\:]+/,
|
|
80
|
+
escapes: /\\(?:[abfnrtv\\"'$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
|
81
|
+
// The main tokenizer for our languages
|
|
82
|
+
tokenizer: {
|
|
83
|
+
root: [
|
|
84
|
+
// identifiers and keywords
|
|
85
|
+
[/\$[a-zA-Z_]\w*/, "variable.predefined"],
|
|
86
|
+
[
|
|
87
|
+
/[.a-zA-Z_]\w*/,
|
|
88
|
+
{
|
|
89
|
+
cases: {
|
|
90
|
+
this: "variable.predefined",
|
|
91
|
+
"@keywords": { token: "keyword.$0" },
|
|
92
|
+
"@default": ""
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
// whitespace
|
|
97
|
+
[/[ \t\r\n]+/, ""],
|
|
98
|
+
// Comments
|
|
99
|
+
[/#.*$/, "comment"],
|
|
100
|
+
// regular expressions
|
|
101
|
+
["///", { token: "regexp", next: "@hereregexp" }],
|
|
102
|
+
[/^(\s*)(@regEx)/, ["", "regexp"]],
|
|
103
|
+
[/(\,)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
|
|
104
|
+
[/(\:)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
|
|
105
|
+
// delimiters
|
|
106
|
+
[/@symbols/, "delimiter"],
|
|
107
|
+
// numbers
|
|
108
|
+
[/\d+[eE]([\-+]?\d+)?/, "number.float"],
|
|
109
|
+
[/\d+\.\d+([eE][\-+]?\d+)?/, "number.float"],
|
|
110
|
+
[/0[xX][0-9a-fA-F]+/, "number.hex"],
|
|
111
|
+
[/0[0-7]+(?!\d)/, "number.octal"],
|
|
112
|
+
[/\d+/, "number"],
|
|
113
|
+
// delimiter: after number because of .\d floats
|
|
114
|
+
[/[,.]/, "delimiter"],
|
|
115
|
+
// strings:
|
|
116
|
+
[/"""/, "string", '@herestring."""'],
|
|
117
|
+
[/'''/, "string", "@herestring.'''"],
|
|
118
|
+
[
|
|
119
|
+
/"/,
|
|
120
|
+
{
|
|
121
|
+
cases: {
|
|
122
|
+
"@eos": "string",
|
|
123
|
+
"@default": { token: "string", next: '@string."' }
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
[
|
|
128
|
+
/'/,
|
|
129
|
+
{
|
|
130
|
+
cases: {
|
|
131
|
+
"@eos": "string",
|
|
132
|
+
"@default": { token: "string", next: "@string.'" }
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
],
|
|
137
|
+
string: [
|
|
138
|
+
[/[^"'\#\\]+/, "string"],
|
|
139
|
+
[/@escapes/, "string.escape"],
|
|
140
|
+
[/\./, "string.escape.invalid"],
|
|
141
|
+
[/\./, "string.escape.invalid"],
|
|
142
|
+
[
|
|
143
|
+
/#{/,
|
|
144
|
+
{
|
|
145
|
+
cases: {
|
|
146
|
+
'$S2=="': {
|
|
147
|
+
token: "string",
|
|
148
|
+
next: "root.interpolatedstring"
|
|
149
|
+
},
|
|
150
|
+
"@default": "string"
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
[
|
|
155
|
+
/["']/,
|
|
156
|
+
{
|
|
157
|
+
cases: {
|
|
158
|
+
"$#==$S2": { token: "string", next: "@pop" },
|
|
159
|
+
"@default": "string"
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
],
|
|
163
|
+
[/#/, "string"]
|
|
164
|
+
],
|
|
165
|
+
herestring: [
|
|
166
|
+
[
|
|
167
|
+
/("""|''')/,
|
|
168
|
+
{
|
|
169
|
+
cases: {
|
|
170
|
+
"$1==$S2": { token: "string", next: "@pop" },
|
|
171
|
+
"@default": "string"
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
],
|
|
175
|
+
[/[^#\\'"]+/, "string"],
|
|
176
|
+
[/['"]+/, "string"],
|
|
177
|
+
[/@escapes/, "string.escape"],
|
|
178
|
+
[/\./, "string.escape.invalid"],
|
|
179
|
+
[/#{/, { token: "string.quote", next: "root.interpolatedstring" }],
|
|
180
|
+
[/#/, "string"]
|
|
181
|
+
],
|
|
182
|
+
comment: [
|
|
183
|
+
[/[^#]+/, "comment"],
|
|
184
|
+
[/#/, "comment"]
|
|
185
|
+
],
|
|
186
|
+
hereregexp: [
|
|
187
|
+
[/[^\\\/#]+/, "regexp"],
|
|
188
|
+
[/\\./, "regexp"],
|
|
189
|
+
[/#.*$/, "comment"],
|
|
190
|
+
["///[igm]*", { token: "regexp", next: "@pop" }],
|
|
191
|
+
[/\//, "regexp"]
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
export {
|
|
196
|
+
e as conf,
|
|
197
|
+
t as language
|
|
198
|
+
};
|