@threadlabs/looma 0.18.6 → 0.19.1
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/components/ui-editor-table-overlay/ui-editor-table-overlay.html +34 -3
- package/components/ui-editor-table-overlay/ui-editor-table-overlay.js +55 -0
- package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.html +7 -2
- package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.js +29 -0
- package/components/ui-tree-item/ui-tree-item.html +5 -5
- package/components/ui-tree-item/ui-tree-item.js +20 -3
- package/dist/index.js +1 -1
- package/editor/chunks/extensions.js +24 -3
- package/editor/extensions/preset.d.ts +2 -0
- package/editor/extensions/table-commands.d.ts +1 -1
- package/editor/table-overlay.d.ts +8 -3
- package/package.json +2 -1
- package/styles/ui-editor-table-overlay.css +30 -0
- package/styles/ui-editor-table-toolbar.css +7 -2
- package/styles/ui-tree-item.css +5 -5
- package/vanilla/UiEditorTableOverlay.d.ts +1 -1
- package/vanilla/UiEditorTableOverlay.js +9 -3
- package/vue/UiEditorTableOverlay.d.ts +8 -0
- package/vue/UiEditorTableOverlay.vue +45 -2
- package/vue/UiEditorTableToolbar.vue +7 -2
- package/vue/UiTreeItem.vue +5 -5
- package/vue/chunks/1c.js +106 -0
- package/vue/chunks/UiEditorTableOverlay.js +14 -4
- package/vue/chunks/UiEditorTableToolbar.js +1 -1
- package/vue/chunks/UiTreeItem.js +1 -1
- package/vue/chunks/abnf.js +61 -0
- package/vue/chunks/accesslog.js +72 -0
- package/vue/chunks/actionscript.js +139 -0
- package/vue/chunks/ada.js +183 -0
- package/vue/chunks/angelscript.js +141 -0
- package/vue/chunks/apache.js +88 -0
- package/vue/chunks/applescript.js +99 -0
- package/vue/chunks/arcade.js +405 -0
- package/vue/chunks/arduino.js +871 -0
- package/vue/chunks/armasm.js +65 -0
- package/vue/chunks/asciidoc.js +181 -0
- package/vue/chunks/aspectj.js +202 -0
- package/vue/chunks/autohotkey.js +54 -0
- package/vue/chunks/autoit.js +132 -0
- package/vue/chunks/avrasm.js +46 -0
- package/vue/chunks/awk.js +58 -0
- package/vue/chunks/axapta.js +167 -0
- package/vue/chunks/bash.js +358 -0
- package/vue/chunks/basic.js +221 -0
- package/vue/chunks/bnf.js +27 -0
- package/vue/chunks/brainfuck.js +40 -0
- package/vue/chunks/c.js +265 -0
- package/vue/chunks/cal.js +136 -0
- package/vue/chunks/capnproto.js +86 -0
- package/vue/chunks/ceylon.js +125 -0
- package/vue/chunks/clean.js +54 -0
- package/vue/chunks/clojure-repl.js +17 -0
- package/vue/chunks/clojure.js +133 -0
- package/vue/chunks/cmake.js +23 -0
- package/vue/chunks/coffeescript.js +291 -0
- package/vue/chunks/coq.js +436 -0
- package/vue/chunks/cos.js +77 -0
- package/vue/chunks/cpp.js +492 -0
- package/vue/chunks/crmsh.js +80 -0
- package/vue/chunks/crystal.js +260 -0
- package/vue/chunks/csharp.js +376 -0
- package/vue/chunks/csp.js +52 -0
- package/vue/chunks/css.js +890 -0
- package/vue/chunks/d.js +184 -0
- package/vue/chunks/dart.js +226 -0
- package/vue/chunks/delphi.js +227 -0
- package/vue/chunks/diff.js +40 -0
- package/vue/chunks/django.js +43 -0
- package/vue/chunks/dns.js +66 -0
- package/vue/chunks/dockerfile.js +35 -0
- package/vue/chunks/dos.js +147 -0
- package/vue/chunks/dsconfig.js +55 -0
- package/vue/chunks/dts.js +119 -0
- package/vue/chunks/dust.js +33 -0
- package/vue/chunks/ebnf.js +40 -0
- package/vue/chunks/elixir.js +241 -0
- package/vue/chunks/elm.js +103 -0
- package/vue/chunks/erb.js +17 -0
- package/vue/chunks/erlang-repl.js +41 -0
- package/vue/chunks/erlang.js +236 -0
- package/vue/chunks/excel.js +562 -0
- package/vue/chunks/fix.js +30 -0
- package/vue/chunks/flix.js +60 -0
- package/vue/chunks/fortran.js +543 -0
- package/vue/chunks/fsharp.js +440 -0
- package/vue/chunks/gams.js +134 -0
- package/vue/chunks/gauss.js +167 -0
- package/vue/chunks/gcode.js +131 -0
- package/vue/chunks/gherkin.js +41 -0
- package/vue/chunks/glsl.js +25 -0
- package/vue/chunks/gml.js +3119 -0
- package/vue/chunks/go.js +140 -0
- package/vue/chunks/golo.js +72 -0
- package/vue/chunks/gradle.js +181 -0
- package/vue/chunks/graphql.js +68 -0
- package/vue/chunks/groovy.js +159 -0
- package/vue/chunks/haml.js +96 -0
- package/vue/chunks/handlebars.js +191 -0
- package/vue/chunks/haskell.js +149 -0
- package/vue/chunks/haxe.js +142 -0
- package/vue/chunks/hsp.js +45 -0
- package/vue/chunks/http.js +77 -0
- package/vue/chunks/hy.js +92 -0
- package/vue/chunks/inform7.js +45 -0
- package/vue/chunks/ini.js +94 -0
- package/vue/chunks/irpf90.js +52 -0
- package/vue/chunks/isbl.js +112 -0
- package/vue/chunks/java.js +237 -0
- package/vue/chunks/javascript.js +570 -0
- package/vue/chunks/jboss-cli.js +46 -0
- package/vue/chunks/json.js +45 -0
- package/vue/chunks/julia-repl.js +18 -0
- package/vue/chunks/julia.js +353 -0
- package/vue/chunks/kotlin.js +216 -0
- package/vue/chunks/lasso.js +127 -0
- package/vue/chunks/latex.js +206 -0
- package/vue/chunks/ldif.js +25 -0
- package/vue/chunks/leaf.js +72 -0
- package/vue/chunks/less.js +953 -0
- package/vue/chunks/lisp.js +119 -0
- package/vue/chunks/livecodeserver.js +86 -0
- package/vue/chunks/livescript.js +309 -0
- package/vue/chunks/llvm.js +77 -0
- package/vue/chunks/lsl.js +55 -0
- package/vue/chunks/lua.js +49 -0
- package/vue/chunks/makefile.js +62 -0
- package/vue/chunks/markdown.js +194 -0
- package/vue/chunks/mathematica.js +7317 -0
- package/vue/chunks/matlab.js +70 -0
- package/vue/chunks/maxima.js +38 -0
- package/vue/chunks/mel.js +24 -0
- package/vue/chunks/mercury.js +62 -0
- package/vue/chunks/mipsasm.js +53 -0
- package/vue/chunks/mizar.js +10 -0
- package/vue/chunks/mojolicious.js +27 -0
- package/vue/chunks/monkey.js +158 -0
- package/vue/chunks/moonscript.js +102 -0
- package/vue/chunks/n1ql.js +346 -0
- package/vue/chunks/nestedtext.js +66 -0
- package/vue/chunks/nginx.js +127 -0
- package/vue/chunks/nim.js +174 -0
- package/vue/chunks/nix.js +334 -0
- package/vue/chunks/node-repl.js +20 -0
- package/vue/chunks/nsis.js +515 -0
- package/vue/chunks/objectivec.js +235 -0
- package/vue/chunks/ocaml.js +52 -0
- package/vue/chunks/openscad.js +66 -0
- package/vue/chunks/oxygene.js +58 -0
- package/vue/chunks/parser3.js +40 -0
- package/vue/chunks/perl.js +454 -0
- package/vue/chunks/pf.js +30 -0
- package/vue/chunks/pgsql.js +196 -0
- package/vue/chunks/php-template.js +43 -0
- package/vue/chunks/php.js +527 -0
- package/vue/chunks/plaintext.js +10 -0
- package/vue/chunks/pony.js +60 -0
- package/vue/chunks/powershell.js +208 -0
- package/vue/chunks/processing.js +407 -0
- package/vue/chunks/profile.js +38 -0
- package/vue/chunks/prolog.js +62 -0
- package/vue/chunks/properties.js +45 -0
- package/vue/chunks/protobuf.js +63 -0
- package/vue/chunks/puppet.js +87 -0
- package/vue/chunks/purebasic.js +42 -0
- package/vue/chunks/python-repl.js +19 -0
- package/vue/chunks/python.js +357 -0
- package/vue/chunks/q.js +21 -0
- package/vue/chunks/qml.js +134 -0
- package/vue/chunks/r.js +145 -0
- package/vue/chunks/reasonml.js +134 -0
- package/vue/chunks/rib.js +16 -0
- package/vue/chunks/roboconf.js +54 -0
- package/vue/chunks/routeros.js +109 -0
- package/vue/chunks/rsl.js +138 -0
- package/vue/chunks/ruby.js +322 -0
- package/vue/chunks/ruleslanguage.js +26 -0
- package/vue/chunks/rust.js +296 -0
- package/vue/chunks/sas.js +533 -0
- package/vue/chunks/scala.js +173 -0
- package/vue/chunks/scheme.js +118 -0
- package/vue/chunks/scilab.js +45 -0
- package/vue/chunks/scss.js +900 -0
- package/vue/chunks/shell.js +18 -0
- package/vue/chunks/smali.js +113 -0
- package/vue/chunks/smalltalk.js +59 -0
- package/vue/chunks/sml.js +49 -0
- package/vue/chunks/sqf.js +2599 -0
- package/vue/chunks/sql.js +624 -0
- package/vue/chunks/stan.js +471 -0
- package/vue/chunks/stata.js +33 -0
- package/vue/chunks/step21.js +53 -0
- package/vue/chunks/stylus.js +925 -0
- package/vue/chunks/subunit.js +34 -0
- package/vue/chunks/swift.js +699 -0
- package/vue/chunks/taggerscript.js +37 -0
- package/vue/chunks/tap.js +30 -0
- package/vue/chunks/tcl.js +165 -0
- package/vue/chunks/thrift.js +65 -0
- package/vue/chunks/tp.js +155 -0
- package/vue/chunks/twig.js +232 -0
- package/vue/chunks/typescript.js +672 -0
- package/vue/chunks/vala.js +39 -0
- package/vue/chunks/vbnet.js +86 -0
- package/vue/chunks/vbscript-html.js +14 -0
- package/vue/chunks/vbscript.js +200 -0
- package/vue/chunks/verilog.js +534 -0
- package/vue/chunks/vhdl.js +190 -0
- package/vue/chunks/vim.js +54 -0
- package/vue/chunks/wasm.js +111 -0
- package/vue/chunks/wren.js +229 -0
- package/vue/chunks/x86asm.js +64 -0
- package/vue/chunks/xl.js +192 -0
- package/vue/chunks/xml.js +175 -0
- package/vue/chunks/xquery.js +303 -0
- package/vue/chunks/yaml.js +159 -0
- package/vue/chunks/zephir.js +74 -0
- package/vue/components.css +204 -170
- package/vue/editor/LoomaEditor.d.ts +7 -7
- package/vue/editor/code-language-catalog.d.ts +196 -0
- package/vue/editor/index.js +290 -20
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/highlight.js@11.11.2/node_modules/highlight.js/es/languages/basic.js
|
|
2
|
+
/** @type LanguageFn */
|
|
3
|
+
function basic(hljs) {
|
|
4
|
+
return {
|
|
5
|
+
name: "BASIC",
|
|
6
|
+
case_insensitive: true,
|
|
7
|
+
illegal: "^.",
|
|
8
|
+
keywords: {
|
|
9
|
+
$pattern: "[a-zA-Z][a-zA-Z0-9_$%!#]*",
|
|
10
|
+
keyword: [
|
|
11
|
+
"ABS",
|
|
12
|
+
"ASC",
|
|
13
|
+
"AND",
|
|
14
|
+
"ATN",
|
|
15
|
+
"AUTO|0",
|
|
16
|
+
"BEEP",
|
|
17
|
+
"BLOAD|10",
|
|
18
|
+
"BSAVE|10",
|
|
19
|
+
"CALL",
|
|
20
|
+
"CALLS",
|
|
21
|
+
"CDBL",
|
|
22
|
+
"CHAIN",
|
|
23
|
+
"CHDIR",
|
|
24
|
+
"CHR$|10",
|
|
25
|
+
"CINT",
|
|
26
|
+
"CIRCLE",
|
|
27
|
+
"CLEAR",
|
|
28
|
+
"CLOSE",
|
|
29
|
+
"CLS",
|
|
30
|
+
"COLOR",
|
|
31
|
+
"COM",
|
|
32
|
+
"COMMON",
|
|
33
|
+
"CONT",
|
|
34
|
+
"COS",
|
|
35
|
+
"CSNG",
|
|
36
|
+
"CSRLIN",
|
|
37
|
+
"CVD",
|
|
38
|
+
"CVI",
|
|
39
|
+
"CVS",
|
|
40
|
+
"DATA",
|
|
41
|
+
"DATE$",
|
|
42
|
+
"DEFDBL",
|
|
43
|
+
"DEFINT",
|
|
44
|
+
"DEFSNG",
|
|
45
|
+
"DEFSTR",
|
|
46
|
+
"DEF|0",
|
|
47
|
+
"SEG",
|
|
48
|
+
"USR",
|
|
49
|
+
"DELETE",
|
|
50
|
+
"DIM",
|
|
51
|
+
"DRAW",
|
|
52
|
+
"EDIT",
|
|
53
|
+
"END",
|
|
54
|
+
"ENVIRON",
|
|
55
|
+
"ENVIRON$",
|
|
56
|
+
"EOF",
|
|
57
|
+
"EQV",
|
|
58
|
+
"ERASE",
|
|
59
|
+
"ERDEV",
|
|
60
|
+
"ERDEV$",
|
|
61
|
+
"ERL",
|
|
62
|
+
"ERR",
|
|
63
|
+
"ERROR",
|
|
64
|
+
"EXP",
|
|
65
|
+
"FIELD",
|
|
66
|
+
"FILES",
|
|
67
|
+
"FIX",
|
|
68
|
+
"FOR|0",
|
|
69
|
+
"FRE",
|
|
70
|
+
"GET",
|
|
71
|
+
"GOSUB|10",
|
|
72
|
+
"GOTO",
|
|
73
|
+
"HEX$",
|
|
74
|
+
"IF",
|
|
75
|
+
"THEN",
|
|
76
|
+
"ELSE|0",
|
|
77
|
+
"INKEY$",
|
|
78
|
+
"INP",
|
|
79
|
+
"INPUT",
|
|
80
|
+
"INPUT#",
|
|
81
|
+
"INPUT$",
|
|
82
|
+
"INSTR",
|
|
83
|
+
"IMP",
|
|
84
|
+
"INT",
|
|
85
|
+
"IOCTL",
|
|
86
|
+
"IOCTL$",
|
|
87
|
+
"KEY",
|
|
88
|
+
"ON",
|
|
89
|
+
"OFF",
|
|
90
|
+
"LIST",
|
|
91
|
+
"KILL",
|
|
92
|
+
"LEFT$",
|
|
93
|
+
"LEN",
|
|
94
|
+
"LET",
|
|
95
|
+
"LINE",
|
|
96
|
+
"LLIST",
|
|
97
|
+
"LOAD",
|
|
98
|
+
"LOC",
|
|
99
|
+
"LOCATE",
|
|
100
|
+
"LOF",
|
|
101
|
+
"LOG",
|
|
102
|
+
"LPRINT",
|
|
103
|
+
"USING",
|
|
104
|
+
"LSET",
|
|
105
|
+
"MERGE",
|
|
106
|
+
"MID$",
|
|
107
|
+
"MKDIR",
|
|
108
|
+
"MKD$",
|
|
109
|
+
"MKI$",
|
|
110
|
+
"MKS$",
|
|
111
|
+
"MOD",
|
|
112
|
+
"NAME",
|
|
113
|
+
"NEW",
|
|
114
|
+
"NEXT",
|
|
115
|
+
"NOISE",
|
|
116
|
+
"NOT",
|
|
117
|
+
"OCT$",
|
|
118
|
+
"ON",
|
|
119
|
+
"OR",
|
|
120
|
+
"PEN",
|
|
121
|
+
"PLAY",
|
|
122
|
+
"STRIG",
|
|
123
|
+
"OPEN",
|
|
124
|
+
"OPTION",
|
|
125
|
+
"BASE",
|
|
126
|
+
"OUT",
|
|
127
|
+
"PAINT",
|
|
128
|
+
"PALETTE",
|
|
129
|
+
"PCOPY",
|
|
130
|
+
"PEEK",
|
|
131
|
+
"PMAP",
|
|
132
|
+
"POINT",
|
|
133
|
+
"POKE",
|
|
134
|
+
"POS",
|
|
135
|
+
"PRINT",
|
|
136
|
+
"PRINT]",
|
|
137
|
+
"PSET",
|
|
138
|
+
"PRESET",
|
|
139
|
+
"PUT",
|
|
140
|
+
"RANDOMIZE",
|
|
141
|
+
"READ",
|
|
142
|
+
"REM",
|
|
143
|
+
"RENUM",
|
|
144
|
+
"RESET|0",
|
|
145
|
+
"RESTORE",
|
|
146
|
+
"RESUME",
|
|
147
|
+
"RETURN|0",
|
|
148
|
+
"RIGHT$",
|
|
149
|
+
"RMDIR",
|
|
150
|
+
"RND",
|
|
151
|
+
"RSET",
|
|
152
|
+
"RUN",
|
|
153
|
+
"SAVE",
|
|
154
|
+
"SCREEN",
|
|
155
|
+
"SGN",
|
|
156
|
+
"SHELL",
|
|
157
|
+
"SIN",
|
|
158
|
+
"SOUND",
|
|
159
|
+
"SPACE$",
|
|
160
|
+
"SPC",
|
|
161
|
+
"SQR",
|
|
162
|
+
"STEP",
|
|
163
|
+
"STICK",
|
|
164
|
+
"STOP",
|
|
165
|
+
"STR$",
|
|
166
|
+
"STRING$",
|
|
167
|
+
"SWAP",
|
|
168
|
+
"SYSTEM",
|
|
169
|
+
"TAB",
|
|
170
|
+
"TAN",
|
|
171
|
+
"TIME$",
|
|
172
|
+
"TIMER",
|
|
173
|
+
"TROFF",
|
|
174
|
+
"TRON",
|
|
175
|
+
"TO",
|
|
176
|
+
"USR",
|
|
177
|
+
"VAL",
|
|
178
|
+
"VARPTR",
|
|
179
|
+
"VARPTR$",
|
|
180
|
+
"VIEW",
|
|
181
|
+
"WAIT",
|
|
182
|
+
"WHILE",
|
|
183
|
+
"WEND",
|
|
184
|
+
"WIDTH",
|
|
185
|
+
"WINDOW",
|
|
186
|
+
"WRITE",
|
|
187
|
+
"XOR"
|
|
188
|
+
]
|
|
189
|
+
},
|
|
190
|
+
contains: [
|
|
191
|
+
{
|
|
192
|
+
scope: "string",
|
|
193
|
+
begin: /"/,
|
|
194
|
+
end: /"|$/,
|
|
195
|
+
contains: [hljs.BACKSLASH_ESCAPE]
|
|
196
|
+
},
|
|
197
|
+
hljs.COMMENT("REM", "$", { relevance: 10 }),
|
|
198
|
+
hljs.COMMENT("'", "$", { relevance: 0 }),
|
|
199
|
+
{
|
|
200
|
+
className: "symbol",
|
|
201
|
+
begin: "^[0-9]+ ",
|
|
202
|
+
relevance: 10
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
className: "number",
|
|
206
|
+
begin: "\\b\\d+(\\.\\d+)?([edED]\\d+)?[#!]?",
|
|
207
|
+
relevance: 0
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
className: "number",
|
|
211
|
+
begin: "(&[hH][0-9a-fA-F]{1,4})"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
className: "number",
|
|
215
|
+
begin: "(&[oO][0-7]{1,6})"
|
|
216
|
+
}
|
|
217
|
+
]
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
//#endregion
|
|
221
|
+
export { basic as default };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/highlight.js@11.11.2/node_modules/highlight.js/es/languages/bnf.js
|
|
2
|
+
/** @type LanguageFn */
|
|
3
|
+
function bnf(hljs) {
|
|
4
|
+
return {
|
|
5
|
+
name: "Backus–Naur Form",
|
|
6
|
+
contains: [{
|
|
7
|
+
className: "attribute",
|
|
8
|
+
begin: /</,
|
|
9
|
+
end: />/
|
|
10
|
+
}, {
|
|
11
|
+
begin: /::=/,
|
|
12
|
+
end: /$/,
|
|
13
|
+
contains: [
|
|
14
|
+
{
|
|
15
|
+
begin: /</,
|
|
16
|
+
end: />/
|
|
17
|
+
},
|
|
18
|
+
hljs.C_LINE_COMMENT_MODE,
|
|
19
|
+
hljs.C_BLOCK_COMMENT_MODE,
|
|
20
|
+
hljs.APOS_STRING_MODE,
|
|
21
|
+
hljs.QUOTE_STRING_MODE
|
|
22
|
+
]
|
|
23
|
+
}]
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { bnf as default };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/highlight.js@11.11.2/node_modules/highlight.js/es/languages/brainfuck.js
|
|
2
|
+
/** @type LanguageFn */
|
|
3
|
+
function brainfuck(hljs) {
|
|
4
|
+
const LITERAL = {
|
|
5
|
+
className: "literal",
|
|
6
|
+
begin: /[+-]+/,
|
|
7
|
+
relevance: 0
|
|
8
|
+
};
|
|
9
|
+
return {
|
|
10
|
+
name: "Brainfuck",
|
|
11
|
+
aliases: ["bf"],
|
|
12
|
+
contains: [
|
|
13
|
+
hljs.COMMENT(/[^\[\]\.,\+\-<> \r\n]/, /[\[\]\.,\+\-<> \r\n]/, {
|
|
14
|
+
contains: [{
|
|
15
|
+
match: /[ ]+[^\[\]\.,\+\-<> \r\n]/,
|
|
16
|
+
relevance: 0
|
|
17
|
+
}],
|
|
18
|
+
returnEnd: true,
|
|
19
|
+
relevance: 0
|
|
20
|
+
}),
|
|
21
|
+
{
|
|
22
|
+
className: "title",
|
|
23
|
+
begin: "[\\[\\]]",
|
|
24
|
+
relevance: 0
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
className: "string",
|
|
28
|
+
begin: "[\\.,]",
|
|
29
|
+
relevance: 0
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
begin: /(?=\+\+|--)/,
|
|
33
|
+
contains: [LITERAL]
|
|
34
|
+
},
|
|
35
|
+
LITERAL
|
|
36
|
+
]
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { brainfuck as default };
|
package/vue/chunks/c.js
ADDED
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/highlight.js@11.11.2/node_modules/highlight.js/es/languages/c.js
|
|
2
|
+
/** @type LanguageFn */
|
|
3
|
+
function c(hljs) {
|
|
4
|
+
const regex = hljs.regex;
|
|
5
|
+
const C_LINE_COMMENT_MODE = hljs.COMMENT("//", "$", { contains: [{ begin: /\\\n/ }] });
|
|
6
|
+
const DECLTYPE_AUTO_RE = "decltype\\(auto\\)";
|
|
7
|
+
const NAMESPACE_RE = "[a-zA-Z_]\\w*::";
|
|
8
|
+
const FUNCTION_TYPE_RE = "(decltype\\(auto\\)|" + regex.optional(NAMESPACE_RE) + "[a-zA-Z_]\\w*" + regex.optional("<[^<>]+>") + ")";
|
|
9
|
+
const TYPES = {
|
|
10
|
+
className: "type",
|
|
11
|
+
variants: [{ begin: "\\b[a-z\\d_]*_t\\b" }, { match: /\batomic_[a-z]{3,6}\b/ }]
|
|
12
|
+
};
|
|
13
|
+
const STRINGS = {
|
|
14
|
+
className: "string",
|
|
15
|
+
variants: [
|
|
16
|
+
{
|
|
17
|
+
begin: "(u8?|U|L)?\"",
|
|
18
|
+
end: "\"",
|
|
19
|
+
illegal: "\\n",
|
|
20
|
+
contains: [hljs.BACKSLASH_ESCAPE]
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
begin: "(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",
|
|
24
|
+
end: "'",
|
|
25
|
+
illegal: "."
|
|
26
|
+
},
|
|
27
|
+
hljs.END_SAME_AS_BEGIN({
|
|
28
|
+
begin: /(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,
|
|
29
|
+
end: /\)([^()\\ ]{0,16})"/
|
|
30
|
+
})
|
|
31
|
+
]
|
|
32
|
+
};
|
|
33
|
+
const NUMBERS = {
|
|
34
|
+
className: "number",
|
|
35
|
+
variants: [
|
|
36
|
+
{ match: /\b(0b[01']+)/ },
|
|
37
|
+
{ match: /(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/ },
|
|
38
|
+
{ match: /(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/ },
|
|
39
|
+
{ match: /(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/ }
|
|
40
|
+
],
|
|
41
|
+
relevance: 0
|
|
42
|
+
};
|
|
43
|
+
const PREPROCESSOR = {
|
|
44
|
+
className: "meta",
|
|
45
|
+
begin: /#\s*[a-z]+\b/,
|
|
46
|
+
end: /$/,
|
|
47
|
+
keywords: { keyword: "if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include" },
|
|
48
|
+
contains: [
|
|
49
|
+
{
|
|
50
|
+
begin: /\\\n/,
|
|
51
|
+
relevance: 0
|
|
52
|
+
},
|
|
53
|
+
hljs.inherit(STRINGS, { className: "string" }),
|
|
54
|
+
{
|
|
55
|
+
className: "string",
|
|
56
|
+
begin: /<.*?>/
|
|
57
|
+
},
|
|
58
|
+
C_LINE_COMMENT_MODE,
|
|
59
|
+
hljs.C_BLOCK_COMMENT_MODE
|
|
60
|
+
]
|
|
61
|
+
};
|
|
62
|
+
const TITLE_MODE = {
|
|
63
|
+
className: "title",
|
|
64
|
+
begin: regex.optional(NAMESPACE_RE) + hljs.IDENT_RE,
|
|
65
|
+
relevance: 0
|
|
66
|
+
};
|
|
67
|
+
const FUNCTION_TITLE = regex.optional(NAMESPACE_RE) + hljs.IDENT_RE + "\\s*\\(";
|
|
68
|
+
const KEYWORDS = {
|
|
69
|
+
keyword: [
|
|
70
|
+
"asm",
|
|
71
|
+
"auto",
|
|
72
|
+
"break",
|
|
73
|
+
"case",
|
|
74
|
+
"continue",
|
|
75
|
+
"default",
|
|
76
|
+
"do",
|
|
77
|
+
"else",
|
|
78
|
+
"enum",
|
|
79
|
+
"extern",
|
|
80
|
+
"for",
|
|
81
|
+
"fortran",
|
|
82
|
+
"goto",
|
|
83
|
+
"if",
|
|
84
|
+
"inline",
|
|
85
|
+
"register",
|
|
86
|
+
"restrict",
|
|
87
|
+
"return",
|
|
88
|
+
"sizeof",
|
|
89
|
+
"typeof",
|
|
90
|
+
"typeof_unqual",
|
|
91
|
+
"struct",
|
|
92
|
+
"switch",
|
|
93
|
+
"typedef",
|
|
94
|
+
"union",
|
|
95
|
+
"volatile",
|
|
96
|
+
"while",
|
|
97
|
+
"_Alignas",
|
|
98
|
+
"_Alignof",
|
|
99
|
+
"_Atomic",
|
|
100
|
+
"_Generic",
|
|
101
|
+
"_Noreturn",
|
|
102
|
+
"_Static_assert",
|
|
103
|
+
"_Thread_local",
|
|
104
|
+
"alignas",
|
|
105
|
+
"alignof",
|
|
106
|
+
"noreturn",
|
|
107
|
+
"static_assert",
|
|
108
|
+
"thread_local",
|
|
109
|
+
"_Pragma"
|
|
110
|
+
],
|
|
111
|
+
type: [
|
|
112
|
+
"float",
|
|
113
|
+
"double",
|
|
114
|
+
"signed",
|
|
115
|
+
"unsigned",
|
|
116
|
+
"int",
|
|
117
|
+
"short",
|
|
118
|
+
"long",
|
|
119
|
+
"char",
|
|
120
|
+
"void",
|
|
121
|
+
"_Bool",
|
|
122
|
+
"_BitInt",
|
|
123
|
+
"_Complex",
|
|
124
|
+
"_Imaginary",
|
|
125
|
+
"_Decimal32",
|
|
126
|
+
"_Decimal64",
|
|
127
|
+
"_Decimal96",
|
|
128
|
+
"_Decimal128",
|
|
129
|
+
"_Decimal64x",
|
|
130
|
+
"_Decimal128x",
|
|
131
|
+
"_Float16",
|
|
132
|
+
"_Float32",
|
|
133
|
+
"_Float64",
|
|
134
|
+
"_Float128",
|
|
135
|
+
"_Float32x",
|
|
136
|
+
"_Float64x",
|
|
137
|
+
"_Float128x",
|
|
138
|
+
"const",
|
|
139
|
+
"static",
|
|
140
|
+
"constexpr",
|
|
141
|
+
"complex",
|
|
142
|
+
"bool",
|
|
143
|
+
"imaginary"
|
|
144
|
+
],
|
|
145
|
+
literal: "true false NULL",
|
|
146
|
+
built_in: "std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"
|
|
147
|
+
};
|
|
148
|
+
const EXPRESSION_CONTAINS = [
|
|
149
|
+
PREPROCESSOR,
|
|
150
|
+
TYPES,
|
|
151
|
+
C_LINE_COMMENT_MODE,
|
|
152
|
+
hljs.C_BLOCK_COMMENT_MODE,
|
|
153
|
+
NUMBERS,
|
|
154
|
+
STRINGS
|
|
155
|
+
];
|
|
156
|
+
const EXPRESSION_CONTEXT = {
|
|
157
|
+
variants: [
|
|
158
|
+
{
|
|
159
|
+
begin: /=/,
|
|
160
|
+
end: /;/
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
begin: /\(/,
|
|
164
|
+
end: /\)/
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
beginKeywords: "new throw return else",
|
|
168
|
+
end: /;/
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
keywords: KEYWORDS,
|
|
172
|
+
contains: EXPRESSION_CONTAINS.concat([{
|
|
173
|
+
begin: /\(/,
|
|
174
|
+
end: /\)/,
|
|
175
|
+
keywords: KEYWORDS,
|
|
176
|
+
contains: EXPRESSION_CONTAINS.concat(["self"]),
|
|
177
|
+
relevance: 0
|
|
178
|
+
}]),
|
|
179
|
+
relevance: 0
|
|
180
|
+
};
|
|
181
|
+
const FUNCTION_DECLARATION = {
|
|
182
|
+
begin: "(" + FUNCTION_TYPE_RE + "[\\*&\\s]+)+" + FUNCTION_TITLE,
|
|
183
|
+
returnBegin: true,
|
|
184
|
+
end: /[{;=]/,
|
|
185
|
+
excludeEnd: true,
|
|
186
|
+
keywords: KEYWORDS,
|
|
187
|
+
illegal: /[^\w\s\*&:<>.]/,
|
|
188
|
+
contains: [
|
|
189
|
+
{
|
|
190
|
+
begin: DECLTYPE_AUTO_RE,
|
|
191
|
+
keywords: KEYWORDS,
|
|
192
|
+
relevance: 0
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
begin: FUNCTION_TITLE,
|
|
196
|
+
returnBegin: true,
|
|
197
|
+
contains: [hljs.inherit(TITLE_MODE, { className: "title.function" })],
|
|
198
|
+
relevance: 0
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
relevance: 0,
|
|
202
|
+
match: /,/
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
className: "params",
|
|
206
|
+
begin: /\(/,
|
|
207
|
+
end: /\)/,
|
|
208
|
+
keywords: KEYWORDS,
|
|
209
|
+
relevance: 0,
|
|
210
|
+
contains: [
|
|
211
|
+
C_LINE_COMMENT_MODE,
|
|
212
|
+
hljs.C_BLOCK_COMMENT_MODE,
|
|
213
|
+
STRINGS,
|
|
214
|
+
NUMBERS,
|
|
215
|
+
TYPES,
|
|
216
|
+
{
|
|
217
|
+
begin: /\(/,
|
|
218
|
+
end: /\)/,
|
|
219
|
+
keywords: KEYWORDS,
|
|
220
|
+
relevance: 0,
|
|
221
|
+
contains: [
|
|
222
|
+
"self",
|
|
223
|
+
C_LINE_COMMENT_MODE,
|
|
224
|
+
hljs.C_BLOCK_COMMENT_MODE,
|
|
225
|
+
STRINGS,
|
|
226
|
+
NUMBERS,
|
|
227
|
+
TYPES
|
|
228
|
+
]
|
|
229
|
+
}
|
|
230
|
+
]
|
|
231
|
+
},
|
|
232
|
+
TYPES,
|
|
233
|
+
C_LINE_COMMENT_MODE,
|
|
234
|
+
hljs.C_BLOCK_COMMENT_MODE,
|
|
235
|
+
PREPROCESSOR
|
|
236
|
+
]
|
|
237
|
+
};
|
|
238
|
+
return {
|
|
239
|
+
name: "C",
|
|
240
|
+
aliases: ["h"],
|
|
241
|
+
keywords: KEYWORDS,
|
|
242
|
+
disableAutodetect: true,
|
|
243
|
+
illegal: "</",
|
|
244
|
+
contains: [].concat(EXPRESSION_CONTEXT, FUNCTION_DECLARATION, EXPRESSION_CONTAINS, [
|
|
245
|
+
PREPROCESSOR,
|
|
246
|
+
{
|
|
247
|
+
begin: hljs.IDENT_RE + "::",
|
|
248
|
+
keywords: KEYWORDS
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
className: "class",
|
|
252
|
+
beginKeywords: "enum class struct union",
|
|
253
|
+
end: /[{;:<>=]/,
|
|
254
|
+
contains: [{ beginKeywords: "final class struct" }, hljs.TITLE_MODE]
|
|
255
|
+
}
|
|
256
|
+
]),
|
|
257
|
+
exports: {
|
|
258
|
+
preprocessor: PREPROCESSOR,
|
|
259
|
+
strings: STRINGS,
|
|
260
|
+
keywords: KEYWORDS
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
//#endregion
|
|
265
|
+
export { c as default };
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/highlight.js@11.11.2/node_modules/highlight.js/es/languages/cal.js
|
|
2
|
+
/** @type LanguageFn */
|
|
3
|
+
function cal(hljs) {
|
|
4
|
+
const regex = hljs.regex;
|
|
5
|
+
const KEYWORDS = [
|
|
6
|
+
"div",
|
|
7
|
+
"mod",
|
|
8
|
+
"in",
|
|
9
|
+
"and",
|
|
10
|
+
"or",
|
|
11
|
+
"not",
|
|
12
|
+
"xor",
|
|
13
|
+
"asserterror",
|
|
14
|
+
"begin",
|
|
15
|
+
"case",
|
|
16
|
+
"do",
|
|
17
|
+
"downto",
|
|
18
|
+
"else",
|
|
19
|
+
"end",
|
|
20
|
+
"exit",
|
|
21
|
+
"for",
|
|
22
|
+
"local",
|
|
23
|
+
"if",
|
|
24
|
+
"of",
|
|
25
|
+
"repeat",
|
|
26
|
+
"then",
|
|
27
|
+
"to",
|
|
28
|
+
"until",
|
|
29
|
+
"while",
|
|
30
|
+
"with",
|
|
31
|
+
"var"
|
|
32
|
+
];
|
|
33
|
+
const LITERALS = "false true";
|
|
34
|
+
const COMMENT_MODES = [
|
|
35
|
+
hljs.C_LINE_COMMENT_MODE,
|
|
36
|
+
hljs.COMMENT(/\{/, /\}/, { relevance: 0 }),
|
|
37
|
+
hljs.COMMENT(/\(\*/, /\*\)/, { relevance: 10 })
|
|
38
|
+
];
|
|
39
|
+
const STRING = {
|
|
40
|
+
className: "string",
|
|
41
|
+
begin: /'/,
|
|
42
|
+
end: /'/,
|
|
43
|
+
contains: [{ begin: /''/ }]
|
|
44
|
+
};
|
|
45
|
+
const CHAR_STRING = {
|
|
46
|
+
className: "string",
|
|
47
|
+
begin: /(#\d+)+/
|
|
48
|
+
};
|
|
49
|
+
const DATE = {
|
|
50
|
+
className: "number",
|
|
51
|
+
begin: "\\b\\d+(\\.\\d+)?(DT|D|T)",
|
|
52
|
+
relevance: 0
|
|
53
|
+
};
|
|
54
|
+
const DBL_QUOTED_VARIABLE = {
|
|
55
|
+
className: "string",
|
|
56
|
+
begin: "\"",
|
|
57
|
+
end: "\""
|
|
58
|
+
};
|
|
59
|
+
const PROCEDURE = {
|
|
60
|
+
match: [
|
|
61
|
+
/procedure/,
|
|
62
|
+
/\s+/,
|
|
63
|
+
/[a-zA-Z_][\w@]*/,
|
|
64
|
+
/\s*/
|
|
65
|
+
],
|
|
66
|
+
scope: {
|
|
67
|
+
1: "keyword",
|
|
68
|
+
3: "title.function"
|
|
69
|
+
},
|
|
70
|
+
contains: [{
|
|
71
|
+
className: "params",
|
|
72
|
+
begin: /\(/,
|
|
73
|
+
end: /\)/,
|
|
74
|
+
keywords: KEYWORDS,
|
|
75
|
+
contains: [
|
|
76
|
+
STRING,
|
|
77
|
+
CHAR_STRING,
|
|
78
|
+
hljs.NUMBER_MODE
|
|
79
|
+
]
|
|
80
|
+
}, ...COMMENT_MODES]
|
|
81
|
+
};
|
|
82
|
+
const OBJECT = {
|
|
83
|
+
match: [
|
|
84
|
+
/OBJECT/,
|
|
85
|
+
/\s+/,
|
|
86
|
+
regex.either(...[
|
|
87
|
+
"Table",
|
|
88
|
+
"Form",
|
|
89
|
+
"Report",
|
|
90
|
+
"Dataport",
|
|
91
|
+
"Codeunit",
|
|
92
|
+
"XMLport",
|
|
93
|
+
"MenuSuite",
|
|
94
|
+
"Page",
|
|
95
|
+
"Query"
|
|
96
|
+
]),
|
|
97
|
+
/\s+/,
|
|
98
|
+
/\d+/,
|
|
99
|
+
/\s+(?=[^\s])/,
|
|
100
|
+
/.*/,
|
|
101
|
+
/$/
|
|
102
|
+
],
|
|
103
|
+
relevance: 3,
|
|
104
|
+
scope: {
|
|
105
|
+
1: "keyword",
|
|
106
|
+
3: "type",
|
|
107
|
+
5: "number",
|
|
108
|
+
7: "title"
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
return {
|
|
112
|
+
name: "C/AL",
|
|
113
|
+
case_insensitive: true,
|
|
114
|
+
keywords: {
|
|
115
|
+
keyword: KEYWORDS,
|
|
116
|
+
literal: LITERALS
|
|
117
|
+
},
|
|
118
|
+
illegal: /\/\*/,
|
|
119
|
+
contains: [
|
|
120
|
+
{
|
|
121
|
+
match: /[\w]+(?=\=)/,
|
|
122
|
+
scope: "attribute",
|
|
123
|
+
relevance: 0
|
|
124
|
+
},
|
|
125
|
+
STRING,
|
|
126
|
+
CHAR_STRING,
|
|
127
|
+
DATE,
|
|
128
|
+
DBL_QUOTED_VARIABLE,
|
|
129
|
+
hljs.NUMBER_MODE,
|
|
130
|
+
OBJECT,
|
|
131
|
+
PROCEDURE
|
|
132
|
+
]
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
//#endregion
|
|
136
|
+
export { cal as default };
|