@aiao/code-editor 0.0.7 → 0.0.8

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.
Files changed (125) hide show
  1. package/dist/apl-B2DGVGxc.js +76 -0
  2. package/dist/asciiarmor-2LVJmxlE.js +34 -0
  3. package/dist/asn1-jKiBa2Ya.js +95 -0
  4. package/dist/asterisk-DS281yxp.js +271 -0
  5. package/dist/brainfuck-C_p9pTT8.js +34 -0
  6. package/dist/clike-BMALKCNj.js +620 -0
  7. package/dist/clojure-CCKyeQKf.js +800 -0
  8. package/dist/cmake-CuaCgAKt.js +28 -0
  9. package/dist/cobol-BlTKFDRj.js +72 -0
  10. package/dist/coffeescript-BVCvwO8I.js +179 -0
  11. package/dist/commonlisp-D_kxz07b.js +75 -0
  12. package/dist/crystal-D309uH6_.js +217 -0
  13. package/dist/css-BkF-NPzE.js +1553 -0
  14. package/dist/cypher-BMq4Fwjl.js +68 -0
  15. package/dist/d-BZcgY6La.js +127 -0
  16. package/dist/diff-Cg9d_RX2.js +18 -0
  17. package/dist/dockerfile-DFX8bq9N.js +194 -0
  18. package/dist/dtd-CtLokQ-U.js +84 -0
  19. package/dist/dylan-QYeExnWK.js +234 -0
  20. package/dist/ebnf-DUPDuY4r.js +78 -0
  21. package/dist/ecl-CiXN-g_D.js +121 -0
  22. package/dist/eiffel-yQhjl4T1.js +110 -0
  23. package/dist/elm-CNT9vbN0.js +108 -0
  24. package/dist/erlang-CFOYdy9e.js +487 -0
  25. package/dist/factor-Clf6BoVk.js +65 -0
  26. package/dist/fcl-CPC2WYrI.js +103 -0
  27. package/dist/forth-BmxRyE9S.js +60 -0
  28. package/dist/fortran-9bvPyrOW.js +442 -0
  29. package/dist/gas-cpmYfFX2.js +183 -0
  30. package/dist/gherkin-CJuwpceU.js +34 -0
  31. package/dist/groovy-DZeT_VM-.js +146 -0
  32. package/dist/haskell-CxiO_7JL.js +375 -0
  33. package/dist/haxe-70NVW1pR.js +359 -0
  34. package/dist/http-D9LttvKF.js +44 -0
  35. package/dist/idl-B6TRFYjl.js +947 -0
  36. package/dist/index-BMiCCEB1.js +309 -0
  37. package/dist/index-BNuasEBW.js +94 -0
  38. package/dist/index-Bg1KDWyt.js +290 -0
  39. package/dist/index-BuVm7ZG6.js +1305 -0
  40. package/dist/index-BvS1cnHq.js +613 -0
  41. package/dist/index-C44L0DmY.js +138 -0
  42. package/dist/index-C71CZfUx.js +247 -0
  43. package/dist/index-CQ6JWNwi.js +566 -0
  44. package/dist/index-CpRVx97-.js +342 -0
  45. package/dist/index-CqvQj6d-.js +270 -0
  46. package/dist/index-CrbQBmWq.js +157 -0
  47. package/dist/index-CzovO10m.js +302 -0
  48. package/dist/index-D0BZOY-S.js +101 -0
  49. package/dist/index-D0svJS59.js +555 -0
  50. package/dist/index-D93XVMi1.js +136 -0
  51. package/dist/index-DEB5VK0f.js +252 -0
  52. package/dist/index-DIaXGPFp.js +12936 -0
  53. package/dist/index-Dp8osI_J.js +960 -0
  54. package/dist/index-Ds4AioqO.js +1918 -0
  55. package/dist/index-Dy-OpkyQ.js +76 -0
  56. package/dist/index-Dyi9rNIT.js +391 -0
  57. package/dist/index-ZJkjD9tT.js +74 -0
  58. package/dist/index-qH2lMs0G.js +945 -0
  59. package/dist/index-srIksFxX.js +59 -0
  60. package/dist/index.d.ts +1 -0
  61. package/dist/index.d.ts.map +1 -1
  62. package/dist/index.js +19 -1
  63. package/dist/javascript-DOuB9oqA.js +691 -0
  64. package/dist/julia-DpvXAuO6.js +241 -0
  65. package/dist/languages.d.ts +18 -0
  66. package/dist/languages.d.ts.map +1 -0
  67. package/dist/livescript-CanGTf8u.js +272 -0
  68. package/dist/lua-XplVlWi_.js +217 -0
  69. package/dist/mathematica-jaRHnSxC.js +35 -0
  70. package/dist/mbox-BctzC1hL.js +76 -0
  71. package/dist/mirc-CFBPAOaF.js +72 -0
  72. package/dist/mllike-BSnXJBGA.js +272 -0
  73. package/dist/modelica-vUgVs--1.js +93 -0
  74. package/dist/mscgen-Cpl0NYLN.js +104 -0
  75. package/dist/mumps-CQoS1kWX.js +25 -0
  76. package/dist/nginx-zDPm3Z74.js +89 -0
  77. package/dist/nsis-BCLyjY7m.js +62 -0
  78. package/dist/ntriples-CsNjv2QF.js +79 -0
  79. package/dist/octave-C8PmmSRH.js +143 -0
  80. package/dist/oz-Ce8aN8oE.js +151 -0
  81. package/dist/pascal-De0D6mP7.js +77 -0
  82. package/dist/perl-B4bSCe1C.js +915 -0
  83. package/dist/pig-D24Z8EXi.js +54 -0
  84. package/dist/powershell-DkYVfTzP.js +249 -0
  85. package/dist/properties-Dn9wna3M.js +26 -0
  86. package/dist/protobuf-BPIjwpzm.js +49 -0
  87. package/dist/pug-TGXr6c5j.js +248 -0
  88. package/dist/puppet-nyd4dhjf.js +45 -0
  89. package/dist/python-BkR3uSy8.js +313 -0
  90. package/dist/q-DyHZGnqm.js +86 -0
  91. package/dist/r-LKEuhEGI.js +104 -0
  92. package/dist/rpm-IznJm2Xc.js +57 -0
  93. package/dist/ruby-CcYfvIk6.js +228 -0
  94. package/dist/sas-7E8yHoCW.js +105 -0
  95. package/dist/scheme-DjibxsNh.js +124 -0
  96. package/dist/shell-C0C2sNA_.js +182 -0
  97. package/dist/sieve-Bwz7vjP5.js +72 -0
  98. package/dist/simple-mode-mNVtnu0l.js +89 -0
  99. package/dist/smalltalk-Bhddl2pB.js +48 -0
  100. package/dist/solr-BNlsLglM.js +41 -0
  101. package/dist/sparql-FarWu_Gb.js +197 -0
  102. package/dist/spreadsheet-C-cy4P5N.js +49 -0
  103. package/dist/sql-CfG5lQ3l.js +282 -0
  104. package/dist/stex-Du4h4KAU.js +129 -0
  105. package/dist/stylus-CAdqWld3.js +250 -0
  106. package/dist/swift-DSxqR9R6.js +230 -0
  107. package/dist/tcl-xfoLljhY.js +81 -0
  108. package/dist/textile-D1AWE-pc.js +295 -0
  109. package/dist/tiddlywiki-5wqsXtSk.js +155 -0
  110. package/dist/tiki-__Kn3CeS.js +181 -0
  111. package/dist/toml-DWAmxCjl.js +58 -0
  112. package/dist/troff-D2UO-fKf.js +35 -0
  113. package/dist/ttcn-Bsa4sfRm.js +123 -0
  114. package/dist/ttcn-cfg-Bac_acMi.js +88 -0
  115. package/dist/turtle-xwJUxoPV.js +80 -0
  116. package/dist/vb-c2kQGd6-.js +74 -0
  117. package/dist/vbscript-1f_Dhg5H.js +324 -0
  118. package/dist/velocity-DJd0pTTC.js +96 -0
  119. package/dist/verilog-CiS1jyi5.js +262 -0
  120. package/dist/vhdl-T9HkrbI2.js +106 -0
  121. package/dist/webidl-CjfDENEo.js +155 -0
  122. package/dist/xquery-Ct6lEb4B.js +422 -0
  123. package/dist/yacas-C0absKBh.js +73 -0
  124. package/dist/z80-Pki2zAjW.js +61 -0
  125. package/package.json +14 -8
@@ -0,0 +1,60 @@
1
+ function t(i) {
2
+ var n = [];
3
+ return i.split(" ").forEach(function(E) {
4
+ n.push({ name: E });
5
+ }), n;
6
+ }
7
+ var r = t(
8
+ "INVERT AND OR XOR 2* 2/ LSHIFT RSHIFT 0= = 0< < > U< MIN MAX 2DROP 2DUP 2OVER 2SWAP ?DUP DEPTH DROP DUP OVER ROT SWAP >R R> R@ + - 1+ 1- ABS NEGATE S>D * M* UM* FM/MOD SM/REM UM/MOD */ */MOD / /MOD MOD HERE , @ ! CELL+ CELLS C, C@ C! CHARS 2@ 2! ALIGN ALIGNED +! ALLOT CHAR [CHAR] [ ] BL FIND EXECUTE IMMEDIATE COUNT LITERAL STATE ; DOES> >BODY EVALUATE SOURCE >IN <# # #S #> HOLD SIGN BASE >NUMBER HEX DECIMAL FILL MOVE . CR EMIT SPACE SPACES TYPE U. .R U.R ACCEPT TRUE FALSE <> U> 0<> 0> NIP TUCK ROLL PICK 2>R 2R@ 2R> WITHIN UNUSED MARKER I J TO COMPILE, [COMPILE] SAVE-INPUT RESTORE-INPUT PAD ERASE 2LITERAL DNEGATE D- D+ D0< D0= D2* D2/ D< D= DMAX DMIN D>S DABS M+ M*/ D. D.R 2ROT DU< CATCH THROW FREE RESIZE ALLOCATE CS-PICK CS-ROLL GET-CURRENT SET-CURRENT FORTH-WORDLIST GET-ORDER SET-ORDER PREVIOUS SEARCH-WORDLIST WORDLIST FIND ALSO ONLY FORTH DEFINITIONS ORDER -TRAILING /STRING SEARCH COMPARE CMOVE CMOVE> BLANK SLITERAL"
9
+ ), O = t("IF ELSE THEN BEGIN WHILE REPEAT UNTIL RECURSE [IF] [ELSE] [THEN] ?DO DO LOOP +LOOP UNLOOP LEAVE EXIT AGAIN CASE OF ENDOF ENDCASE");
10
+ function R(i, n) {
11
+ var E;
12
+ for (E = i.length - 1; E >= 0; E--)
13
+ if (i[E].name === n.toUpperCase())
14
+ return i[E];
15
+ }
16
+ const L = {
17
+ name: "forth",
18
+ startState: function() {
19
+ return {
20
+ state: "",
21
+ base: 10,
22
+ coreWordList: r,
23
+ immediateWordList: O,
24
+ wordList: []
25
+ };
26
+ },
27
+ token: function(i, n) {
28
+ var E;
29
+ if (i.eatSpace())
30
+ return null;
31
+ if (n.state === "") {
32
+ if (i.match(/^(\]|:NONAME)(\s|$)/i))
33
+ return n.state = " compilation", "builtin";
34
+ if (E = i.match(/^(\:)\s+(\S+)(\s|$)+/), E)
35
+ return n.wordList.push({ name: E[2].toUpperCase() }), n.state = " compilation", "def";
36
+ if (E = i.match(/^(VARIABLE|2VARIABLE|CONSTANT|2CONSTANT|CREATE|POSTPONE|VALUE|WORD)\s+(\S+)(\s|$)+/i), E)
37
+ return n.wordList.push({ name: E[2].toUpperCase() }), "def";
38
+ if (E = i.match(/^(\'|\[\'\])\s+(\S+)(\s|$)+/), E)
39
+ return "builtin";
40
+ } else {
41
+ if (i.match(/^(\;|\[)(\s)/))
42
+ return n.state = "", i.backUp(1), "builtin";
43
+ if (i.match(/^(\;|\[)($)/))
44
+ return n.state = "", "builtin";
45
+ if (i.match(/^(POSTPONE)\s+\S+(\s|$)+/))
46
+ return "builtin";
47
+ }
48
+ if (E = i.match(/^(\S+)(\s+|$)/), E)
49
+ return R(n.wordList, E[1]) !== void 0 ? "variable" : E[1] === "\\" ? (i.skipToEnd(), "comment") : R(n.coreWordList, E[1]) !== void 0 ? "builtin" : R(n.immediateWordList, E[1]) !== void 0 ? "keyword" : E[1] === "(" ? (i.eatWhile(function(e) {
50
+ return e !== ")";
51
+ }), i.eat(")"), "comment") : E[1] === ".(" ? (i.eatWhile(function(e) {
52
+ return e !== ")";
53
+ }), i.eat(")"), "string") : E[1] === 'S"' || E[1] === '."' || E[1] === 'C"' ? (i.eatWhile(function(e) {
54
+ return e !== '"';
55
+ }), i.eat('"'), "string") : E[1] - 68719476735 ? "number" : "atom";
56
+ }
57
+ };
58
+ export {
59
+ L as forth
60
+ };
@@ -0,0 +1,442 @@
1
+ function r(t) {
2
+ for (var n = {}, e = 0; e < t.length; ++e)
3
+ n[t[e]] = !0;
4
+ return n;
5
+ }
6
+ var l = r([
7
+ "abstract",
8
+ "accept",
9
+ "allocatable",
10
+ "allocate",
11
+ "array",
12
+ "assign",
13
+ "asynchronous",
14
+ "backspace",
15
+ "bind",
16
+ "block",
17
+ "byte",
18
+ "call",
19
+ "case",
20
+ "class",
21
+ "close",
22
+ "common",
23
+ "contains",
24
+ "continue",
25
+ "cycle",
26
+ "data",
27
+ "deallocate",
28
+ "decode",
29
+ "deferred",
30
+ "dimension",
31
+ "do",
32
+ "elemental",
33
+ "else",
34
+ "encode",
35
+ "end",
36
+ "endif",
37
+ "entry",
38
+ "enumerator",
39
+ "equivalence",
40
+ "exit",
41
+ "external",
42
+ "extrinsic",
43
+ "final",
44
+ "forall",
45
+ "format",
46
+ "function",
47
+ "generic",
48
+ "go",
49
+ "goto",
50
+ "if",
51
+ "implicit",
52
+ "import",
53
+ "include",
54
+ "inquire",
55
+ "intent",
56
+ "interface",
57
+ "intrinsic",
58
+ "module",
59
+ "namelist",
60
+ "non_intrinsic",
61
+ "non_overridable",
62
+ "none",
63
+ "nopass",
64
+ "nullify",
65
+ "open",
66
+ "optional",
67
+ "options",
68
+ "parameter",
69
+ "pass",
70
+ "pause",
71
+ "pointer",
72
+ "print",
73
+ "private",
74
+ "program",
75
+ "protected",
76
+ "public",
77
+ "pure",
78
+ "read",
79
+ "recursive",
80
+ "result",
81
+ "return",
82
+ "rewind",
83
+ "save",
84
+ "select",
85
+ "sequence",
86
+ "stop",
87
+ "subroutine",
88
+ "target",
89
+ "then",
90
+ "to",
91
+ "type",
92
+ "use",
93
+ "value",
94
+ "volatile",
95
+ "where",
96
+ "while",
97
+ "write"
98
+ ]), s = r([
99
+ "abort",
100
+ "abs",
101
+ "access",
102
+ "achar",
103
+ "acos",
104
+ "adjustl",
105
+ "adjustr",
106
+ "aimag",
107
+ "aint",
108
+ "alarm",
109
+ "all",
110
+ "allocated",
111
+ "alog",
112
+ "amax",
113
+ "amin",
114
+ "amod",
115
+ "and",
116
+ "anint",
117
+ "any",
118
+ "asin",
119
+ "associated",
120
+ "atan",
121
+ "besj",
122
+ "besjn",
123
+ "besy",
124
+ "besyn",
125
+ "bit_size",
126
+ "btest",
127
+ "cabs",
128
+ "ccos",
129
+ "ceiling",
130
+ "cexp",
131
+ "char",
132
+ "chdir",
133
+ "chmod",
134
+ "clog",
135
+ "cmplx",
136
+ "command_argument_count",
137
+ "complex",
138
+ "conjg",
139
+ "cos",
140
+ "cosh",
141
+ "count",
142
+ "cpu_time",
143
+ "cshift",
144
+ "csin",
145
+ "csqrt",
146
+ "ctime",
147
+ "c_funloc",
148
+ "c_loc",
149
+ "c_associated",
150
+ "c_null_ptr",
151
+ "c_null_funptr",
152
+ "c_f_pointer",
153
+ "c_null_char",
154
+ "c_alert",
155
+ "c_backspace",
156
+ "c_form_feed",
157
+ "c_new_line",
158
+ "c_carriage_return",
159
+ "c_horizontal_tab",
160
+ "c_vertical_tab",
161
+ "dabs",
162
+ "dacos",
163
+ "dasin",
164
+ "datan",
165
+ "date_and_time",
166
+ "dbesj",
167
+ "dbesj",
168
+ "dbesjn",
169
+ "dbesy",
170
+ "dbesy",
171
+ "dbesyn",
172
+ "dble",
173
+ "dcos",
174
+ "dcosh",
175
+ "ddim",
176
+ "derf",
177
+ "derfc",
178
+ "dexp",
179
+ "digits",
180
+ "dim",
181
+ "dint",
182
+ "dlog",
183
+ "dlog",
184
+ "dmax",
185
+ "dmin",
186
+ "dmod",
187
+ "dnint",
188
+ "dot_product",
189
+ "dprod",
190
+ "dsign",
191
+ "dsinh",
192
+ "dsin",
193
+ "dsqrt",
194
+ "dtanh",
195
+ "dtan",
196
+ "dtime",
197
+ "eoshift",
198
+ "epsilon",
199
+ "erf",
200
+ "erfc",
201
+ "etime",
202
+ "exit",
203
+ "exp",
204
+ "exponent",
205
+ "extends_type_of",
206
+ "fdate",
207
+ "fget",
208
+ "fgetc",
209
+ "float",
210
+ "floor",
211
+ "flush",
212
+ "fnum",
213
+ "fputc",
214
+ "fput",
215
+ "fraction",
216
+ "fseek",
217
+ "fstat",
218
+ "ftell",
219
+ "gerror",
220
+ "getarg",
221
+ "get_command",
222
+ "get_command_argument",
223
+ "get_environment_variable",
224
+ "getcwd",
225
+ "getenv",
226
+ "getgid",
227
+ "getlog",
228
+ "getpid",
229
+ "getuid",
230
+ "gmtime",
231
+ "hostnm",
232
+ "huge",
233
+ "iabs",
234
+ "iachar",
235
+ "iand",
236
+ "iargc",
237
+ "ibclr",
238
+ "ibits",
239
+ "ibset",
240
+ "ichar",
241
+ "idate",
242
+ "idim",
243
+ "idint",
244
+ "idnint",
245
+ "ieor",
246
+ "ierrno",
247
+ "ifix",
248
+ "imag",
249
+ "imagpart",
250
+ "index",
251
+ "int",
252
+ "ior",
253
+ "irand",
254
+ "isatty",
255
+ "ishft",
256
+ "ishftc",
257
+ "isign",
258
+ "iso_c_binding",
259
+ "is_iostat_end",
260
+ "is_iostat_eor",
261
+ "itime",
262
+ "kill",
263
+ "kind",
264
+ "lbound",
265
+ "len",
266
+ "len_trim",
267
+ "lge",
268
+ "lgt",
269
+ "link",
270
+ "lle",
271
+ "llt",
272
+ "lnblnk",
273
+ "loc",
274
+ "log",
275
+ "logical",
276
+ "long",
277
+ "lshift",
278
+ "lstat",
279
+ "ltime",
280
+ "matmul",
281
+ "max",
282
+ "maxexponent",
283
+ "maxloc",
284
+ "maxval",
285
+ "mclock",
286
+ "merge",
287
+ "move_alloc",
288
+ "min",
289
+ "minexponent",
290
+ "minloc",
291
+ "minval",
292
+ "mod",
293
+ "modulo",
294
+ "mvbits",
295
+ "nearest",
296
+ "new_line",
297
+ "nint",
298
+ "not",
299
+ "or",
300
+ "pack",
301
+ "perror",
302
+ "precision",
303
+ "present",
304
+ "product",
305
+ "radix",
306
+ "rand",
307
+ "random_number",
308
+ "random_seed",
309
+ "range",
310
+ "real",
311
+ "realpart",
312
+ "rename",
313
+ "repeat",
314
+ "reshape",
315
+ "rrspacing",
316
+ "rshift",
317
+ "same_type_as",
318
+ "scale",
319
+ "scan",
320
+ "second",
321
+ "selected_int_kind",
322
+ "selected_real_kind",
323
+ "set_exponent",
324
+ "shape",
325
+ "short",
326
+ "sign",
327
+ "signal",
328
+ "sinh",
329
+ "sin",
330
+ "sleep",
331
+ "sngl",
332
+ "spacing",
333
+ "spread",
334
+ "sqrt",
335
+ "srand",
336
+ "stat",
337
+ "sum",
338
+ "symlnk",
339
+ "system",
340
+ "system_clock",
341
+ "tan",
342
+ "tanh",
343
+ "time",
344
+ "tiny",
345
+ "transfer",
346
+ "transpose",
347
+ "trim",
348
+ "ttynam",
349
+ "ubound",
350
+ "umask",
351
+ "unlink",
352
+ "unpack",
353
+ "verify",
354
+ "xor",
355
+ "zabs",
356
+ "zcos",
357
+ "zexp",
358
+ "zlog",
359
+ "zsin",
360
+ "zsqrt"
361
+ ]), d = r([
362
+ "c_bool",
363
+ "c_char",
364
+ "c_double",
365
+ "c_double_complex",
366
+ "c_float",
367
+ "c_float_complex",
368
+ "c_funptr",
369
+ "c_int",
370
+ "c_int16_t",
371
+ "c_int32_t",
372
+ "c_int64_t",
373
+ "c_int8_t",
374
+ "c_int_fast16_t",
375
+ "c_int_fast32_t",
376
+ "c_int_fast64_t",
377
+ "c_int_fast8_t",
378
+ "c_int_least16_t",
379
+ "c_int_least32_t",
380
+ "c_int_least64_t",
381
+ "c_int_least8_t",
382
+ "c_intmax_t",
383
+ "c_intptr_t",
384
+ "c_long",
385
+ "c_long_double",
386
+ "c_long_double_complex",
387
+ "c_long_long",
388
+ "c_ptr",
389
+ "c_short",
390
+ "c_signed_char",
391
+ "c_size_t",
392
+ "character",
393
+ "complex",
394
+ "double",
395
+ "integer",
396
+ "logical",
397
+ "real"
398
+ ]), c = /[+\-*&=<>\/\:]/, _ = /^\.(and|or|eq|lt|le|gt|ge|ne|not|eqv|neqv)\./i;
399
+ function u(t, n) {
400
+ if (t.match(_))
401
+ return "operator";
402
+ var e = t.next();
403
+ if (e == "!")
404
+ return t.skipToEnd(), "comment";
405
+ if (e == '"' || e == "'")
406
+ return n.tokenize = m(e), n.tokenize(t, n);
407
+ if (/[\[\]\(\),]/.test(e))
408
+ return null;
409
+ if (/\d/.test(e))
410
+ return t.eatWhile(/[\w\.]/), "number";
411
+ if (c.test(e))
412
+ return t.eatWhile(c), "operator";
413
+ t.eatWhile(/[\w\$_]/);
414
+ var i = t.current().toLowerCase();
415
+ return l.hasOwnProperty(i) ? "keyword" : s.hasOwnProperty(i) || d.hasOwnProperty(i) ? "builtin" : "variable";
416
+ }
417
+ function m(t) {
418
+ return function(n, e) {
419
+ for (var i = !1, a, o = !1; (a = n.next()) != null; ) {
420
+ if (a == t && !i) {
421
+ o = !0;
422
+ break;
423
+ }
424
+ i = !i && a == "\\";
425
+ }
426
+ return (o || !i) && (e.tokenize = null), "string";
427
+ };
428
+ }
429
+ const p = {
430
+ name: "fortran",
431
+ startState: function() {
432
+ return { tokenize: null };
433
+ },
434
+ token: function(t, n) {
435
+ if (t.eatSpace()) return null;
436
+ var e = (n.tokenize || u)(t, n);
437
+ return e == "comment" || e == "meta", e;
438
+ }
439
+ };
440
+ export {
441
+ p as fortran
442
+ };
@@ -0,0 +1,183 @@
1
+ function v(r) {
2
+ var u = [], b = "", o = {
3
+ ".abort": "builtin",
4
+ ".align": "builtin",
5
+ ".altmacro": "builtin",
6
+ ".ascii": "builtin",
7
+ ".asciz": "builtin",
8
+ ".balign": "builtin",
9
+ ".balignw": "builtin",
10
+ ".balignl": "builtin",
11
+ ".bundle_align_mode": "builtin",
12
+ ".bundle_lock": "builtin",
13
+ ".bundle_unlock": "builtin",
14
+ ".byte": "builtin",
15
+ ".cfi_startproc": "builtin",
16
+ ".comm": "builtin",
17
+ ".data": "builtin",
18
+ ".def": "builtin",
19
+ ".desc": "builtin",
20
+ ".dim": "builtin",
21
+ ".double": "builtin",
22
+ ".eject": "builtin",
23
+ ".else": "builtin",
24
+ ".elseif": "builtin",
25
+ ".end": "builtin",
26
+ ".endef": "builtin",
27
+ ".endfunc": "builtin",
28
+ ".endif": "builtin",
29
+ ".equ": "builtin",
30
+ ".equiv": "builtin",
31
+ ".eqv": "builtin",
32
+ ".err": "builtin",
33
+ ".error": "builtin",
34
+ ".exitm": "builtin",
35
+ ".extern": "builtin",
36
+ ".fail": "builtin",
37
+ ".file": "builtin",
38
+ ".fill": "builtin",
39
+ ".float": "builtin",
40
+ ".func": "builtin",
41
+ ".global": "builtin",
42
+ ".gnu_attribute": "builtin",
43
+ ".hidden": "builtin",
44
+ ".hword": "builtin",
45
+ ".ident": "builtin",
46
+ ".if": "builtin",
47
+ ".incbin": "builtin",
48
+ ".include": "builtin",
49
+ ".int": "builtin",
50
+ ".internal": "builtin",
51
+ ".irp": "builtin",
52
+ ".irpc": "builtin",
53
+ ".lcomm": "builtin",
54
+ ".lflags": "builtin",
55
+ ".line": "builtin",
56
+ ".linkonce": "builtin",
57
+ ".list": "builtin",
58
+ ".ln": "builtin",
59
+ ".loc": "builtin",
60
+ ".loc_mark_labels": "builtin",
61
+ ".local": "builtin",
62
+ ".long": "builtin",
63
+ ".macro": "builtin",
64
+ ".mri": "builtin",
65
+ ".noaltmacro": "builtin",
66
+ ".nolist": "builtin",
67
+ ".octa": "builtin",
68
+ ".offset": "builtin",
69
+ ".org": "builtin",
70
+ ".p2align": "builtin",
71
+ ".popsection": "builtin",
72
+ ".previous": "builtin",
73
+ ".print": "builtin",
74
+ ".protected": "builtin",
75
+ ".psize": "builtin",
76
+ ".purgem": "builtin",
77
+ ".pushsection": "builtin",
78
+ ".quad": "builtin",
79
+ ".reloc": "builtin",
80
+ ".rept": "builtin",
81
+ ".sbttl": "builtin",
82
+ ".scl": "builtin",
83
+ ".section": "builtin",
84
+ ".set": "builtin",
85
+ ".short": "builtin",
86
+ ".single": "builtin",
87
+ ".size": "builtin",
88
+ ".skip": "builtin",
89
+ ".sleb128": "builtin",
90
+ ".space": "builtin",
91
+ ".stab": "builtin",
92
+ ".string": "builtin",
93
+ ".struct": "builtin",
94
+ ".subsection": "builtin",
95
+ ".symver": "builtin",
96
+ ".tag": "builtin",
97
+ ".text": "builtin",
98
+ ".title": "builtin",
99
+ ".type": "builtin",
100
+ ".uleb128": "builtin",
101
+ ".val": "builtin",
102
+ ".version": "builtin",
103
+ ".vtable_entry": "builtin",
104
+ ".vtable_inherit": "builtin",
105
+ ".warning": "builtin",
106
+ ".weak": "builtin",
107
+ ".weakref": "builtin",
108
+ ".word": "builtin"
109
+ }, i = {};
110
+ function p() {
111
+ b = "#", i.al = "variable", i.ah = "variable", i.ax = "variable", i.eax = "variableName.special", i.rax = "variableName.special", i.bl = "variable", i.bh = "variable", i.bx = "variable", i.ebx = "variableName.special", i.rbx = "variableName.special", i.cl = "variable", i.ch = "variable", i.cx = "variable", i.ecx = "variableName.special", i.rcx = "variableName.special", i.dl = "variable", i.dh = "variable", i.dx = "variable", i.edx = "variableName.special", i.rdx = "variableName.special", i.si = "variable", i.esi = "variableName.special", i.rsi = "variableName.special", i.di = "variable", i.edi = "variableName.special", i.rdi = "variableName.special", i.sp = "variable", i.esp = "variableName.special", i.rsp = "variableName.special", i.bp = "variable", i.ebp = "variableName.special", i.rbp = "variableName.special", i.ip = "variable", i.eip = "variableName.special", i.rip = "variableName.special", i.cs = "keyword", i.ds = "keyword", i.ss = "keyword", i.es = "keyword", i.fs = "keyword", i.gs = "keyword";
112
+ }
113
+ function f() {
114
+ b = "@", o.syntax = "builtin", i.r0 = "variable", i.r1 = "variable", i.r2 = "variable", i.r3 = "variable", i.r4 = "variable", i.r5 = "variable", i.r6 = "variable", i.r7 = "variable", i.r8 = "variable", i.r9 = "variable", i.r10 = "variable", i.r11 = "variable", i.r12 = "variable", i.sp = "variableName.special", i.lr = "variableName.special", i.pc = "variableName.special", i.r13 = i.sp, i.r14 = i.lr, i.r15 = i.pc, u.push(function(l, n) {
115
+ if (l === "#")
116
+ return n.eatWhile(/\w/), "number";
117
+ });
118
+ }
119
+ r === "x86" ? p() : (r === "arm" || r === "armv6") && f();
120
+ function d(l, n) {
121
+ for (var e = !1, a; (a = l.next()) != null; ) {
122
+ if (a === n && !e)
123
+ return !1;
124
+ e = !e && a === "\\";
125
+ }
126
+ return e;
127
+ }
128
+ function s(l, n) {
129
+ for (var e = !1, a; (a = l.next()) != null; ) {
130
+ if (a === "/" && e) {
131
+ n.tokenize = null;
132
+ break;
133
+ }
134
+ e = a === "*";
135
+ }
136
+ return "comment";
137
+ }
138
+ return {
139
+ name: "gas",
140
+ startState: function() {
141
+ return {
142
+ tokenize: null
143
+ };
144
+ },
145
+ token: function(l, n) {
146
+ if (n.tokenize)
147
+ return n.tokenize(l, n);
148
+ if (l.eatSpace())
149
+ return null;
150
+ var e, a, t = l.next();
151
+ if (t === "/" && l.eat("*"))
152
+ return n.tokenize = s, s(l, n);
153
+ if (t === b)
154
+ return l.skipToEnd(), "comment";
155
+ if (t === '"')
156
+ return d(l, '"'), "string";
157
+ if (t === ".")
158
+ return l.eatWhile(/\w/), a = l.current().toLowerCase(), e = o[a], e || null;
159
+ if (t === "=")
160
+ return l.eatWhile(/\w/), "tag";
161
+ if (t === "{" || t === "}")
162
+ return "bracket";
163
+ if (/\d/.test(t))
164
+ return t === "0" && l.eat("x") ? (l.eatWhile(/[0-9a-fA-F]/), "number") : (l.eatWhile(/\d/), "number");
165
+ if (/\w/.test(t))
166
+ return l.eatWhile(/\w/), l.eat(":") ? "tag" : (a = l.current().toLowerCase(), e = i[a], e || null);
167
+ for (var c = 0; c < u.length; c++)
168
+ if (e = u[c](t, l, n), e)
169
+ return e;
170
+ },
171
+ languageData: {
172
+ commentTokens: {
173
+ line: b,
174
+ block: { open: "/*", close: "*/" }
175
+ }
176
+ }
177
+ };
178
+ }
179
+ const m = v("x86");
180
+ v("arm");
181
+ export {
182
+ m as gas
183
+ };