@danielx/civet 0.5.23 → 0.5.25
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/README.md +11 -5
- package/dist/browser.js +943 -818
- package/dist/civet +5 -5
- package/dist/main.js +926 -789
- package/dist/main.mjs +15563 -0
- package/package.json +6 -2
package/dist/main.js
CHANGED
|
@@ -1,18 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
2
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
3
8
|
var __commonJS = (cb, mod) => function __require() {
|
|
4
9
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
5
10
|
};
|
|
11
|
+
var __export = (target, all) => {
|
|
12
|
+
for (var name in all)
|
|
13
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
14
|
+
};
|
|
15
|
+
var __copyProps = (to, from, except, desc) => {
|
|
16
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
17
|
+
for (let key of __getOwnPropNames(from))
|
|
18
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
19
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
22
|
+
};
|
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
6
28
|
|
|
7
29
|
// source/parser.hera
|
|
8
30
|
var require_parser = __commonJS({
|
|
9
|
-
"source/parser.hera"(
|
|
31
|
+
"source/parser.hera"(exports, module2) {
|
|
10
32
|
"use strict";
|
|
11
|
-
Object.defineProperty(
|
|
12
|
-
|
|
13
|
-
function $EXPECT(
|
|
33
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
+
exports.parserState = exports.$R$0 = exports.$TV = exports.$TS = exports.$TR = exports.$T = exports.$Y = exports.$N = exports.$TOKEN = exports.$TEXT = exports.$P = exports.$Q = exports.$E = exports.$S = exports.$C = exports.$R = exports.$L = exports.$EXPECT = void 0;
|
|
35
|
+
function $EXPECT(parser2, fail2, expectation) {
|
|
14
36
|
return function(state) {
|
|
15
|
-
const result =
|
|
37
|
+
const result = parser2(state);
|
|
16
38
|
if (result)
|
|
17
39
|
return result;
|
|
18
40
|
const { pos } = state;
|
|
@@ -20,7 +42,7 @@ var require_parser = __commonJS({
|
|
|
20
42
|
return;
|
|
21
43
|
};
|
|
22
44
|
}
|
|
23
|
-
|
|
45
|
+
exports.$EXPECT = $EXPECT;
|
|
24
46
|
function $L(str) {
|
|
25
47
|
return function(state) {
|
|
26
48
|
const { input, pos } = state;
|
|
@@ -38,7 +60,7 @@ var require_parser = __commonJS({
|
|
|
38
60
|
return;
|
|
39
61
|
};
|
|
40
62
|
}
|
|
41
|
-
|
|
63
|
+
exports.$L = $L;
|
|
42
64
|
function $R(regExp) {
|
|
43
65
|
return function(state) {
|
|
44
66
|
const { input, pos } = state;
|
|
@@ -59,7 +81,7 @@ var require_parser = __commonJS({
|
|
|
59
81
|
return;
|
|
60
82
|
};
|
|
61
83
|
}
|
|
62
|
-
|
|
84
|
+
exports.$R = $R;
|
|
63
85
|
function $C(...terms) {
|
|
64
86
|
return (state) => {
|
|
65
87
|
let i = 0;
|
|
@@ -72,7 +94,7 @@ var require_parser = __commonJS({
|
|
|
72
94
|
return;
|
|
73
95
|
};
|
|
74
96
|
}
|
|
75
|
-
|
|
97
|
+
exports.$C = $C;
|
|
76
98
|
function $S(...terms) {
|
|
77
99
|
return (state) => {
|
|
78
100
|
let { input, pos, tokenize, events } = state, i = 0, value;
|
|
@@ -95,7 +117,7 @@ var require_parser = __commonJS({
|
|
|
95
117
|
};
|
|
96
118
|
};
|
|
97
119
|
}
|
|
98
|
-
|
|
120
|
+
exports.$S = $S;
|
|
99
121
|
function $E(fn) {
|
|
100
122
|
return (state) => {
|
|
101
123
|
const r = fn(state);
|
|
@@ -112,7 +134,7 @@ var require_parser = __commonJS({
|
|
|
112
134
|
};
|
|
113
135
|
};
|
|
114
136
|
}
|
|
115
|
-
|
|
137
|
+
exports.$E = $E;
|
|
116
138
|
function $Q(fn) {
|
|
117
139
|
return (state) => {
|
|
118
140
|
let { input, pos, tokenize, events } = state;
|
|
@@ -140,7 +162,7 @@ var require_parser = __commonJS({
|
|
|
140
162
|
};
|
|
141
163
|
};
|
|
142
164
|
}
|
|
143
|
-
|
|
165
|
+
exports.$Q = $Q;
|
|
144
166
|
function $P(fn) {
|
|
145
167
|
return (state) => {
|
|
146
168
|
const { input, pos: s, tokenize, events } = state;
|
|
@@ -170,7 +192,7 @@ var require_parser = __commonJS({
|
|
|
170
192
|
};
|
|
171
193
|
};
|
|
172
194
|
}
|
|
173
|
-
|
|
195
|
+
exports.$P = $P;
|
|
174
196
|
function $TEXT(fn) {
|
|
175
197
|
return (state) => {
|
|
176
198
|
const newState = fn(state);
|
|
@@ -180,7 +202,7 @@ var require_parser = __commonJS({
|
|
|
180
202
|
return newState;
|
|
181
203
|
};
|
|
182
204
|
}
|
|
183
|
-
|
|
205
|
+
exports.$TEXT = $TEXT;
|
|
184
206
|
function $TOKEN(name, state, newState) {
|
|
185
207
|
if (!newState)
|
|
186
208
|
return;
|
|
@@ -192,7 +214,7 @@ var require_parser = __commonJS({
|
|
|
192
214
|
};
|
|
193
215
|
return newState;
|
|
194
216
|
}
|
|
195
|
-
|
|
217
|
+
exports.$TOKEN = $TOKEN;
|
|
196
218
|
function $N(fn) {
|
|
197
219
|
return (state) => {
|
|
198
220
|
const newState = fn(state);
|
|
@@ -208,7 +230,7 @@ var require_parser = __commonJS({
|
|
|
208
230
|
};
|
|
209
231
|
};
|
|
210
232
|
}
|
|
211
|
-
|
|
233
|
+
exports.$N = $N;
|
|
212
234
|
function $Y(fn) {
|
|
213
235
|
return (state) => {
|
|
214
236
|
const newState = fn(state);
|
|
@@ -224,10 +246,10 @@ var require_parser = __commonJS({
|
|
|
224
246
|
};
|
|
225
247
|
};
|
|
226
248
|
}
|
|
227
|
-
|
|
228
|
-
function $T(
|
|
249
|
+
exports.$Y = $Y;
|
|
250
|
+
function $T(parser2, fn) {
|
|
229
251
|
return function(state) {
|
|
230
|
-
const result =
|
|
252
|
+
const result = parser2(state);
|
|
231
253
|
if (!result)
|
|
232
254
|
return;
|
|
233
255
|
if (state.tokenize)
|
|
@@ -238,10 +260,10 @@ var require_parser = __commonJS({
|
|
|
238
260
|
return result;
|
|
239
261
|
};
|
|
240
262
|
}
|
|
241
|
-
|
|
242
|
-
function $TR(
|
|
263
|
+
exports.$T = $T;
|
|
264
|
+
function $TR(parser2, fn) {
|
|
243
265
|
return function(state) {
|
|
244
|
-
const result =
|
|
266
|
+
const result = parser2(state);
|
|
245
267
|
if (!result)
|
|
246
268
|
return;
|
|
247
269
|
if (state.tokenize)
|
|
@@ -255,10 +277,10 @@ var require_parser = __commonJS({
|
|
|
255
277
|
return result;
|
|
256
278
|
};
|
|
257
279
|
}
|
|
258
|
-
|
|
259
|
-
function $TS(
|
|
280
|
+
exports.$TR = $TR;
|
|
281
|
+
function $TS(parser2, fn) {
|
|
260
282
|
return function(state) {
|
|
261
|
-
const result =
|
|
283
|
+
const result = parser2(state);
|
|
262
284
|
if (!result)
|
|
263
285
|
return;
|
|
264
286
|
if (state.tokenize)
|
|
@@ -272,10 +294,10 @@ var require_parser = __commonJS({
|
|
|
272
294
|
return result;
|
|
273
295
|
};
|
|
274
296
|
}
|
|
275
|
-
|
|
276
|
-
function $TV(
|
|
297
|
+
exports.$TS = $TS;
|
|
298
|
+
function $TV(parser2, fn) {
|
|
277
299
|
return function(state) {
|
|
278
|
-
const result =
|
|
300
|
+
const result = parser2(state);
|
|
279
301
|
if (!result)
|
|
280
302
|
return;
|
|
281
303
|
if (state.tokenize)
|
|
@@ -289,10 +311,10 @@ var require_parser = __commonJS({
|
|
|
289
311
|
return result;
|
|
290
312
|
};
|
|
291
313
|
}
|
|
292
|
-
|
|
293
|
-
function $R$0(
|
|
314
|
+
exports.$TV = $TV;
|
|
315
|
+
function $R$0(parser2) {
|
|
294
316
|
return function(state) {
|
|
295
|
-
const result =
|
|
317
|
+
const result = parser2(state);
|
|
296
318
|
if (!result)
|
|
297
319
|
return;
|
|
298
320
|
const value = result.value[0];
|
|
@@ -300,7 +322,7 @@ var require_parser = __commonJS({
|
|
|
300
322
|
return result;
|
|
301
323
|
};
|
|
302
324
|
}
|
|
303
|
-
|
|
325
|
+
exports.$R$0 = $R$0;
|
|
304
326
|
var SKIP = {};
|
|
305
327
|
var failHintRegex = /\S+|\s+|$/y;
|
|
306
328
|
var failExpected = Array(16);
|
|
@@ -373,14 +395,14 @@ ${input.slice(result.pos)}
|
|
|
373
395
|
parse: (input, options = {}) => {
|
|
374
396
|
if (typeof input !== "string")
|
|
375
397
|
throw new Error("Input must be a string");
|
|
376
|
-
const
|
|
377
|
-
if (!
|
|
398
|
+
const parser2 = options.startRule != null ? grammar[options.startRule] : Object.values(grammar)[0];
|
|
399
|
+
if (!parser2)
|
|
378
400
|
throw new Error("Could not find rule with name '#{opts.startRule}'");
|
|
379
401
|
const filename = options.filename || "<anonymous>";
|
|
380
402
|
failIndex = 0;
|
|
381
403
|
maxFailPos = 0;
|
|
382
404
|
failExpected.length = 0;
|
|
383
|
-
return validate(input,
|
|
405
|
+
return validate(input, parser2({
|
|
384
406
|
input,
|
|
385
407
|
pos: 0,
|
|
386
408
|
tokenize: options.tokenize || false,
|
|
@@ -391,7 +413,7 @@ ${input.slice(result.pos)}
|
|
|
391
413
|
}
|
|
392
414
|
};
|
|
393
415
|
}
|
|
394
|
-
|
|
416
|
+
exports.parserState = parserState;
|
|
395
417
|
var { parse: parse2 } = parserState({
|
|
396
418
|
Program,
|
|
397
419
|
TopLevelStatement,
|
|
@@ -804,6 +826,8 @@ ${input.slice(result.pos)}
|
|
|
804
826
|
JSXCommentContent,
|
|
805
827
|
JSXText,
|
|
806
828
|
JSXChildExpression,
|
|
829
|
+
IndentedJSXChildExpression,
|
|
830
|
+
NestedJSXChildExpression,
|
|
807
831
|
TypeDeclaration,
|
|
808
832
|
TypeDeclarationModifier,
|
|
809
833
|
TypeDeclarationRest,
|
|
@@ -942,18 +966,18 @@ ${input.slice(result.pos)}
|
|
|
942
966
|
var $L48 = $L("**");
|
|
943
967
|
var $L49 = $L("*");
|
|
944
968
|
var $L50 = $L("/");
|
|
945
|
-
var $L51 = $L("
|
|
946
|
-
var $L52 = $L("
|
|
947
|
-
var $L53 = $L("
|
|
948
|
-
var $L54 = $L("
|
|
949
|
-
var $L55 = $L("
|
|
950
|
-
var $L56 = $L("
|
|
951
|
-
var $L57 = $L("
|
|
952
|
-
var $L58 = $L("
|
|
953
|
-
var $L59 = $L("
|
|
954
|
-
var $L60 = $L("
|
|
955
|
-
var $L61 = $L("
|
|
956
|
-
var $L62 = $L("
|
|
969
|
+
var $L51 = $L("%%");
|
|
970
|
+
var $L52 = $L("%");
|
|
971
|
+
var $L53 = $L("+");
|
|
972
|
+
var $L54 = $L("-");
|
|
973
|
+
var $L55 = $L("<=");
|
|
974
|
+
var $L56 = $L(">=");
|
|
975
|
+
var $L57 = $L("<<");
|
|
976
|
+
var $L58 = $L(">>>");
|
|
977
|
+
var $L59 = $L(">>");
|
|
978
|
+
var $L60 = $L("!==");
|
|
979
|
+
var $L61 = $L("!=");
|
|
980
|
+
var $L62 = $L("isnt");
|
|
957
981
|
var $L63 = $L("===");
|
|
958
982
|
var $L64 = $L("==");
|
|
959
983
|
var $L65 = $L("and");
|
|
@@ -966,99 +990,100 @@ ${input.slice(result.pos)}
|
|
|
966
990
|
var $L72 = $L("instanceof");
|
|
967
991
|
var $L73 = $L("not");
|
|
968
992
|
var $L74 = $L("in");
|
|
969
|
-
var $L75 = $L("
|
|
970
|
-
var $L76 = $L("
|
|
971
|
-
var $L77 = $L("
|
|
972
|
-
var $L78 = $L("
|
|
973
|
-
var $L79 = $L("
|
|
974
|
-
var $L80 = $L("
|
|
975
|
-
var $L81 = $L("
|
|
976
|
-
var $L82 = $L("
|
|
977
|
-
var $L83 = $L("
|
|
978
|
-
var $L84 = $L("
|
|
979
|
-
var $L85 = $L("
|
|
980
|
-
var $L86 = $L("
|
|
981
|
-
var $L87 = $L("
|
|
982
|
-
var $L88 = $L("
|
|
983
|
-
var $L89 = $L("
|
|
984
|
-
var $L90 = $L("
|
|
985
|
-
var $L91 = $L("
|
|
986
|
-
var $L92 = $L("
|
|
987
|
-
var $L93 = $L("
|
|
988
|
-
var $L94 = $L("
|
|
989
|
-
var $L95 = $L("
|
|
990
|
-
var $L96 = $L("
|
|
991
|
-
var $L97 = $L("
|
|
992
|
-
var $L98 = $L("
|
|
993
|
-
var $L99 = $L("
|
|
994
|
-
var $L100 = $L("
|
|
995
|
-
var $L101 = $L("
|
|
996
|
-
var $L102 = $L("
|
|
997
|
-
var $L103 = $L("
|
|
998
|
-
var $L104 = $L("
|
|
999
|
-
var $L105 = $L("
|
|
1000
|
-
var $L106 = $L("
|
|
1001
|
-
var $L107 = $L("
|
|
1002
|
-
var $L108 = $L("
|
|
1003
|
-
var $L109 = $L(
|
|
1004
|
-
var $L110 = $L("
|
|
1005
|
-
var $L111 = $L("
|
|
1006
|
-
var $L112 = $L("
|
|
1007
|
-
var $L113 = $L("
|
|
1008
|
-
var $L114 = $L("
|
|
1009
|
-
var $L115 = $L("
|
|
1010
|
-
var $L116 = $L("
|
|
1011
|
-
var $L117 = $L("
|
|
1012
|
-
var $L118 = $L("
|
|
1013
|
-
var $L119 = $L("
|
|
1014
|
-
var $L120 = $L("
|
|
1015
|
-
var $L121 = $L("
|
|
1016
|
-
var $L122 = $L("
|
|
1017
|
-
var $L123 = $L("
|
|
1018
|
-
var $L124 = $L("
|
|
1019
|
-
var $L125 = $L("
|
|
1020
|
-
var $L126 = $L("
|
|
1021
|
-
var $L127 = $L("
|
|
1022
|
-
var $L128 = $L("
|
|
1023
|
-
var $L129 = $L("
|
|
1024
|
-
var $L130 = $L("
|
|
1025
|
-
var $L131 = $L("
|
|
1026
|
-
var $L132 = $L("
|
|
1027
|
-
var $L133 = $L("
|
|
1028
|
-
var $L134 = $L("
|
|
1029
|
-
var $L135 = $L("
|
|
1030
|
-
var $L136 = $L("
|
|
1031
|
-
var $L137 = $L("
|
|
1032
|
-
var $L138 = $L("
|
|
1033
|
-
var $L139 = $L("
|
|
1034
|
-
var $L140 = $L(
|
|
1035
|
-
var $L141 = $L("'
|
|
1036
|
-
var $L142 = $L("
|
|
1037
|
-
var $L143 = $L("
|
|
1038
|
-
var $L144 = $L("
|
|
1039
|
-
var $L145 = $L("
|
|
1040
|
-
var $L146 = $L("
|
|
1041
|
-
var $L147 = $L("
|
|
1042
|
-
var $L148 = $L("
|
|
1043
|
-
var $L149 = $L("
|
|
1044
|
-
var $L150 = $L("
|
|
1045
|
-
var $L151 = $L("
|
|
1046
|
-
var $L152 = $L("
|
|
1047
|
-
var $L153 = $L("
|
|
1048
|
-
var $L154 = $L("
|
|
1049
|
-
var $L155 = $L("
|
|
1050
|
-
var $L156 = $L("
|
|
1051
|
-
var $L157 = $L("
|
|
1052
|
-
var $L158 = $L("
|
|
1053
|
-
var $L159 = $L("
|
|
1054
|
-
var $L160 = $L("
|
|
1055
|
-
var $L161 = $L("
|
|
1056
|
-
var $L162 = $L("
|
|
1057
|
-
var $L163 = $L("
|
|
1058
|
-
var $L164 = $L("
|
|
1059
|
-
var $L165 = $L("
|
|
1060
|
-
var $L166 = $L("
|
|
1061
|
-
var $L167 = $L("
|
|
993
|
+
var $L75 = $L("is");
|
|
994
|
+
var $L76 = $L("&");
|
|
995
|
+
var $L77 = $L("^");
|
|
996
|
+
var $L78 = $L("|");
|
|
997
|
+
var $L79 = $L(";");
|
|
998
|
+
var $L80 = $L("own");
|
|
999
|
+
var $L81 = $L("finally");
|
|
1000
|
+
var $L82 = $L("break");
|
|
1001
|
+
var $L83 = $L("continue");
|
|
1002
|
+
var $L84 = $L("debugger");
|
|
1003
|
+
var $L85 = $L("import type");
|
|
1004
|
+
var $L86 = $L("default");
|
|
1005
|
+
var $L87 = $L(":=");
|
|
1006
|
+
var $L88 = $L("::=");
|
|
1007
|
+
var $L89 = $L(".=");
|
|
1008
|
+
var $L90 = $L("/*");
|
|
1009
|
+
var $L91 = $L("*/");
|
|
1010
|
+
var $L92 = $L("\\");
|
|
1011
|
+
var $L93 = $L("abstract");
|
|
1012
|
+
var $L94 = $L("as");
|
|
1013
|
+
var $L95 = $L("@");
|
|
1014
|
+
var $L96 = $L("@@");
|
|
1015
|
+
var $L97 = $L("async");
|
|
1016
|
+
var $L98 = $L("await");
|
|
1017
|
+
var $L99 = $L("`");
|
|
1018
|
+
var $L100 = $L("by");
|
|
1019
|
+
var $L101 = $L("case");
|
|
1020
|
+
var $L102 = $L("catch");
|
|
1021
|
+
var $L103 = $L("class");
|
|
1022
|
+
var $L104 = $L("#{");
|
|
1023
|
+
var $L105 = $L("delete");
|
|
1024
|
+
var $L106 = $L("do");
|
|
1025
|
+
var $L107 = $L("..");
|
|
1026
|
+
var $L108 = $L("...");
|
|
1027
|
+
var $L109 = $L("::");
|
|
1028
|
+
var $L110 = $L('"');
|
|
1029
|
+
var $L111 = $L("else");
|
|
1030
|
+
var $L112 = $L("export");
|
|
1031
|
+
var $L113 = $L("for");
|
|
1032
|
+
var $L114 = $L("from");
|
|
1033
|
+
var $L115 = $L("function");
|
|
1034
|
+
var $L116 = $L("get");
|
|
1035
|
+
var $L117 = $L("set");
|
|
1036
|
+
var $L118 = $L("if");
|
|
1037
|
+
var $L119 = $L("let");
|
|
1038
|
+
var $L120 = $L("const");
|
|
1039
|
+
var $L121 = $L("loop");
|
|
1040
|
+
var $L122 = $L("new");
|
|
1041
|
+
var $L123 = $L("{");
|
|
1042
|
+
var $L124 = $L("[");
|
|
1043
|
+
var $L125 = $L("(");
|
|
1044
|
+
var $L126 = $L("public");
|
|
1045
|
+
var $L127 = $L("private");
|
|
1046
|
+
var $L128 = $L("protected");
|
|
1047
|
+
var $L129 = $L("|>");
|
|
1048
|
+
var $L130 = $L("readonly");
|
|
1049
|
+
var $L131 = $L("return");
|
|
1050
|
+
var $L132 = $L("satisfies");
|
|
1051
|
+
var $L133 = $L("'");
|
|
1052
|
+
var $L134 = $L("static");
|
|
1053
|
+
var $L135 = $L("${");
|
|
1054
|
+
var $L136 = $L("switch");
|
|
1055
|
+
var $L137 = $L("target");
|
|
1056
|
+
var $L138 = $L("then");
|
|
1057
|
+
var $L139 = $L("this");
|
|
1058
|
+
var $L140 = $L("throw");
|
|
1059
|
+
var $L141 = $L('"""');
|
|
1060
|
+
var $L142 = $L("'''");
|
|
1061
|
+
var $L143 = $L("///");
|
|
1062
|
+
var $L144 = $L("```");
|
|
1063
|
+
var $L145 = $L("try");
|
|
1064
|
+
var $L146 = $L("typeof");
|
|
1065
|
+
var $L147 = $L("unless");
|
|
1066
|
+
var $L148 = $L("until");
|
|
1067
|
+
var $L149 = $L("var");
|
|
1068
|
+
var $L150 = $L("void");
|
|
1069
|
+
var $L151 = $L("when");
|
|
1070
|
+
var $L152 = $L("while");
|
|
1071
|
+
var $L153 = $L("yield");
|
|
1072
|
+
var $L154 = $L("/>");
|
|
1073
|
+
var $L155 = $L("</");
|
|
1074
|
+
var $L156 = $L("<>");
|
|
1075
|
+
var $L157 = $L("</>");
|
|
1076
|
+
var $L158 = $L("<!--");
|
|
1077
|
+
var $L159 = $L("-->");
|
|
1078
|
+
var $L160 = $L("declare");
|
|
1079
|
+
var $L161 = $L("type");
|
|
1080
|
+
var $L162 = $L("interface");
|
|
1081
|
+
var $L163 = $L("namespace");
|
|
1082
|
+
var $L164 = $L("asserts");
|
|
1083
|
+
var $L165 = $L("keyof");
|
|
1084
|
+
var $L166 = $L("infer");
|
|
1085
|
+
var $L167 = $L("[]");
|
|
1086
|
+
var $L168 = $L("civet");
|
|
1062
1087
|
var $R0 = $R(new RegExp("(for|of|then|when)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
|
|
1063
1088
|
var $R1 = $R(new RegExp("[&]", "suy"));
|
|
1064
1089
|
var $R2 = $R(new RegExp("[!~+-]+", "suy"));
|
|
@@ -1095,26 +1120,27 @@ ${input.slice(result.pos)}
|
|
|
1095
1120
|
var $R33 = $R(new RegExp("(?:isnt)(?!\\p{ID_Continue})", "suy"));
|
|
1096
1121
|
var $R34 = $R(new RegExp("(?:by)(?!\\p{ID_Continue})", "suy"));
|
|
1097
1122
|
var $R35 = $R(new RegExp("(?:of)(?!\\p{ID_Continue})", "suy"));
|
|
1098
|
-
var $R36 = $R(new RegExp("(?:
|
|
1099
|
-
var $R37 = $R(new RegExp("
|
|
1100
|
-
var $R38 = $R(new RegExp("
|
|
1101
|
-
var $R39 = $R(new RegExp("
|
|
1102
|
-
var $R40 = $R(new RegExp("
|
|
1103
|
-
var $R41 = $R(new RegExp("
|
|
1104
|
-
var $R42 = $R(new RegExp("[
|
|
1105
|
-
var $R43 = $R(new RegExp("
|
|
1106
|
-
var $R44 = $R(new RegExp("
|
|
1107
|
-
var $R45 = $R(new RegExp("
|
|
1108
|
-
var $R46 = $R(new RegExp("(
|
|
1109
|
-
var $R47 = $R(new RegExp("(
|
|
1110
|
-
var $R48 = $R(new RegExp("[
|
|
1111
|
-
var $R49 = $R(new RegExp("[
|
|
1112
|
-
var $R50 = $R(new RegExp("
|
|
1113
|
-
var $R51 = $R(new RegExp("[\\
|
|
1114
|
-
var $R52 = $R(new RegExp("[\\
|
|
1115
|
-
var $R53 = $R(new RegExp("
|
|
1116
|
-
var $R54 = $R(new RegExp("\\
|
|
1117
|
-
var $R55 = $R(new RegExp("
|
|
1123
|
+
var $R36 = $R(new RegExp("(?:not)(?!\\p{ID_Continue})", "suy"));
|
|
1124
|
+
var $R37 = $R(new RegExp("(?:and|as|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|if|import|in|instanceof|interface|is|let|loop|new|null|or|private|protected|public|return|satisfies|static|super|switch|this|throw|true|try|typeof|unless|until|var|void|while|with|yield)(?!\\p{ID_Continue})", "suy"));
|
|
1125
|
+
var $R38 = $R(new RegExp("\\/\\/(?!\\/)[^\\r\\n]*", "suy"));
|
|
1126
|
+
var $R39 = $R(new RegExp(".", "suy"));
|
|
1127
|
+
var $R40 = $R(new RegExp("#(?!##(?!#))([^\\r\\n]*)", "suy"));
|
|
1128
|
+
var $R41 = $R(new RegExp("###(?!#)", "suy"));
|
|
1129
|
+
var $R42 = $R(new RegExp("[^\\r\\n]", "suy"));
|
|
1130
|
+
var $R43 = $R(new RegExp("[ \\t]+", "suy"));
|
|
1131
|
+
var $R44 = $R(new RegExp("(?!\\p{ID_Continue})", "suy"));
|
|
1132
|
+
var $R45 = $R(new RegExp("\\s", "suy"));
|
|
1133
|
+
var $R46 = $R(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*", "suy"));
|
|
1134
|
+
var $R47 = $R(new RegExp("(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+", "suy"));
|
|
1135
|
+
var $R48 = $R(new RegExp("(?:-[^-]|[^-]*)*", "suy"));
|
|
1136
|
+
var $R49 = $R(new RegExp("[^{}<>\\r\\n]+", "suy"));
|
|
1137
|
+
var $R50 = $R(new RegExp("[+-]?", "suy"));
|
|
1138
|
+
var $R51 = $R(new RegExp("#![^\\r\\n]*", "suy"));
|
|
1139
|
+
var $R52 = $R(new RegExp("[\\t ]*", "suy"));
|
|
1140
|
+
var $R53 = $R(new RegExp("[\\s]*", "suy"));
|
|
1141
|
+
var $R54 = $R(new RegExp("\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([a-zA-Z0-9.+-]*))?", "suy"));
|
|
1142
|
+
var $R55 = $R(new RegExp("\\r\\n|\\n|\\r|$", "suy"));
|
|
1143
|
+
var $R56 = $R(new RegExp("[ \\t]*", "suy"));
|
|
1118
1144
|
var Program$0 = $TS($S(Reset, Init, __, $Q(TopLevelStatement), __), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
1119
1145
|
var statements = $4;
|
|
1120
1146
|
module2.processProgram(statements);
|
|
@@ -2288,7 +2314,7 @@ ${input.slice(result.pos)}
|
|
|
2288
2314
|
var ExtendsToken$0 = $TV($EXPECT($L5, fail, 'ExtendsToken "<"'), function($skip, $loc, $0, $1) {
|
|
2289
2315
|
return { $loc, token: "extends" };
|
|
2290
2316
|
});
|
|
2291
|
-
var ExtendsToken$1 = $
|
|
2317
|
+
var ExtendsToken$1 = $TS($S($EXPECT($L6, fail, 'ExtendsToken "extends"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
2292
2318
|
return { $loc, token: $1 };
|
|
2293
2319
|
});
|
|
2294
2320
|
function ExtendsToken(state) {
|
|
@@ -2309,7 +2335,14 @@ ${input.slice(result.pos)}
|
|
|
2309
2335
|
return result;
|
|
2310
2336
|
}
|
|
2311
2337
|
}
|
|
2312
|
-
var ExtendsTarget$0 = $S(
|
|
2338
|
+
var ExtendsTarget$0 = $TS($S(ExpressionWithIndentedApplicationSuppressed, $E(TypeArguments)), function($skip, $loc, $0, $1, $2) {
|
|
2339
|
+
var exp = $1;
|
|
2340
|
+
var ta = $2;
|
|
2341
|
+
exp = module2.makeLeftHandSideExpression(exp);
|
|
2342
|
+
if (ta)
|
|
2343
|
+
return [exp, ta];
|
|
2344
|
+
return exp;
|
|
2345
|
+
});
|
|
2313
2346
|
function ExtendsTarget(state) {
|
|
2314
2347
|
if (state.events) {
|
|
2315
2348
|
const result = state.events.enter?.("ExtendsTarget", state);
|
|
@@ -2352,7 +2385,7 @@ ${input.slice(result.pos)}
|
|
|
2352
2385
|
return result;
|
|
2353
2386
|
}
|
|
2354
2387
|
}
|
|
2355
|
-
var ImplementsToken$0 = $
|
|
2388
|
+
var ImplementsToken$0 = $TS($S($EXPECT($L7, fail, 'ImplementsToken "implements"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
2356
2389
|
return { $loc, token: $1 };
|
|
2357
2390
|
});
|
|
2358
2391
|
function ImplementsToken(state) {
|
|
@@ -2616,10 +2649,19 @@ ${input.slice(result.pos)}
|
|
|
2616
2649
|
}
|
|
2617
2650
|
}
|
|
2618
2651
|
var CallExpression$0 = $S($EXPECT($L10, fail, 'CallExpression "super"'), ArgumentsWithTrailingCallExpressions, $Q(CallExpressionRest));
|
|
2619
|
-
var CallExpression$1 = $S($EXPECT($L11, fail, 'CallExpression "import"'), ArgumentsWithTrailingCallExpressions, $Q(CallExpressionRest))
|
|
2652
|
+
var CallExpression$1 = $TS($S($EXPECT($L11, fail, 'CallExpression "import"'), ArgumentsWithTrailingCallExpressions, $Q(CallExpressionRest)), function($skip, $loc, $0, $1, $2, $3) {
|
|
2653
|
+
return {
|
|
2654
|
+
type: "CallExpression",
|
|
2655
|
+
children: $0
|
|
2656
|
+
};
|
|
2657
|
+
});
|
|
2620
2658
|
var CallExpression$2 = $TS($S(MemberExpression, $Q(CallExpressionRest)), function($skip, $loc, $0, $1, $2) {
|
|
2621
|
-
if ($2.length)
|
|
2622
|
-
return
|
|
2659
|
+
if ($2.length) {
|
|
2660
|
+
return {
|
|
2661
|
+
type: "CallExpression",
|
|
2662
|
+
children: [$1].concat($2)
|
|
2663
|
+
};
|
|
2664
|
+
}
|
|
2623
2665
|
return $1;
|
|
2624
2666
|
});
|
|
2625
2667
|
function CallExpression(state) {
|
|
@@ -2722,8 +2764,13 @@ ${input.slice(result.pos)}
|
|
|
2722
2764
|
}
|
|
2723
2765
|
}
|
|
2724
2766
|
var MemberExpression$0 = $TS($S(PrimaryExpression, $Q(MemberExpressionRest)), function($skip, $loc, $0, $1, $2) {
|
|
2725
|
-
|
|
2726
|
-
|
|
2767
|
+
var rest = $2;
|
|
2768
|
+
if (rest.length) {
|
|
2769
|
+
return {
|
|
2770
|
+
type: "MemberExpression",
|
|
2771
|
+
children: [$1].concat(rest)
|
|
2772
|
+
};
|
|
2773
|
+
}
|
|
2727
2774
|
return $1;
|
|
2728
2775
|
});
|
|
2729
2776
|
var MemberExpression$1 = SuperProperty;
|
|
@@ -2942,7 +2989,7 @@ ${input.slice(result.pos)}
|
|
|
2942
2989
|
}
|
|
2943
2990
|
}
|
|
2944
2991
|
var MetaProperty$0 = $S(New, Dot, Target);
|
|
2945
|
-
var MetaProperty$1 = $
|
|
2992
|
+
var MetaProperty$1 = $TS($S($EXPECT($L14, fail, 'MetaProperty "import.meta"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
2946
2993
|
return { $loc, token: $1 };
|
|
2947
2994
|
});
|
|
2948
2995
|
function MetaProperty(state) {
|
|
@@ -5589,32 +5636,35 @@ ${input.slice(result.pos)}
|
|
|
5589
5636
|
var BinaryOpSymbol$0 = $EXPECT($L48, fail, 'BinaryOpSymbol "**"');
|
|
5590
5637
|
var BinaryOpSymbol$1 = $EXPECT($L49, fail, 'BinaryOpSymbol "*"');
|
|
5591
5638
|
var BinaryOpSymbol$2 = $EXPECT($L50, fail, 'BinaryOpSymbol "/"');
|
|
5592
|
-
var BinaryOpSymbol$3 = $EXPECT($L51, fail, 'BinaryOpSymbol "
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
var BinaryOpSymbol$
|
|
5639
|
+
var BinaryOpSymbol$3 = $TV($EXPECT($L51, fail, 'BinaryOpSymbol "%%"'), function($skip, $loc, $0, $1) {
|
|
5640
|
+
return {
|
|
5641
|
+
call: module2.getRef("modulo"),
|
|
5642
|
+
special: true
|
|
5643
|
+
};
|
|
5644
|
+
});
|
|
5645
|
+
var BinaryOpSymbol$4 = $EXPECT($L52, fail, 'BinaryOpSymbol "%"');
|
|
5646
|
+
var BinaryOpSymbol$5 = $EXPECT($L53, fail, 'BinaryOpSymbol "+"');
|
|
5647
|
+
var BinaryOpSymbol$6 = $EXPECT($L54, fail, 'BinaryOpSymbol "-"');
|
|
5648
|
+
var BinaryOpSymbol$7 = $EXPECT($L55, fail, 'BinaryOpSymbol "<="');
|
|
5649
|
+
var BinaryOpSymbol$8 = $EXPECT($L56, fail, 'BinaryOpSymbol ">="');
|
|
5650
|
+
var BinaryOpSymbol$9 = $EXPECT($L57, fail, 'BinaryOpSymbol "<<"');
|
|
5651
|
+
var BinaryOpSymbol$10 = $TR($EXPECT($R5, fail, "BinaryOpSymbol /<(?!\\p{ID_Start}|[_$])/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
|
|
5599
5652
|
return "<";
|
|
5600
5653
|
});
|
|
5601
|
-
var BinaryOpSymbol$
|
|
5602
|
-
var BinaryOpSymbol$
|
|
5603
|
-
var BinaryOpSymbol$
|
|
5604
|
-
var BinaryOpSymbol$
|
|
5605
|
-
var BinaryOpSymbol$
|
|
5654
|
+
var BinaryOpSymbol$11 = $EXPECT($L58, fail, 'BinaryOpSymbol ">>>"');
|
|
5655
|
+
var BinaryOpSymbol$12 = $EXPECT($L59, fail, 'BinaryOpSymbol ">>"');
|
|
5656
|
+
var BinaryOpSymbol$13 = $EXPECT($L27, fail, 'BinaryOpSymbol ">"');
|
|
5657
|
+
var BinaryOpSymbol$14 = $EXPECT($L60, fail, 'BinaryOpSymbol "!=="');
|
|
5658
|
+
var BinaryOpSymbol$15 = $TV($EXPECT($L61, fail, 'BinaryOpSymbol "!="'), function($skip, $loc, $0, $1) {
|
|
5606
5659
|
if (module2.config.coffeeEq)
|
|
5607
5660
|
return "!==";
|
|
5608
5661
|
return $1;
|
|
5609
5662
|
});
|
|
5610
|
-
var BinaryOpSymbol$
|
|
5663
|
+
var BinaryOpSymbol$16 = $TS($S($EXPECT($L62, fail, 'BinaryOpSymbol "isnt"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
5611
5664
|
if (module2.config.coffeeIsnt)
|
|
5612
5665
|
return "!==";
|
|
5613
5666
|
return $skip;
|
|
5614
5667
|
});
|
|
5615
|
-
var BinaryOpSymbol$16 = $T($S($EXPECT($L62, fail, 'BinaryOpSymbol "is"'), NonIdContinue), function(value) {
|
|
5616
|
-
return "===";
|
|
5617
|
-
});
|
|
5618
5668
|
var BinaryOpSymbol$17 = $EXPECT($L63, fail, 'BinaryOpSymbol "==="');
|
|
5619
5669
|
var BinaryOpSymbol$18 = $TV($EXPECT($L64, fail, 'BinaryOpSymbol "=="'), function($skip, $loc, $0, $1) {
|
|
5620
5670
|
if (module2.config.coffeeEq)
|
|
@@ -5646,33 +5696,43 @@ ${input.slice(result.pos)}
|
|
|
5646
5696
|
special: true
|
|
5647
5697
|
};
|
|
5648
5698
|
});
|
|
5649
|
-
var BinaryOpSymbol$28 = $
|
|
5699
|
+
var BinaryOpSymbol$28 = $TV($C($S($N(CoffeeOfEnabled), $EXPECT($L73, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue), $S(CoffeeOfEnabled, $EXPECT($L73, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L67, fail, 'BinaryOpSymbol "of"'), NonIdContinue)), function($skip, $loc, $0, $1) {
|
|
5650
5700
|
return {
|
|
5651
5701
|
$loc,
|
|
5652
5702
|
token: "in",
|
|
5653
5703
|
special: true
|
|
5654
5704
|
};
|
|
5655
5705
|
});
|
|
5656
|
-
var BinaryOpSymbol$29 = $
|
|
5706
|
+
var BinaryOpSymbol$29 = $TV($C($S($EXPECT($L75, fail, 'BinaryOpSymbol "is"'), NonIdContinue, __, $EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue), $S(CoffeeOfEnabled, $EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue)), function($skip, $loc, $0, $1) {
|
|
5657
5707
|
return {
|
|
5658
|
-
|
|
5708
|
+
call: [module2.getRef("indexOf"), ".call"],
|
|
5709
|
+
relational: true,
|
|
5710
|
+
reversed: true,
|
|
5659
5711
|
suffix: " >= 0",
|
|
5660
5712
|
special: true
|
|
5661
5713
|
};
|
|
5662
5714
|
});
|
|
5663
|
-
var BinaryOpSymbol$30 = $
|
|
5715
|
+
var BinaryOpSymbol$30 = $TV($C($S($EXPECT($L75, fail, 'BinaryOpSymbol "is"'), NonIdContinue, __, $EXPECT($L73, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue), $S(CoffeeOfEnabled, $EXPECT($L73, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue)), function($skip, $loc, $0, $1) {
|
|
5664
5716
|
return {
|
|
5665
|
-
|
|
5717
|
+
call: [module2.getRef("indexOf"), ".call"],
|
|
5718
|
+
relational: true,
|
|
5719
|
+
reversed: true,
|
|
5666
5720
|
suffix: " < 0",
|
|
5667
5721
|
special: true
|
|
5668
5722
|
};
|
|
5669
5723
|
});
|
|
5670
|
-
var BinaryOpSymbol$31 = $
|
|
5724
|
+
var BinaryOpSymbol$31 = $T($S($N(CoffeeNotEnabled), $EXPECT($L75, fail, 'BinaryOpSymbol "is"'), NonIdContinue, __, $EXPECT($L73, fail, 'BinaryOpSymbol "not"'), NonIdContinue), function(value) {
|
|
5725
|
+
return "!==";
|
|
5726
|
+
});
|
|
5727
|
+
var BinaryOpSymbol$32 = $T($S($EXPECT($L75, fail, 'BinaryOpSymbol "is"'), NonIdContinue), function(value) {
|
|
5728
|
+
return "===";
|
|
5729
|
+
});
|
|
5730
|
+
var BinaryOpSymbol$33 = $TS($S($EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
5671
5731
|
return $1;
|
|
5672
5732
|
});
|
|
5673
|
-
var BinaryOpSymbol$
|
|
5674
|
-
var BinaryOpSymbol$
|
|
5675
|
-
var BinaryOpSymbol$
|
|
5733
|
+
var BinaryOpSymbol$34 = $EXPECT($L76, fail, 'BinaryOpSymbol "&"');
|
|
5734
|
+
var BinaryOpSymbol$35 = $EXPECT($L77, fail, 'BinaryOpSymbol "^"');
|
|
5735
|
+
var BinaryOpSymbol$36 = $EXPECT($L78, fail, 'BinaryOpSymbol "|"');
|
|
5676
5736
|
function BinaryOpSymbol(state) {
|
|
5677
5737
|
if (state.events) {
|
|
5678
5738
|
const result = state.events.enter?.("BinaryOpSymbol", state);
|
|
@@ -5680,12 +5740,12 @@ ${input.slice(result.pos)}
|
|
|
5680
5740
|
return result.cache;
|
|
5681
5741
|
}
|
|
5682
5742
|
if (state.tokenize) {
|
|
5683
|
-
const result = $TOKEN("BinaryOpSymbol", state, BinaryOpSymbol$0(state) || BinaryOpSymbol$1(state) || BinaryOpSymbol$2(state) || BinaryOpSymbol$3(state) || BinaryOpSymbol$4(state) || BinaryOpSymbol$5(state) || BinaryOpSymbol$6(state) || BinaryOpSymbol$7(state) || BinaryOpSymbol$8(state) || BinaryOpSymbol$9(state) || BinaryOpSymbol$10(state) || BinaryOpSymbol$11(state) || BinaryOpSymbol$12(state) || BinaryOpSymbol$13(state) || BinaryOpSymbol$14(state) || BinaryOpSymbol$15(state) || BinaryOpSymbol$16(state) || BinaryOpSymbol$17(state) || BinaryOpSymbol$18(state) || BinaryOpSymbol$19(state) || BinaryOpSymbol$20(state) || BinaryOpSymbol$21(state) || BinaryOpSymbol$22(state) || BinaryOpSymbol$23(state) || BinaryOpSymbol$24(state) || BinaryOpSymbol$25(state) || BinaryOpSymbol$26(state) || BinaryOpSymbol$27(state) || BinaryOpSymbol$28(state) || BinaryOpSymbol$29(state) || BinaryOpSymbol$30(state) || BinaryOpSymbol$31(state) || BinaryOpSymbol$32(state) || BinaryOpSymbol$33(state) || BinaryOpSymbol$34(state));
|
|
5743
|
+
const result = $TOKEN("BinaryOpSymbol", state, BinaryOpSymbol$0(state) || BinaryOpSymbol$1(state) || BinaryOpSymbol$2(state) || BinaryOpSymbol$3(state) || BinaryOpSymbol$4(state) || BinaryOpSymbol$5(state) || BinaryOpSymbol$6(state) || BinaryOpSymbol$7(state) || BinaryOpSymbol$8(state) || BinaryOpSymbol$9(state) || BinaryOpSymbol$10(state) || BinaryOpSymbol$11(state) || BinaryOpSymbol$12(state) || BinaryOpSymbol$13(state) || BinaryOpSymbol$14(state) || BinaryOpSymbol$15(state) || BinaryOpSymbol$16(state) || BinaryOpSymbol$17(state) || BinaryOpSymbol$18(state) || BinaryOpSymbol$19(state) || BinaryOpSymbol$20(state) || BinaryOpSymbol$21(state) || BinaryOpSymbol$22(state) || BinaryOpSymbol$23(state) || BinaryOpSymbol$24(state) || BinaryOpSymbol$25(state) || BinaryOpSymbol$26(state) || BinaryOpSymbol$27(state) || BinaryOpSymbol$28(state) || BinaryOpSymbol$29(state) || BinaryOpSymbol$30(state) || BinaryOpSymbol$31(state) || BinaryOpSymbol$32(state) || BinaryOpSymbol$33(state) || BinaryOpSymbol$34(state) || BinaryOpSymbol$35(state) || BinaryOpSymbol$36(state));
|
|
5684
5744
|
if (state.events)
|
|
5685
5745
|
state.events.exit?.("BinaryOpSymbol", state, result);
|
|
5686
5746
|
return result;
|
|
5687
5747
|
} else {
|
|
5688
|
-
const result = BinaryOpSymbol$0(state) || BinaryOpSymbol$1(state) || BinaryOpSymbol$2(state) || BinaryOpSymbol$3(state) || BinaryOpSymbol$4(state) || BinaryOpSymbol$5(state) || BinaryOpSymbol$6(state) || BinaryOpSymbol$7(state) || BinaryOpSymbol$8(state) || BinaryOpSymbol$9(state) || BinaryOpSymbol$10(state) || BinaryOpSymbol$11(state) || BinaryOpSymbol$12(state) || BinaryOpSymbol$13(state) || BinaryOpSymbol$14(state) || BinaryOpSymbol$15(state) || BinaryOpSymbol$16(state) || BinaryOpSymbol$17(state) || BinaryOpSymbol$18(state) || BinaryOpSymbol$19(state) || BinaryOpSymbol$20(state) || BinaryOpSymbol$21(state) || BinaryOpSymbol$22(state) || BinaryOpSymbol$23(state) || BinaryOpSymbol$24(state) || BinaryOpSymbol$25(state) || BinaryOpSymbol$26(state) || BinaryOpSymbol$27(state) || BinaryOpSymbol$28(state) || BinaryOpSymbol$29(state) || BinaryOpSymbol$30(state) || BinaryOpSymbol$31(state) || BinaryOpSymbol$32(state) || BinaryOpSymbol$33(state) || BinaryOpSymbol$34(state);
|
|
5748
|
+
const result = BinaryOpSymbol$0(state) || BinaryOpSymbol$1(state) || BinaryOpSymbol$2(state) || BinaryOpSymbol$3(state) || BinaryOpSymbol$4(state) || BinaryOpSymbol$5(state) || BinaryOpSymbol$6(state) || BinaryOpSymbol$7(state) || BinaryOpSymbol$8(state) || BinaryOpSymbol$9(state) || BinaryOpSymbol$10(state) || BinaryOpSymbol$11(state) || BinaryOpSymbol$12(state) || BinaryOpSymbol$13(state) || BinaryOpSymbol$14(state) || BinaryOpSymbol$15(state) || BinaryOpSymbol$16(state) || BinaryOpSymbol$17(state) || BinaryOpSymbol$18(state) || BinaryOpSymbol$19(state) || BinaryOpSymbol$20(state) || BinaryOpSymbol$21(state) || BinaryOpSymbol$22(state) || BinaryOpSymbol$23(state) || BinaryOpSymbol$24(state) || BinaryOpSymbol$25(state) || BinaryOpSymbol$26(state) || BinaryOpSymbol$27(state) || BinaryOpSymbol$28(state) || BinaryOpSymbol$29(state) || BinaryOpSymbol$30(state) || BinaryOpSymbol$31(state) || BinaryOpSymbol$32(state) || BinaryOpSymbol$33(state) || BinaryOpSymbol$34(state) || BinaryOpSymbol$35(state) || BinaryOpSymbol$36(state);
|
|
5689
5749
|
if (state.events)
|
|
5690
5750
|
state.events.exit?.("BinaryOpSymbol", state, result);
|
|
5691
5751
|
return result;
|
|
@@ -5811,7 +5871,7 @@ ${input.slice(result.pos)}
|
|
|
5811
5871
|
return result;
|
|
5812
5872
|
}
|
|
5813
5873
|
}
|
|
5814
|
-
var EmptyStatement$0 = $T($S($Q(TrailingComment), $Y($EXPECT($
|
|
5874
|
+
var EmptyStatement$0 = $T($S($Q(TrailingComment), $Y($EXPECT($L79, fail, 'EmptyStatement ";"'))), function(value) {
|
|
5815
5875
|
return { "type": "EmptyStatement", "children": value[0] };
|
|
5816
5876
|
});
|
|
5817
5877
|
function EmptyStatement(state) {
|
|
@@ -6083,7 +6143,7 @@ ${input.slice(result.pos)}
|
|
|
6083
6143
|
children: [$1, exps, $3, $4, $5]
|
|
6084
6144
|
};
|
|
6085
6145
|
});
|
|
6086
|
-
var ElseExpressionBlock$1 = $T($S($N(EOS),
|
|
6146
|
+
var ElseExpressionBlock$1 = $T($S($N(EOS), ExpressionWithIndentedApplicationSuppressed), function(value) {
|
|
6087
6147
|
return value[1];
|
|
6088
6148
|
});
|
|
6089
6149
|
function ElseExpressionBlock(state) {
|
|
@@ -6657,7 +6717,7 @@ ${input.slice(result.pos)}
|
|
|
6657
6717
|
return result;
|
|
6658
6718
|
}
|
|
6659
6719
|
}
|
|
6660
|
-
var CoffeeForDeclaration$0 = $TS($S($E($S(__, $EXPECT($
|
|
6720
|
+
var CoffeeForDeclaration$0 = $TS($S($E($S(__, $EXPECT($L80, fail, 'CoffeeForDeclaration "own"'), NonIdContinue)), ForBinding), function($skip, $loc, $0, $1, $2) {
|
|
6661
6721
|
var own = $1;
|
|
6662
6722
|
var binding = $2;
|
|
6663
6723
|
if (own) {
|
|
@@ -7201,7 +7261,7 @@ ${input.slice(result.pos)}
|
|
|
7201
7261
|
return result;
|
|
7202
7262
|
}
|
|
7203
7263
|
}
|
|
7204
|
-
var Finally$0 = $S(__, $EXPECT($
|
|
7264
|
+
var Finally$0 = $S(__, $EXPECT($L81, fail, 'Finally "finally"'), NonIdContinue, BracedBlock);
|
|
7205
7265
|
function Finally(state) {
|
|
7206
7266
|
if (state.events) {
|
|
7207
7267
|
const result = state.events.enter?.("Finally", state);
|
|
@@ -7337,13 +7397,13 @@ ${input.slice(result.pos)}
|
|
|
7337
7397
|
return result;
|
|
7338
7398
|
}
|
|
7339
7399
|
}
|
|
7340
|
-
var KeywordStatement$0 = $T($S($EXPECT($
|
|
7400
|
+
var KeywordStatement$0 = $T($S($EXPECT($L82, fail, 'KeywordStatement "break"'), NonIdContinue), function(value) {
|
|
7341
7401
|
return { "type": "BreakStatement", "children": value };
|
|
7342
7402
|
});
|
|
7343
|
-
var KeywordStatement$1 = $T($S($EXPECT($
|
|
7403
|
+
var KeywordStatement$1 = $T($S($EXPECT($L83, fail, 'KeywordStatement "continue"'), NonIdContinue), function(value) {
|
|
7344
7404
|
return { "type": "ContinueStatement", "children": value };
|
|
7345
7405
|
});
|
|
7346
|
-
var KeywordStatement$2 = $T($S($EXPECT($
|
|
7406
|
+
var KeywordStatement$2 = $T($S($EXPECT($L84, fail, 'KeywordStatement "debugger"'), NonIdContinue), function(value) {
|
|
7347
7407
|
return { "type": "DebuggerStatement", "children": value };
|
|
7348
7408
|
});
|
|
7349
7409
|
var KeywordStatement$3 = $T($S(Return, $E(MaybeNestedExpression)), function(value) {
|
|
@@ -7370,7 +7430,7 @@ ${input.slice(result.pos)}
|
|
|
7370
7430
|
return result;
|
|
7371
7431
|
}
|
|
7372
7432
|
}
|
|
7373
|
-
var DebuggerExpression$0 = $TS($S($EXPECT($
|
|
7433
|
+
var DebuggerExpression$0 = $TS($S($EXPECT($L84, fail, 'DebuggerExpression "debugger"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
7374
7434
|
return {
|
|
7375
7435
|
type: "DebuggerExpression",
|
|
7376
7436
|
children: ["(()=>{", $1, "})()"]
|
|
@@ -7443,7 +7503,7 @@ ${input.slice(result.pos)}
|
|
|
7443
7503
|
return result;
|
|
7444
7504
|
}
|
|
7445
7505
|
}
|
|
7446
|
-
var ImportDeclaration$0 = $T($S($EXPECT($
|
|
7506
|
+
var ImportDeclaration$0 = $T($S($EXPECT($L85, fail, 'ImportDeclaration "import type"'), NonIdContinue, __, ImportClause, __, FromClause), function(value) {
|
|
7447
7507
|
return { "ts": true, "children": value };
|
|
7448
7508
|
});
|
|
7449
7509
|
var ImportDeclaration$1 = $S(Import, __, ImportClause, __, FromClause);
|
|
@@ -7743,7 +7803,7 @@ ${input.slice(result.pos)}
|
|
|
7743
7803
|
return result;
|
|
7744
7804
|
}
|
|
7745
7805
|
}
|
|
7746
|
-
var ExportDeclaration$0 = $S(Export, __, $EXPECT($
|
|
7806
|
+
var ExportDeclaration$0 = $S(Export, __, $EXPECT($L86, fail, 'ExportDeclaration "default"'), NonIdContinue, __, $C(HoistableDeclaration, ClassDeclaration, ExtendedExpression));
|
|
7747
7807
|
var ExportDeclaration$1 = $S(Export, __, ExportFromClause, __, FromClause);
|
|
7748
7808
|
var ExportDeclaration$2 = $S(Export, __, $C(Declaration, NamedExports, VariableStatement, ExportVarDec));
|
|
7749
7809
|
function ExportDeclaration(state) {
|
|
@@ -7846,7 +7906,7 @@ ${input.slice(result.pos)}
|
|
|
7846
7906
|
return result;
|
|
7847
7907
|
}
|
|
7848
7908
|
}
|
|
7849
|
-
var ImplicitExportSpecifier$0 = $S($N($EXPECT($
|
|
7909
|
+
var ImplicitExportSpecifier$0 = $S($N($EXPECT($L86, fail, 'ImplicitExportSpecifier "default"')), ModuleExportName, $E($S(__, As, __, ModuleExportName)), $C($Y($S(__, From)), ImplicitInlineObjectPropertyDelimiter));
|
|
7850
7910
|
function ImplicitExportSpecifier(state) {
|
|
7851
7911
|
if (state.events) {
|
|
7852
7912
|
const result = state.events.enter?.("ImplicitExportSpecifier", state);
|
|
@@ -8001,7 +8061,7 @@ ${input.slice(result.pos)}
|
|
|
8001
8061
|
return result;
|
|
8002
8062
|
}
|
|
8003
8063
|
}
|
|
8004
|
-
var ConstAssignment$0 = $TV($EXPECT($
|
|
8064
|
+
var ConstAssignment$0 = $TV($EXPECT($L87, fail, 'ConstAssignment ":="'), function($skip, $loc, $0, $1) {
|
|
8005
8065
|
return { $loc, token: "=" };
|
|
8006
8066
|
});
|
|
8007
8067
|
function ConstAssignment(state) {
|
|
@@ -8022,10 +8082,10 @@ ${input.slice(result.pos)}
|
|
|
8022
8082
|
return result;
|
|
8023
8083
|
}
|
|
8024
8084
|
}
|
|
8025
|
-
var LetAssignment$0 = $TV($EXPECT($
|
|
8085
|
+
var LetAssignment$0 = $TV($EXPECT($L88, fail, 'LetAssignment "::="'), function($skip, $loc, $0, $1) {
|
|
8026
8086
|
return { $loc, token: "=" };
|
|
8027
8087
|
});
|
|
8028
|
-
var LetAssignment$1 = $TV($EXPECT($
|
|
8088
|
+
var LetAssignment$1 = $TV($EXPECT($L89, fail, 'LetAssignment ".="'), function($skip, $loc, $0, $1) {
|
|
8029
8089
|
return { $loc, token: "=" };
|
|
8030
8090
|
});
|
|
8031
8091
|
function LetAssignment(state) {
|
|
@@ -8929,7 +8989,9 @@ ${input.slice(result.pos)}
|
|
|
8929
8989
|
var ReservedWord$1 = $S(CoffeeIsntEnabled, $R$0($EXPECT($R33, fail, "ReservedWord /(?:isnt)(?!\\p{ID_Continue})/")));
|
|
8930
8990
|
var ReservedWord$2 = $S(CoffeeForLoopsEnabled, $R$0($EXPECT($R34, fail, "ReservedWord /(?:by)(?!\\p{ID_Continue})/")));
|
|
8931
8991
|
var ReservedWord$3 = $S(CoffeeOfEnabled, $R$0($EXPECT($R35, fail, "ReservedWord /(?:of)(?!\\p{ID_Continue})/")));
|
|
8932
|
-
var ReservedWord$4 = $R$0($EXPECT($R36, fail, "ReservedWord /(?:
|
|
8992
|
+
var ReservedWord$4 = $S(CoffeeNotEnabled, $R$0($EXPECT($R36, fail, "ReservedWord /(?:not)(?!\\p{ID_Continue})/")));
|
|
8993
|
+
var ReservedWord$5 = $S($EXPECT($L73, fail, 'ReservedWord "not"'), NonIdContinue, __, $EXPECT($L74, fail, 'ReservedWord "in"'), NonIdContinue);
|
|
8994
|
+
var ReservedWord$6 = $R$0($EXPECT($R37, fail, "ReservedWord /(?:and|as|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|if|import|in|instanceof|interface|is|let|loop|new|null|or|private|protected|public|return|satisfies|static|super|switch|this|throw|true|try|typeof|unless|until|var|void|while|with|yield)(?!\\p{ID_Continue})/"));
|
|
8933
8995
|
function ReservedWord(state) {
|
|
8934
8996
|
if (state.events) {
|
|
8935
8997
|
const result = state.events.enter?.("ReservedWord", state);
|
|
@@ -8937,12 +8999,12 @@ ${input.slice(result.pos)}
|
|
|
8937
8999
|
return result.cache;
|
|
8938
9000
|
}
|
|
8939
9001
|
if (state.tokenize) {
|
|
8940
|
-
const result = $TOKEN("ReservedWord", state, ReservedWord$0(state) || ReservedWord$1(state) || ReservedWord$2(state) || ReservedWord$3(state) || ReservedWord$4(state));
|
|
9002
|
+
const result = $TOKEN("ReservedWord", state, ReservedWord$0(state) || ReservedWord$1(state) || ReservedWord$2(state) || ReservedWord$3(state) || ReservedWord$4(state) || ReservedWord$5(state) || ReservedWord$6(state));
|
|
8941
9003
|
if (state.events)
|
|
8942
9004
|
state.events.exit?.("ReservedWord", state, result);
|
|
8943
9005
|
return result;
|
|
8944
9006
|
} else {
|
|
8945
|
-
const result = ReservedWord$0(state) || ReservedWord$1(state) || ReservedWord$2(state) || ReservedWord$3(state) || ReservedWord$4(state);
|
|
9007
|
+
const result = ReservedWord$0(state) || ReservedWord$1(state) || ReservedWord$2(state) || ReservedWord$3(state) || ReservedWord$4(state) || ReservedWord$5(state) || ReservedWord$6(state);
|
|
8946
9008
|
if (state.events)
|
|
8947
9009
|
state.events.exit?.("ReservedWord", state, result);
|
|
8948
9010
|
return result;
|
|
@@ -8988,7 +9050,7 @@ ${input.slice(result.pos)}
|
|
|
8988
9050
|
return result;
|
|
8989
9051
|
}
|
|
8990
9052
|
}
|
|
8991
|
-
var JSSingleLineComment$0 = $TR($EXPECT($
|
|
9053
|
+
var JSSingleLineComment$0 = $TR($EXPECT($R38, fail, "JSSingleLineComment /\\/\\/(?!\\/)[^\\r\\n]*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
|
|
8992
9054
|
return { $loc, token: $0 };
|
|
8993
9055
|
});
|
|
8994
9056
|
function JSSingleLineComment(state) {
|
|
@@ -9029,7 +9091,7 @@ ${input.slice(result.pos)}
|
|
|
9029
9091
|
return result;
|
|
9030
9092
|
}
|
|
9031
9093
|
}
|
|
9032
|
-
var JSMultiLineComment$0 = $TV($TEXT($S($EXPECT($
|
|
9094
|
+
var JSMultiLineComment$0 = $TV($TEXT($S($EXPECT($L90, fail, 'JSMultiLineComment "/*"'), $Q($S($N($EXPECT($L91, fail, 'JSMultiLineComment "*/"')), $EXPECT($R39, fail, "JSMultiLineComment /./"))), $EXPECT($L91, fail, 'JSMultiLineComment "*/"'))), function($skip, $loc, $0, $1) {
|
|
9033
9095
|
return { $loc, token: $1 };
|
|
9034
9096
|
});
|
|
9035
9097
|
function JSMultiLineComment(state) {
|
|
@@ -9050,7 +9112,7 @@ ${input.slice(result.pos)}
|
|
|
9050
9112
|
return result;
|
|
9051
9113
|
}
|
|
9052
9114
|
}
|
|
9053
|
-
var CoffeeSingleLineComment$0 = $TR($EXPECT($
|
|
9115
|
+
var CoffeeSingleLineComment$0 = $TR($EXPECT($R40, fail, "CoffeeSingleLineComment /#(?!##(?!#))([^\\r\\n]*)/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
|
|
9054
9116
|
return { $loc, token: `//${$1}` };
|
|
9055
9117
|
});
|
|
9056
9118
|
function CoffeeSingleLineComment(state) {
|
|
@@ -9071,7 +9133,7 @@ ${input.slice(result.pos)}
|
|
|
9071
9133
|
return result;
|
|
9072
9134
|
}
|
|
9073
9135
|
}
|
|
9074
|
-
var CoffeeMultiLineComment$0 = $TS($S(CoffeeHereCommentStart, $TEXT($Q($S($N($C(CoffeeHereCommentStart, $EXPECT($
|
|
9136
|
+
var CoffeeMultiLineComment$0 = $TS($S(CoffeeHereCommentStart, $TEXT($Q($S($N($C(CoffeeHereCommentStart, $EXPECT($L91, fail, 'CoffeeMultiLineComment "*/"'))), $EXPECT($R39, fail, "CoffeeMultiLineComment /./")))), CoffeeHereCommentStart), function($skip, $loc, $0, $1, $2, $3) {
|
|
9075
9137
|
return { $loc, token: `/*${$2}*/` };
|
|
9076
9138
|
});
|
|
9077
9139
|
function CoffeeMultiLineComment(state) {
|
|
@@ -9092,7 +9154,7 @@ ${input.slice(result.pos)}
|
|
|
9092
9154
|
return result;
|
|
9093
9155
|
}
|
|
9094
9156
|
}
|
|
9095
|
-
var CoffeeHereCommentStart$0 = $R$0($EXPECT($
|
|
9157
|
+
var CoffeeHereCommentStart$0 = $R$0($EXPECT($R41, fail, "CoffeeHereCommentStart /###(?!#)/"));
|
|
9096
9158
|
function CoffeeHereCommentStart(state) {
|
|
9097
9159
|
if (state.events) {
|
|
9098
9160
|
const result = state.events.enter?.("CoffeeHereCommentStart", state);
|
|
@@ -9111,7 +9173,7 @@ ${input.slice(result.pos)}
|
|
|
9111
9173
|
return result;
|
|
9112
9174
|
}
|
|
9113
9175
|
}
|
|
9114
|
-
var InlineComment$0 = $TV($TEXT($S($EXPECT($
|
|
9176
|
+
var InlineComment$0 = $TV($TEXT($S($EXPECT($L90, fail, 'InlineComment "/*"'), $TEXT($Q($S($N($EXPECT($L91, fail, 'InlineComment "*/"')), $EXPECT($R42, fail, "InlineComment /[^\\r\\n]/")))), $EXPECT($L91, fail, 'InlineComment "*/"'))), function($skip, $loc, $0, $1) {
|
|
9115
9177
|
return { $loc, token: $1 };
|
|
9116
9178
|
});
|
|
9117
9179
|
function InlineComment(state) {
|
|
@@ -9191,10 +9253,10 @@ ${input.slice(result.pos)}
|
|
|
9191
9253
|
return result;
|
|
9192
9254
|
}
|
|
9193
9255
|
}
|
|
9194
|
-
var NonNewlineWhitespace$0 = $TR($EXPECT($
|
|
9256
|
+
var NonNewlineWhitespace$0 = $TR($EXPECT($R43, fail, "NonNewlineWhitespace /[ \\t]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
|
|
9195
9257
|
return { $loc, token: $0 };
|
|
9196
9258
|
});
|
|
9197
|
-
var NonNewlineWhitespace$1 = $T($S(CoffeeLineContinuationEnabled, $EXPECT($
|
|
9259
|
+
var NonNewlineWhitespace$1 = $T($S(CoffeeLineContinuationEnabled, $EXPECT($L92, fail, 'NonNewlineWhitespace "\\\\\\\\"'), EOL), function(value) {
|
|
9198
9260
|
return "";
|
|
9199
9261
|
});
|
|
9200
9262
|
function NonNewlineWhitespace(state) {
|
|
@@ -9323,7 +9385,7 @@ ${input.slice(result.pos)}
|
|
|
9323
9385
|
return result;
|
|
9324
9386
|
}
|
|
9325
9387
|
}
|
|
9326
|
-
var NonIdContinue$0 = $R$0($EXPECT($
|
|
9388
|
+
var NonIdContinue$0 = $R$0($EXPECT($R44, fail, "NonIdContinue /(?!\\p{ID_Continue})/"));
|
|
9327
9389
|
function NonIdContinue(state) {
|
|
9328
9390
|
if (state.events) {
|
|
9329
9391
|
const result = state.events.enter?.("NonIdContinue", state);
|
|
@@ -9363,7 +9425,7 @@ ${input.slice(result.pos)}
|
|
|
9363
9425
|
return result;
|
|
9364
9426
|
}
|
|
9365
9427
|
}
|
|
9366
|
-
var Abstract$0 = $TV($TEXT($S($EXPECT($
|
|
9428
|
+
var Abstract$0 = $TV($TEXT($S($EXPECT($L93, fail, 'Abstract "abstract"'), NonIdContinue, $E($EXPECT($L4, fail, 'Abstract " "')))), function($skip, $loc, $0, $1) {
|
|
9367
9429
|
return { $loc, token: $1, ts: true };
|
|
9368
9430
|
});
|
|
9369
9431
|
function Abstract(state) {
|
|
@@ -9384,7 +9446,7 @@ ${input.slice(result.pos)}
|
|
|
9384
9446
|
return result;
|
|
9385
9447
|
}
|
|
9386
9448
|
}
|
|
9387
|
-
var Ampersand$0 = $TV($EXPECT($
|
|
9449
|
+
var Ampersand$0 = $TV($EXPECT($L76, fail, 'Ampersand "&"'), function($skip, $loc, $0, $1) {
|
|
9388
9450
|
return { $loc, token: $1 };
|
|
9389
9451
|
});
|
|
9390
9452
|
function Ampersand(state) {
|
|
@@ -9405,7 +9467,7 @@ ${input.slice(result.pos)}
|
|
|
9405
9467
|
return result;
|
|
9406
9468
|
}
|
|
9407
9469
|
}
|
|
9408
|
-
var As$0 = $TS($S($EXPECT($
|
|
9470
|
+
var As$0 = $TS($S($EXPECT($L94, fail, 'As "as"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
9409
9471
|
return { $loc, token: $1 };
|
|
9410
9472
|
});
|
|
9411
9473
|
function As(state) {
|
|
@@ -9426,7 +9488,7 @@ ${input.slice(result.pos)}
|
|
|
9426
9488
|
return result;
|
|
9427
9489
|
}
|
|
9428
9490
|
}
|
|
9429
|
-
var At$0 = $TV($EXPECT($
|
|
9491
|
+
var At$0 = $TV($EXPECT($L95, fail, 'At "@"'), function($skip, $loc, $0, $1) {
|
|
9430
9492
|
return { $loc, token: $1 };
|
|
9431
9493
|
});
|
|
9432
9494
|
function At(state) {
|
|
@@ -9447,7 +9509,7 @@ ${input.slice(result.pos)}
|
|
|
9447
9509
|
return result;
|
|
9448
9510
|
}
|
|
9449
9511
|
}
|
|
9450
|
-
var AtAt$0 = $TV($EXPECT($
|
|
9512
|
+
var AtAt$0 = $TV($EXPECT($L96, fail, 'AtAt "@@"'), function($skip, $loc, $0, $1) {
|
|
9451
9513
|
return { $loc, token: "@" };
|
|
9452
9514
|
});
|
|
9453
9515
|
function AtAt(state) {
|
|
@@ -9468,7 +9530,7 @@ ${input.slice(result.pos)}
|
|
|
9468
9530
|
return result;
|
|
9469
9531
|
}
|
|
9470
9532
|
}
|
|
9471
|
-
var Async$0 = $
|
|
9533
|
+
var Async$0 = $TS($S($EXPECT($L97, fail, 'Async "async"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
9472
9534
|
return { $loc, token: $1, type: "Async" };
|
|
9473
9535
|
});
|
|
9474
9536
|
function Async(state) {
|
|
@@ -9489,7 +9551,7 @@ ${input.slice(result.pos)}
|
|
|
9489
9551
|
return result;
|
|
9490
9552
|
}
|
|
9491
9553
|
}
|
|
9492
|
-
var Await$0 = $TS($S($EXPECT($
|
|
9554
|
+
var Await$0 = $TS($S($EXPECT($L98, fail, 'Await "await"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
9493
9555
|
return { $loc, token: $1 };
|
|
9494
9556
|
});
|
|
9495
9557
|
function Await(state) {
|
|
@@ -9510,7 +9572,7 @@ ${input.slice(result.pos)}
|
|
|
9510
9572
|
return result;
|
|
9511
9573
|
}
|
|
9512
9574
|
}
|
|
9513
|
-
var Backtick$0 = $TV($EXPECT($
|
|
9575
|
+
var Backtick$0 = $TV($EXPECT($L99, fail, 'Backtick "`"'), function($skip, $loc, $0, $1) {
|
|
9514
9576
|
return { $loc, token: $1 };
|
|
9515
9577
|
});
|
|
9516
9578
|
function Backtick(state) {
|
|
@@ -9531,7 +9593,7 @@ ${input.slice(result.pos)}
|
|
|
9531
9593
|
return result;
|
|
9532
9594
|
}
|
|
9533
9595
|
}
|
|
9534
|
-
var By$0 = $TS($S($EXPECT($
|
|
9596
|
+
var By$0 = $TS($S($EXPECT($L100, fail, 'By "by"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
9535
9597
|
return { $loc, token: $1 };
|
|
9536
9598
|
});
|
|
9537
9599
|
function By(state) {
|
|
@@ -9552,7 +9614,7 @@ ${input.slice(result.pos)}
|
|
|
9552
9614
|
return result;
|
|
9553
9615
|
}
|
|
9554
9616
|
}
|
|
9555
|
-
var Case$0 = $TS($S($EXPECT($
|
|
9617
|
+
var Case$0 = $TS($S($EXPECT($L101, fail, 'Case "case"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
9556
9618
|
return { $loc, token: $1 };
|
|
9557
9619
|
});
|
|
9558
9620
|
function Case(state) {
|
|
@@ -9573,7 +9635,7 @@ ${input.slice(result.pos)}
|
|
|
9573
9635
|
return result;
|
|
9574
9636
|
}
|
|
9575
9637
|
}
|
|
9576
|
-
var Catch$0 = $
|
|
9638
|
+
var Catch$0 = $TS($S($EXPECT($L102, fail, 'Catch "catch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
9577
9639
|
return { $loc, token: $1 };
|
|
9578
9640
|
});
|
|
9579
9641
|
function Catch(state) {
|
|
@@ -9594,7 +9656,7 @@ ${input.slice(result.pos)}
|
|
|
9594
9656
|
return result;
|
|
9595
9657
|
}
|
|
9596
9658
|
}
|
|
9597
|
-
var Class$0 = $
|
|
9659
|
+
var Class$0 = $TS($S($EXPECT($L103, fail, 'Class "class"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
9598
9660
|
return { $loc, token: $1 };
|
|
9599
9661
|
});
|
|
9600
9662
|
function Class(state) {
|
|
@@ -9678,7 +9740,7 @@ ${input.slice(result.pos)}
|
|
|
9678
9740
|
return result;
|
|
9679
9741
|
}
|
|
9680
9742
|
}
|
|
9681
|
-
var CoffeeSubstitutionStart$0 = $TV($EXPECT($
|
|
9743
|
+
var CoffeeSubstitutionStart$0 = $TV($EXPECT($L104, fail, 'CoffeeSubstitutionStart "#{"'), function($skip, $loc, $0, $1) {
|
|
9682
9744
|
return { $loc, token: "${" };
|
|
9683
9745
|
});
|
|
9684
9746
|
function CoffeeSubstitutionStart(state) {
|
|
@@ -9720,7 +9782,7 @@ ${input.slice(result.pos)}
|
|
|
9720
9782
|
return result;
|
|
9721
9783
|
}
|
|
9722
9784
|
}
|
|
9723
|
-
var ConstructorShorthand$0 = $TV($EXPECT($
|
|
9785
|
+
var ConstructorShorthand$0 = $TV($EXPECT($L95, fail, 'ConstructorShorthand "@"'), function($skip, $loc, $0, $1) {
|
|
9724
9786
|
return { $loc, token: "constructor" };
|
|
9725
9787
|
});
|
|
9726
9788
|
function ConstructorShorthand(state) {
|
|
@@ -9741,7 +9803,7 @@ ${input.slice(result.pos)}
|
|
|
9741
9803
|
return result;
|
|
9742
9804
|
}
|
|
9743
9805
|
}
|
|
9744
|
-
var Default$0 = $TS($S($EXPECT($
|
|
9806
|
+
var Default$0 = $TS($S($EXPECT($L86, fail, 'Default "default"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
9745
9807
|
return { $loc, token: $1 };
|
|
9746
9808
|
});
|
|
9747
9809
|
function Default(state) {
|
|
@@ -9762,7 +9824,7 @@ ${input.slice(result.pos)}
|
|
|
9762
9824
|
return result;
|
|
9763
9825
|
}
|
|
9764
9826
|
}
|
|
9765
|
-
var Delete$0 = $TS($S($EXPECT($
|
|
9827
|
+
var Delete$0 = $TS($S($EXPECT($L105, fail, 'Delete "delete"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
9766
9828
|
return { $loc, token: $1 };
|
|
9767
9829
|
});
|
|
9768
9830
|
function Delete(state) {
|
|
@@ -9783,7 +9845,7 @@ ${input.slice(result.pos)}
|
|
|
9783
9845
|
return result;
|
|
9784
9846
|
}
|
|
9785
9847
|
}
|
|
9786
|
-
var Do$0 = $TS($S($EXPECT($
|
|
9848
|
+
var Do$0 = $TS($S($EXPECT($L106, fail, 'Do "do"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
9787
9849
|
return { $loc, token: $1 };
|
|
9788
9850
|
});
|
|
9789
9851
|
function Do(state) {
|
|
@@ -9825,7 +9887,7 @@ ${input.slice(result.pos)}
|
|
|
9825
9887
|
return result;
|
|
9826
9888
|
}
|
|
9827
9889
|
}
|
|
9828
|
-
var DotDot$0 = $TV($EXPECT($
|
|
9890
|
+
var DotDot$0 = $TV($EXPECT($L107, fail, 'DotDot ".."'), function($skip, $loc, $0, $1) {
|
|
9829
9891
|
return { $loc, token: $1 };
|
|
9830
9892
|
});
|
|
9831
9893
|
function DotDot(state) {
|
|
@@ -9846,7 +9908,7 @@ ${input.slice(result.pos)}
|
|
|
9846
9908
|
return result;
|
|
9847
9909
|
}
|
|
9848
9910
|
}
|
|
9849
|
-
var DotDotDot$0 = $TV($EXPECT($
|
|
9911
|
+
var DotDotDot$0 = $TV($EXPECT($L108, fail, 'DotDotDot "..."'), function($skip, $loc, $0, $1) {
|
|
9850
9912
|
return { $loc, token: $1 };
|
|
9851
9913
|
});
|
|
9852
9914
|
function DotDotDot(state) {
|
|
@@ -9867,7 +9929,7 @@ ${input.slice(result.pos)}
|
|
|
9867
9929
|
return result;
|
|
9868
9930
|
}
|
|
9869
9931
|
}
|
|
9870
|
-
var DoubleColon$0 = $TV($EXPECT($
|
|
9932
|
+
var DoubleColon$0 = $TV($EXPECT($L109, fail, 'DoubleColon "::"'), function($skip, $loc, $0, $1) {
|
|
9871
9933
|
return { $loc, token: $1 };
|
|
9872
9934
|
});
|
|
9873
9935
|
function DoubleColon(state) {
|
|
@@ -9888,7 +9950,7 @@ ${input.slice(result.pos)}
|
|
|
9888
9950
|
return result;
|
|
9889
9951
|
}
|
|
9890
9952
|
}
|
|
9891
|
-
var DoubleQuote$0 = $TV($EXPECT($
|
|
9953
|
+
var DoubleQuote$0 = $TV($EXPECT($L110, fail, 'DoubleQuote "\\\\\\""'), function($skip, $loc, $0, $1) {
|
|
9892
9954
|
return { $loc, token: $1 };
|
|
9893
9955
|
});
|
|
9894
9956
|
function DoubleQuote(state) {
|
|
@@ -9909,7 +9971,7 @@ ${input.slice(result.pos)}
|
|
|
9909
9971
|
return result;
|
|
9910
9972
|
}
|
|
9911
9973
|
}
|
|
9912
|
-
var Else$0 = $
|
|
9974
|
+
var Else$0 = $TS($S($EXPECT($L111, fail, 'Else "else"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
9913
9975
|
return { $loc, token: $1 };
|
|
9914
9976
|
});
|
|
9915
9977
|
function Else(state) {
|
|
@@ -9951,7 +10013,7 @@ ${input.slice(result.pos)}
|
|
|
9951
10013
|
return result;
|
|
9952
10014
|
}
|
|
9953
10015
|
}
|
|
9954
|
-
var Export$0 = $TS($S($EXPECT($
|
|
10016
|
+
var Export$0 = $TS($S($EXPECT($L112, fail, 'Export "export"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
9955
10017
|
return { $loc, token: $1 };
|
|
9956
10018
|
});
|
|
9957
10019
|
function Export(state) {
|
|
@@ -9972,7 +10034,7 @@ ${input.slice(result.pos)}
|
|
|
9972
10034
|
return result;
|
|
9973
10035
|
}
|
|
9974
10036
|
}
|
|
9975
|
-
var For$0 = $TS($S($EXPECT($
|
|
10037
|
+
var For$0 = $TS($S($EXPECT($L113, fail, 'For "for"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
9976
10038
|
return { $loc, token: $1 };
|
|
9977
10039
|
});
|
|
9978
10040
|
function For(state) {
|
|
@@ -9993,7 +10055,7 @@ ${input.slice(result.pos)}
|
|
|
9993
10055
|
return result;
|
|
9994
10056
|
}
|
|
9995
10057
|
}
|
|
9996
|
-
var From$0 = $TS($S($EXPECT($
|
|
10058
|
+
var From$0 = $TS($S($EXPECT($L114, fail, 'From "from"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
9997
10059
|
return { $loc, token: $1 };
|
|
9998
10060
|
});
|
|
9999
10061
|
function From(state) {
|
|
@@ -10014,7 +10076,7 @@ ${input.slice(result.pos)}
|
|
|
10014
10076
|
return result;
|
|
10015
10077
|
}
|
|
10016
10078
|
}
|
|
10017
|
-
var Function$0 = $
|
|
10079
|
+
var Function$0 = $TS($S($EXPECT($L115, fail, 'Function "function"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
10018
10080
|
return { $loc, token: $1 };
|
|
10019
10081
|
});
|
|
10020
10082
|
function Function(state) {
|
|
@@ -10035,7 +10097,7 @@ ${input.slice(result.pos)}
|
|
|
10035
10097
|
return result;
|
|
10036
10098
|
}
|
|
10037
10099
|
}
|
|
10038
|
-
var GetOrSet$0 = $TS($S($C($EXPECT($
|
|
10100
|
+
var GetOrSet$0 = $TS($S($C($EXPECT($L116, fail, 'GetOrSet "get"'), $EXPECT($L117, fail, 'GetOrSet "set"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
10039
10101
|
return { $loc, token: $1, type: "GetOrSet" };
|
|
10040
10102
|
});
|
|
10041
10103
|
function GetOrSet(state) {
|
|
@@ -10056,7 +10118,7 @@ ${input.slice(result.pos)}
|
|
|
10056
10118
|
return result;
|
|
10057
10119
|
}
|
|
10058
10120
|
}
|
|
10059
|
-
var If$0 = $TV($TEXT($S($EXPECT($
|
|
10121
|
+
var If$0 = $TV($TEXT($S($EXPECT($L118, fail, 'If "if"'), NonIdContinue, $E($EXPECT($L4, fail, 'If " "')))), function($skip, $loc, $0, $1) {
|
|
10060
10122
|
return { $loc, token: $1 };
|
|
10061
10123
|
});
|
|
10062
10124
|
function If(state) {
|
|
@@ -10077,7 +10139,7 @@ ${input.slice(result.pos)}
|
|
|
10077
10139
|
return result;
|
|
10078
10140
|
}
|
|
10079
10141
|
}
|
|
10080
|
-
var Import$0 = $TS($S($EXPECT($L11, fail, 'Import "import"'), $Y($EXPECT($
|
|
10142
|
+
var Import$0 = $TS($S($EXPECT($L11, fail, 'Import "import"'), $Y($EXPECT($R45, fail, "Import /\\s/"))), function($skip, $loc, $0, $1, $2) {
|
|
10081
10143
|
return { $loc, token: $1 };
|
|
10082
10144
|
});
|
|
10083
10145
|
function Import(state) {
|
|
@@ -10098,7 +10160,7 @@ ${input.slice(result.pos)}
|
|
|
10098
10160
|
return result;
|
|
10099
10161
|
}
|
|
10100
10162
|
}
|
|
10101
|
-
var In$0 = $
|
|
10163
|
+
var In$0 = $TS($S($EXPECT($L74, fail, 'In "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
10102
10164
|
return { $loc, token: $1 };
|
|
10103
10165
|
});
|
|
10104
10166
|
function In(state) {
|
|
@@ -10119,7 +10181,7 @@ ${input.slice(result.pos)}
|
|
|
10119
10181
|
return result;
|
|
10120
10182
|
}
|
|
10121
10183
|
}
|
|
10122
|
-
var LetOrConst$0 = $TS($S($C($EXPECT($
|
|
10184
|
+
var LetOrConst$0 = $TS($S($C($EXPECT($L119, fail, 'LetOrConst "let"'), $EXPECT($L120, fail, 'LetOrConst "const"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
10123
10185
|
return { $loc, token: $1 };
|
|
10124
10186
|
});
|
|
10125
10187
|
function LetOrConst(state) {
|
|
@@ -10140,7 +10202,7 @@ ${input.slice(result.pos)}
|
|
|
10140
10202
|
return result;
|
|
10141
10203
|
}
|
|
10142
10204
|
}
|
|
10143
|
-
var Loop$0 = $TS($S($EXPECT($
|
|
10205
|
+
var Loop$0 = $TS($S($EXPECT($L121, fail, 'Loop "loop"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
10144
10206
|
return { $loc, token: "while(true)" };
|
|
10145
10207
|
});
|
|
10146
10208
|
function Loop(state) {
|
|
@@ -10161,7 +10223,7 @@ ${input.slice(result.pos)}
|
|
|
10161
10223
|
return result;
|
|
10162
10224
|
}
|
|
10163
10225
|
}
|
|
10164
|
-
var New$0 = $TS($S($EXPECT($
|
|
10226
|
+
var New$0 = $TS($S($EXPECT($L122, fail, 'New "new"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
10165
10227
|
return { $loc, token: $1 };
|
|
10166
10228
|
});
|
|
10167
10229
|
function New(state) {
|
|
@@ -10203,7 +10265,7 @@ ${input.slice(result.pos)}
|
|
|
10203
10265
|
return result;
|
|
10204
10266
|
}
|
|
10205
10267
|
}
|
|
10206
|
-
var Of$0 = $
|
|
10268
|
+
var Of$0 = $TS($S($EXPECT($L67, fail, 'Of "of"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
10207
10269
|
return { $loc, token: $1 };
|
|
10208
10270
|
});
|
|
10209
10271
|
function Of(state) {
|
|
@@ -10224,7 +10286,7 @@ ${input.slice(result.pos)}
|
|
|
10224
10286
|
return result;
|
|
10225
10287
|
}
|
|
10226
10288
|
}
|
|
10227
|
-
var OpenBrace$0 = $TV($EXPECT($
|
|
10289
|
+
var OpenBrace$0 = $TV($EXPECT($L123, fail, 'OpenBrace "{"'), function($skip, $loc, $0, $1) {
|
|
10228
10290
|
return { $loc, token: $1 };
|
|
10229
10291
|
});
|
|
10230
10292
|
function OpenBrace(state) {
|
|
@@ -10245,7 +10307,7 @@ ${input.slice(result.pos)}
|
|
|
10245
10307
|
return result;
|
|
10246
10308
|
}
|
|
10247
10309
|
}
|
|
10248
|
-
var OpenBracket$0 = $TV($EXPECT($
|
|
10310
|
+
var OpenBracket$0 = $TV($EXPECT($L124, fail, 'OpenBracket "["'), function($skip, $loc, $0, $1) {
|
|
10249
10311
|
return { $loc, token: $1 };
|
|
10250
10312
|
});
|
|
10251
10313
|
function OpenBracket(state) {
|
|
@@ -10266,7 +10328,7 @@ ${input.slice(result.pos)}
|
|
|
10266
10328
|
return result;
|
|
10267
10329
|
}
|
|
10268
10330
|
}
|
|
10269
|
-
var OpenParen$0 = $TV($EXPECT($
|
|
10331
|
+
var OpenParen$0 = $TV($EXPECT($L125, fail, 'OpenParen "("'), function($skip, $loc, $0, $1) {
|
|
10270
10332
|
return { $loc, token: $1 };
|
|
10271
10333
|
});
|
|
10272
10334
|
function OpenParen(state) {
|
|
@@ -10287,7 +10349,7 @@ ${input.slice(result.pos)}
|
|
|
10287
10349
|
return result;
|
|
10288
10350
|
}
|
|
10289
10351
|
}
|
|
10290
|
-
var Public$0 = $TS($S($EXPECT($
|
|
10352
|
+
var Public$0 = $TS($S($EXPECT($L126, fail, 'Public "public"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
10291
10353
|
return { $loc, token: $1 };
|
|
10292
10354
|
});
|
|
10293
10355
|
function Public(state) {
|
|
@@ -10308,7 +10370,7 @@ ${input.slice(result.pos)}
|
|
|
10308
10370
|
return result;
|
|
10309
10371
|
}
|
|
10310
10372
|
}
|
|
10311
|
-
var Private$0 = $TS($S($EXPECT($
|
|
10373
|
+
var Private$0 = $TS($S($EXPECT($L127, fail, 'Private "private"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
10312
10374
|
return { $loc, token: $1 };
|
|
10313
10375
|
});
|
|
10314
10376
|
function Private(state) {
|
|
@@ -10329,7 +10391,7 @@ ${input.slice(result.pos)}
|
|
|
10329
10391
|
return result;
|
|
10330
10392
|
}
|
|
10331
10393
|
}
|
|
10332
|
-
var Protected$0 = $TS($S($EXPECT($
|
|
10394
|
+
var Protected$0 = $TS($S($EXPECT($L128, fail, 'Protected "protected"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
10333
10395
|
return { $loc, token: $1 };
|
|
10334
10396
|
});
|
|
10335
10397
|
function Protected(state) {
|
|
@@ -10350,7 +10412,7 @@ ${input.slice(result.pos)}
|
|
|
10350
10412
|
return result;
|
|
10351
10413
|
}
|
|
10352
10414
|
}
|
|
10353
|
-
var Pipe$0 = $TV($EXPECT($
|
|
10415
|
+
var Pipe$0 = $TV($EXPECT($L129, fail, 'Pipe "|>"'), function($skip, $loc, $0, $1) {
|
|
10354
10416
|
return { $loc, token: $1 };
|
|
10355
10417
|
});
|
|
10356
10418
|
function Pipe(state) {
|
|
@@ -10392,7 +10454,7 @@ ${input.slice(result.pos)}
|
|
|
10392
10454
|
return result;
|
|
10393
10455
|
}
|
|
10394
10456
|
}
|
|
10395
|
-
var Readonly$0 = $TS($S($EXPECT($
|
|
10457
|
+
var Readonly$0 = $TS($S($EXPECT($L130, fail, 'Readonly "readonly"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
10396
10458
|
return { $loc, token: $1, ts: true };
|
|
10397
10459
|
});
|
|
10398
10460
|
function Readonly(state) {
|
|
@@ -10413,7 +10475,7 @@ ${input.slice(result.pos)}
|
|
|
10413
10475
|
return result;
|
|
10414
10476
|
}
|
|
10415
10477
|
}
|
|
10416
|
-
var Return$0 = $TS($S($EXPECT($
|
|
10478
|
+
var Return$0 = $TS($S($EXPECT($L131, fail, 'Return "return"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
10417
10479
|
return { $loc, token: $1 };
|
|
10418
10480
|
});
|
|
10419
10481
|
function Return(state) {
|
|
@@ -10434,7 +10496,7 @@ ${input.slice(result.pos)}
|
|
|
10434
10496
|
return result;
|
|
10435
10497
|
}
|
|
10436
10498
|
}
|
|
10437
|
-
var Satisfies$0 = $TS($S($EXPECT($
|
|
10499
|
+
var Satisfies$0 = $TS($S($EXPECT($L132, fail, 'Satisfies "satisfies"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
10438
10500
|
return { $loc, token: $1 };
|
|
10439
10501
|
});
|
|
10440
10502
|
function Satisfies(state) {
|
|
@@ -10455,7 +10517,7 @@ ${input.slice(result.pos)}
|
|
|
10455
10517
|
return result;
|
|
10456
10518
|
}
|
|
10457
10519
|
}
|
|
10458
|
-
var Semicolon$0 = $TV($EXPECT($
|
|
10520
|
+
var Semicolon$0 = $TV($EXPECT($L79, fail, 'Semicolon ";"'), function($skip, $loc, $0, $1) {
|
|
10459
10521
|
return { $loc, token: $1 };
|
|
10460
10522
|
});
|
|
10461
10523
|
function Semicolon(state) {
|
|
@@ -10476,7 +10538,7 @@ ${input.slice(result.pos)}
|
|
|
10476
10538
|
return result;
|
|
10477
10539
|
}
|
|
10478
10540
|
}
|
|
10479
|
-
var SingleQuote$0 = $TV($EXPECT($
|
|
10541
|
+
var SingleQuote$0 = $TV($EXPECT($L133, fail, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
|
|
10480
10542
|
return { $loc, token: $1 };
|
|
10481
10543
|
});
|
|
10482
10544
|
function SingleQuote(state) {
|
|
@@ -10518,10 +10580,10 @@ ${input.slice(result.pos)}
|
|
|
10518
10580
|
return result;
|
|
10519
10581
|
}
|
|
10520
10582
|
}
|
|
10521
|
-
var Static$0 = $
|
|
10583
|
+
var Static$0 = $TS($S($EXPECT($L134, fail, 'Static "static"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
10522
10584
|
return { $loc, token: $1 };
|
|
10523
10585
|
});
|
|
10524
|
-
var Static$1 = $TS($S($EXPECT($
|
|
10586
|
+
var Static$1 = $TS($S($EXPECT($L95, fail, 'Static "@"'), $N($C($EXPECT($L125, fail, 'Static "("'), $EXPECT($L95, fail, 'Static "@"')))), function($skip, $loc, $0, $1, $2) {
|
|
10525
10587
|
return { $loc, token: "static " };
|
|
10526
10588
|
});
|
|
10527
10589
|
function Static(state) {
|
|
@@ -10542,7 +10604,7 @@ ${input.slice(result.pos)}
|
|
|
10542
10604
|
return result;
|
|
10543
10605
|
}
|
|
10544
10606
|
}
|
|
10545
|
-
var SubstitutionStart$0 = $TV($EXPECT($
|
|
10607
|
+
var SubstitutionStart$0 = $TV($EXPECT($L135, fail, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
|
|
10546
10608
|
return { $loc, token: $1 };
|
|
10547
10609
|
});
|
|
10548
10610
|
function SubstitutionStart(state) {
|
|
@@ -10563,7 +10625,7 @@ ${input.slice(result.pos)}
|
|
|
10563
10625
|
return result;
|
|
10564
10626
|
}
|
|
10565
10627
|
}
|
|
10566
|
-
var Switch$0 = $TS($S($EXPECT($
|
|
10628
|
+
var Switch$0 = $TS($S($EXPECT($L136, fail, 'Switch "switch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
10567
10629
|
return { $loc, token: $1 };
|
|
10568
10630
|
});
|
|
10569
10631
|
function Switch(state) {
|
|
@@ -10584,7 +10646,7 @@ ${input.slice(result.pos)}
|
|
|
10584
10646
|
return result;
|
|
10585
10647
|
}
|
|
10586
10648
|
}
|
|
10587
|
-
var Target$0 = $TS($S($EXPECT($
|
|
10649
|
+
var Target$0 = $TS($S($EXPECT($L137, fail, 'Target "target"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
10588
10650
|
return { $loc, token: $1 };
|
|
10589
10651
|
});
|
|
10590
10652
|
function Target(state) {
|
|
@@ -10605,7 +10667,7 @@ ${input.slice(result.pos)}
|
|
|
10605
10667
|
return result;
|
|
10606
10668
|
}
|
|
10607
10669
|
}
|
|
10608
|
-
var Then$0 = $TS($S(__, $EXPECT($
|
|
10670
|
+
var Then$0 = $TS($S(__, $EXPECT($L138, fail, 'Then "then"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
|
|
10609
10671
|
return { $loc, token: "" };
|
|
10610
10672
|
});
|
|
10611
10673
|
function Then(state) {
|
|
@@ -10626,7 +10688,7 @@ ${input.slice(result.pos)}
|
|
|
10626
10688
|
return result;
|
|
10627
10689
|
}
|
|
10628
10690
|
}
|
|
10629
|
-
var This$0 = $TS($S($EXPECT($
|
|
10691
|
+
var This$0 = $TS($S($EXPECT($L139, fail, 'This "this"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
10630
10692
|
return { $loc, token: $1 };
|
|
10631
10693
|
});
|
|
10632
10694
|
function This(state) {
|
|
@@ -10647,7 +10709,7 @@ ${input.slice(result.pos)}
|
|
|
10647
10709
|
return result;
|
|
10648
10710
|
}
|
|
10649
10711
|
}
|
|
10650
|
-
var Throw$0 = $TS($S($EXPECT($
|
|
10712
|
+
var Throw$0 = $TS($S($EXPECT($L140, fail, 'Throw "throw"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
10651
10713
|
return { $loc, token: $1 };
|
|
10652
10714
|
});
|
|
10653
10715
|
function Throw(state) {
|
|
@@ -10668,7 +10730,7 @@ ${input.slice(result.pos)}
|
|
|
10668
10730
|
return result;
|
|
10669
10731
|
}
|
|
10670
10732
|
}
|
|
10671
|
-
var TripleDoubleQuote$0 = $TV($EXPECT($
|
|
10733
|
+
var TripleDoubleQuote$0 = $TV($EXPECT($L141, fail, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
|
|
10672
10734
|
return { $loc, token: "`" };
|
|
10673
10735
|
});
|
|
10674
10736
|
function TripleDoubleQuote(state) {
|
|
@@ -10689,7 +10751,7 @@ ${input.slice(result.pos)}
|
|
|
10689
10751
|
return result;
|
|
10690
10752
|
}
|
|
10691
10753
|
}
|
|
10692
|
-
var TripleSingleQuote$0 = $TV($EXPECT($
|
|
10754
|
+
var TripleSingleQuote$0 = $TV($EXPECT($L142, fail, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
|
|
10693
10755
|
return { $loc, token: "`" };
|
|
10694
10756
|
});
|
|
10695
10757
|
function TripleSingleQuote(state) {
|
|
@@ -10710,7 +10772,7 @@ ${input.slice(result.pos)}
|
|
|
10710
10772
|
return result;
|
|
10711
10773
|
}
|
|
10712
10774
|
}
|
|
10713
|
-
var TripleSlash$0 = $TV($EXPECT($
|
|
10775
|
+
var TripleSlash$0 = $TV($EXPECT($L143, fail, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
|
|
10714
10776
|
return { $loc, token: "/" };
|
|
10715
10777
|
});
|
|
10716
10778
|
function TripleSlash(state) {
|
|
@@ -10731,7 +10793,7 @@ ${input.slice(result.pos)}
|
|
|
10731
10793
|
return result;
|
|
10732
10794
|
}
|
|
10733
10795
|
}
|
|
10734
|
-
var TripleTick$0 = $TV($EXPECT($
|
|
10796
|
+
var TripleTick$0 = $TV($EXPECT($L144, fail, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
|
|
10735
10797
|
return { $loc, token: "`" };
|
|
10736
10798
|
});
|
|
10737
10799
|
function TripleTick(state) {
|
|
@@ -10752,7 +10814,7 @@ ${input.slice(result.pos)}
|
|
|
10752
10814
|
return result;
|
|
10753
10815
|
}
|
|
10754
10816
|
}
|
|
10755
|
-
var Try$0 = $TS($S($EXPECT($
|
|
10817
|
+
var Try$0 = $TS($S($EXPECT($L145, fail, 'Try "try"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
10756
10818
|
return { $loc, token: $1 };
|
|
10757
10819
|
});
|
|
10758
10820
|
function Try(state) {
|
|
@@ -10773,7 +10835,7 @@ ${input.slice(result.pos)}
|
|
|
10773
10835
|
return result;
|
|
10774
10836
|
}
|
|
10775
10837
|
}
|
|
10776
|
-
var Typeof$0 = $TS($S($EXPECT($
|
|
10838
|
+
var Typeof$0 = $TS($S($EXPECT($L146, fail, 'Typeof "typeof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
10777
10839
|
return { $loc, token: $1 };
|
|
10778
10840
|
});
|
|
10779
10841
|
function Typeof(state) {
|
|
@@ -10794,7 +10856,7 @@ ${input.slice(result.pos)}
|
|
|
10794
10856
|
return result;
|
|
10795
10857
|
}
|
|
10796
10858
|
}
|
|
10797
|
-
var Unless$0 = $TS($S($EXPECT($
|
|
10859
|
+
var Unless$0 = $TS($S($EXPECT($L147, fail, 'Unless "unless"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
10798
10860
|
return { $loc, token: $1 };
|
|
10799
10861
|
});
|
|
10800
10862
|
function Unless(state) {
|
|
@@ -10815,7 +10877,7 @@ ${input.slice(result.pos)}
|
|
|
10815
10877
|
return result;
|
|
10816
10878
|
}
|
|
10817
10879
|
}
|
|
10818
|
-
var Until$0 = $TS($S($EXPECT($
|
|
10880
|
+
var Until$0 = $TS($S($EXPECT($L148, fail, 'Until "until"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
10819
10881
|
return { $loc, token: $1 };
|
|
10820
10882
|
});
|
|
10821
10883
|
function Until(state) {
|
|
@@ -10836,7 +10898,7 @@ ${input.slice(result.pos)}
|
|
|
10836
10898
|
return result;
|
|
10837
10899
|
}
|
|
10838
10900
|
}
|
|
10839
|
-
var Var$0 = $TS($S($EXPECT($
|
|
10901
|
+
var Var$0 = $TS($S($EXPECT($L149, fail, 'Var "var"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
10840
10902
|
return { $loc, token: $1 };
|
|
10841
10903
|
});
|
|
10842
10904
|
function Var(state) {
|
|
@@ -10857,7 +10919,7 @@ ${input.slice(result.pos)}
|
|
|
10857
10919
|
return result;
|
|
10858
10920
|
}
|
|
10859
10921
|
}
|
|
10860
|
-
var Void$0 = $TS($S($EXPECT($
|
|
10922
|
+
var Void$0 = $TS($S($EXPECT($L150, fail, 'Void "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
10861
10923
|
return { $loc, token: $1 };
|
|
10862
10924
|
});
|
|
10863
10925
|
function Void(state) {
|
|
@@ -10878,7 +10940,7 @@ ${input.slice(result.pos)}
|
|
|
10878
10940
|
return result;
|
|
10879
10941
|
}
|
|
10880
10942
|
}
|
|
10881
|
-
var When$0 = $TS($S($EXPECT($
|
|
10943
|
+
var When$0 = $TS($S($EXPECT($L151, fail, 'When "when"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
10882
10944
|
return { $loc, token: "case" };
|
|
10883
10945
|
});
|
|
10884
10946
|
function When(state) {
|
|
@@ -10899,7 +10961,7 @@ ${input.slice(result.pos)}
|
|
|
10899
10961
|
return result;
|
|
10900
10962
|
}
|
|
10901
10963
|
}
|
|
10902
|
-
var While$0 = $TS($S($EXPECT($
|
|
10964
|
+
var While$0 = $TS($S($EXPECT($L152, fail, 'While "while"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
10903
10965
|
return { $loc, token: $1 };
|
|
10904
10966
|
});
|
|
10905
10967
|
function While(state) {
|
|
@@ -10920,7 +10982,7 @@ ${input.slice(result.pos)}
|
|
|
10920
10982
|
return result;
|
|
10921
10983
|
}
|
|
10922
10984
|
}
|
|
10923
|
-
var Yield$0 = $TS($S($EXPECT($
|
|
10985
|
+
var Yield$0 = $TS($S($EXPECT($L153, fail, 'Yield "yield"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
10924
10986
|
return { $loc, token: $1 };
|
|
10925
10987
|
});
|
|
10926
10988
|
function Yield(state) {
|
|
@@ -11003,7 +11065,7 @@ ${input.slice(result.pos)}
|
|
|
11003
11065
|
return result;
|
|
11004
11066
|
}
|
|
11005
11067
|
}
|
|
11006
|
-
var JSXSelfClosingElement$0 = $TS($S($EXPECT($L5, fail, 'JSXSelfClosingElement "<"'), $TEXT(JSXElementName), $E(CompactTypeArguments), $E(JSXAttributes), $E(Whitespace), $EXPECT($
|
|
11068
|
+
var JSXSelfClosingElement$0 = $TS($S($EXPECT($L5, fail, 'JSXSelfClosingElement "<"'), $TEXT(JSXElementName), $E(CompactTypeArguments), $E(JSXAttributes), $E(Whitespace), $EXPECT($L154, fail, 'JSXSelfClosingElement "/>"')), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
11007
11069
|
return { type: "JSXElement", children: $0 };
|
|
11008
11070
|
});
|
|
11009
11071
|
function JSXSelfClosingElement(state) {
|
|
@@ -11043,7 +11105,7 @@ ${input.slice(result.pos)}
|
|
|
11043
11105
|
return result;
|
|
11044
11106
|
}
|
|
11045
11107
|
}
|
|
11046
|
-
var JSXClosingElement$0 = $S($EXPECT($
|
|
11108
|
+
var JSXClosingElement$0 = $S($EXPECT($L155, fail, 'JSXClosingElement "</"'), $E(Whitespace), $TEXT(JSXElementName), $E(Whitespace), $EXPECT($L27, fail, 'JSXClosingElement ">"'));
|
|
11047
11109
|
function JSXClosingElement(state) {
|
|
11048
11110
|
if (state.events) {
|
|
11049
11111
|
const result = state.events.enter?.("JSXClosingElement", state);
|
|
@@ -11088,14 +11150,14 @@ ${input.slice(result.pos)}
|
|
|
11088
11150
|
return result;
|
|
11089
11151
|
}
|
|
11090
11152
|
}
|
|
11091
|
-
var JSXFragment$0 = $TS($S($EXPECT($
|
|
11153
|
+
var JSXFragment$0 = $TS($S($EXPECT($L156, fail, 'JSXFragment "<>"'), $E(JSXChildren), $E(Whitespace), $EXPECT($L157, fail, 'JSXFragment "</>"')), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
11092
11154
|
if ($2) {
|
|
11093
11155
|
return { type: "JSXFragment", children: $0, jsxChildren: $2.jsxChildren };
|
|
11094
11156
|
} else {
|
|
11095
11157
|
return { type: "JSXFragment", children: $0, jsxChildren: [] };
|
|
11096
11158
|
}
|
|
11097
11159
|
});
|
|
11098
|
-
var JSXFragment$1 = $TS($S($EXPECT($
|
|
11160
|
+
var JSXFragment$1 = $TS($S($EXPECT($L156, fail, 'JSXFragment "<>"'), JSXMixedChildren, InsertNewline, InsertIndent), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
11099
11161
|
return { type: "JSXFragment", children: [...$0, "</>"], jsxChildren: $2.jsxChildren };
|
|
11100
11162
|
});
|
|
11101
11163
|
function JSXFragment(state) {
|
|
@@ -11135,7 +11197,7 @@ ${input.slice(result.pos)}
|
|
|
11135
11197
|
return result;
|
|
11136
11198
|
}
|
|
11137
11199
|
}
|
|
11138
|
-
var JSXIdentifierName$0 = $R$0($EXPECT($
|
|
11200
|
+
var JSXIdentifierName$0 = $R$0($EXPECT($R46, fail, "JSXIdentifierName /(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*/"));
|
|
11139
11201
|
function JSXIdentifierName(state) {
|
|
11140
11202
|
if (state.events) {
|
|
11141
11203
|
const result = state.events.enter?.("JSXIdentifierName", state);
|
|
@@ -11333,7 +11395,7 @@ ${input.slice(result.pos)}
|
|
|
11333
11395
|
return result;
|
|
11334
11396
|
}
|
|
11335
11397
|
}
|
|
11336
|
-
var JSXShorthandString$0 = $TR($EXPECT($
|
|
11398
|
+
var JSXShorthandString$0 = $TR($EXPECT($R47, fail, "JSXShorthandString /(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
|
|
11337
11399
|
return module2.quoteString($0);
|
|
11338
11400
|
});
|
|
11339
11401
|
var JSXShorthandString$1 = $TS($S(StringLiteral), function($skip, $loc, $0, $1) {
|
|
@@ -11775,7 +11837,7 @@ ${input.slice(result.pos)}
|
|
|
11775
11837
|
var JSXChild$0 = JSXElement;
|
|
11776
11838
|
var JSXChild$1 = JSXFragment;
|
|
11777
11839
|
var JSXChild$2 = JSXComment;
|
|
11778
|
-
var JSXChild$3 = $TS($S(OpenBrace,
|
|
11840
|
+
var JSXChild$3 = $TS($S(OpenBrace, IndentedJSXChildExpression, __, CloseBrace), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
11779
11841
|
var expression = $2;
|
|
11780
11842
|
return {
|
|
11781
11843
|
type: "JSXChildExpression",
|
|
@@ -11783,7 +11845,7 @@ ${input.slice(result.pos)}
|
|
|
11783
11845
|
expression
|
|
11784
11846
|
};
|
|
11785
11847
|
});
|
|
11786
|
-
var JSXChild$4 = $TS($S(
|
|
11848
|
+
var JSXChild$4 = $TS($S(OpenBrace, $E(JSXChildExpression), __, CloseBrace), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
11787
11849
|
var expression = $2;
|
|
11788
11850
|
return {
|
|
11789
11851
|
type: "JSXChildExpression",
|
|
@@ -11791,7 +11853,15 @@ ${input.slice(result.pos)}
|
|
|
11791
11853
|
expression
|
|
11792
11854
|
};
|
|
11793
11855
|
});
|
|
11794
|
-
var JSXChild$5 =
|
|
11856
|
+
var JSXChild$5 = $TS($S(InsertInlineOpenBrace, ArrowFunction, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3) {
|
|
11857
|
+
var expression = $2;
|
|
11858
|
+
return {
|
|
11859
|
+
type: "JSXChildExpression",
|
|
11860
|
+
children: $0,
|
|
11861
|
+
expression
|
|
11862
|
+
};
|
|
11863
|
+
});
|
|
11864
|
+
var JSXChild$6 = JSXText;
|
|
11795
11865
|
function JSXChild(state) {
|
|
11796
11866
|
if (state.events) {
|
|
11797
11867
|
const result = state.events.enter?.("JSXChild", state);
|
|
@@ -11799,18 +11869,18 @@ ${input.slice(result.pos)}
|
|
|
11799
11869
|
return result.cache;
|
|
11800
11870
|
}
|
|
11801
11871
|
if (state.tokenize) {
|
|
11802
|
-
const result = $TOKEN("JSXChild", state, JSXChild$0(state) || JSXChild$1(state) || JSXChild$2(state) || JSXChild$3(state) || JSXChild$4(state) || JSXChild$5(state));
|
|
11872
|
+
const result = $TOKEN("JSXChild", state, JSXChild$0(state) || JSXChild$1(state) || JSXChild$2(state) || JSXChild$3(state) || JSXChild$4(state) || JSXChild$5(state) || JSXChild$6(state));
|
|
11803
11873
|
if (state.events)
|
|
11804
11874
|
state.events.exit?.("JSXChild", state, result);
|
|
11805
11875
|
return result;
|
|
11806
11876
|
} else {
|
|
11807
|
-
const result = JSXChild$0(state) || JSXChild$1(state) || JSXChild$2(state) || JSXChild$3(state) || JSXChild$4(state) || JSXChild$5(state);
|
|
11877
|
+
const result = JSXChild$0(state) || JSXChild$1(state) || JSXChild$2(state) || JSXChild$3(state) || JSXChild$4(state) || JSXChild$5(state) || JSXChild$6(state);
|
|
11808
11878
|
if (state.events)
|
|
11809
11879
|
state.events.exit?.("JSXChild", state, result);
|
|
11810
11880
|
return result;
|
|
11811
11881
|
}
|
|
11812
11882
|
}
|
|
11813
|
-
var JSXComment$0 = $TS($S($EXPECT($
|
|
11883
|
+
var JSXComment$0 = $TS($S($EXPECT($L158, fail, 'JSXComment "<!--"'), JSXCommentContent, $EXPECT($L159, fail, 'JSXComment "-->"')), function($skip, $loc, $0, $1, $2, $3) {
|
|
11814
11884
|
return ["{/*", $2, "*/}"];
|
|
11815
11885
|
});
|
|
11816
11886
|
function JSXComment(state) {
|
|
@@ -11831,7 +11901,7 @@ ${input.slice(result.pos)}
|
|
|
11831
11901
|
return result;
|
|
11832
11902
|
}
|
|
11833
11903
|
}
|
|
11834
|
-
var JSXCommentContent$0 = $TR($EXPECT($
|
|
11904
|
+
var JSXCommentContent$0 = $TR($EXPECT($R48, fail, "JSXCommentContent /(?:-[^-]|[^-]*)*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
|
|
11835
11905
|
return { $loc, token: $0.replace(/\*\//g, "* /") };
|
|
11836
11906
|
});
|
|
11837
11907
|
function JSXCommentContent(state) {
|
|
@@ -11852,7 +11922,7 @@ ${input.slice(result.pos)}
|
|
|
11852
11922
|
return result;
|
|
11853
11923
|
}
|
|
11854
11924
|
}
|
|
11855
|
-
var JSXText$0 = $TR($EXPECT($
|
|
11925
|
+
var JSXText$0 = $TR($EXPECT($R49, fail, "JSXText /[^{}<>\\r\\n]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
|
|
11856
11926
|
return {
|
|
11857
11927
|
type: "JSXText",
|
|
11858
11928
|
token: $0,
|
|
@@ -11896,6 +11966,48 @@ ${input.slice(result.pos)}
|
|
|
11896
11966
|
return result;
|
|
11897
11967
|
}
|
|
11898
11968
|
}
|
|
11969
|
+
var IndentedJSXChildExpression$0 = $TS($S(PushIndent, $E(NestedJSXChildExpression), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
|
|
11970
|
+
if (!$2)
|
|
11971
|
+
return $skip;
|
|
11972
|
+
return $2;
|
|
11973
|
+
});
|
|
11974
|
+
function IndentedJSXChildExpression(state) {
|
|
11975
|
+
if (state.events) {
|
|
11976
|
+
const result = state.events.enter?.("IndentedJSXChildExpression", state);
|
|
11977
|
+
if (result)
|
|
11978
|
+
return result.cache;
|
|
11979
|
+
}
|
|
11980
|
+
if (state.tokenize) {
|
|
11981
|
+
const result = $TOKEN("IndentedJSXChildExpression", state, IndentedJSXChildExpression$0(state));
|
|
11982
|
+
if (state.events)
|
|
11983
|
+
state.events.exit?.("IndentedJSXChildExpression", state, result);
|
|
11984
|
+
return result;
|
|
11985
|
+
} else {
|
|
11986
|
+
const result = IndentedJSXChildExpression$0(state);
|
|
11987
|
+
if (state.events)
|
|
11988
|
+
state.events.exit?.("IndentedJSXChildExpression", state, result);
|
|
11989
|
+
return result;
|
|
11990
|
+
}
|
|
11991
|
+
}
|
|
11992
|
+
var NestedJSXChildExpression$0 = $S(Nested, JSXChildExpression);
|
|
11993
|
+
function NestedJSXChildExpression(state) {
|
|
11994
|
+
if (state.events) {
|
|
11995
|
+
const result = state.events.enter?.("NestedJSXChildExpression", state);
|
|
11996
|
+
if (result)
|
|
11997
|
+
return result.cache;
|
|
11998
|
+
}
|
|
11999
|
+
if (state.tokenize) {
|
|
12000
|
+
const result = $TOKEN("NestedJSXChildExpression", state, NestedJSXChildExpression$0(state));
|
|
12001
|
+
if (state.events)
|
|
12002
|
+
state.events.exit?.("NestedJSXChildExpression", state, result);
|
|
12003
|
+
return result;
|
|
12004
|
+
} else {
|
|
12005
|
+
const result = NestedJSXChildExpression$0(state);
|
|
12006
|
+
if (state.events)
|
|
12007
|
+
state.events.exit?.("NestedJSXChildExpression", state, result);
|
|
12008
|
+
return result;
|
|
12009
|
+
}
|
|
12010
|
+
}
|
|
11899
12011
|
var TypeDeclaration$0 = $T($S($Q($S(TypeDeclarationModifier, $Q(TrailingComment))), TypeDeclarationRest), function(value) {
|
|
11900
12012
|
return { "ts": true, "children": value };
|
|
11901
12013
|
});
|
|
@@ -11917,7 +12029,7 @@ ${input.slice(result.pos)}
|
|
|
11917
12029
|
return result;
|
|
11918
12030
|
}
|
|
11919
12031
|
}
|
|
11920
|
-
var TypeDeclarationModifier$0 = $S($EXPECT($
|
|
12032
|
+
var TypeDeclarationModifier$0 = $S($EXPECT($L160, fail, 'TypeDeclarationModifier "declare"'), NonIdContinue);
|
|
11921
12033
|
var TypeDeclarationModifier$1 = Export;
|
|
11922
12034
|
function TypeDeclarationModifier(state) {
|
|
11923
12035
|
if (state.events) {
|
|
@@ -11959,7 +12071,7 @@ ${input.slice(result.pos)}
|
|
|
11959
12071
|
return result;
|
|
11960
12072
|
}
|
|
11961
12073
|
}
|
|
11962
|
-
var TypeKeyword$0 = $S($EXPECT($
|
|
12074
|
+
var TypeKeyword$0 = $S($EXPECT($L161, fail, 'TypeKeyword "type"'), NonIdContinue);
|
|
11963
12075
|
function TypeKeyword(state) {
|
|
11964
12076
|
if (state.events) {
|
|
11965
12077
|
const result = state.events.enter?.("TypeKeyword", state);
|
|
@@ -11978,7 +12090,7 @@ ${input.slice(result.pos)}
|
|
|
11978
12090
|
return result;
|
|
11979
12091
|
}
|
|
11980
12092
|
}
|
|
11981
|
-
var Interface$0 = $S($EXPECT($
|
|
12093
|
+
var Interface$0 = $S($EXPECT($L162, fail, 'Interface "interface"'), NonIdContinue);
|
|
11982
12094
|
function Interface(state) {
|
|
11983
12095
|
if (state.events) {
|
|
11984
12096
|
const result = state.events.enter?.("Interface", state);
|
|
@@ -11997,7 +12109,7 @@ ${input.slice(result.pos)}
|
|
|
11997
12109
|
return result;
|
|
11998
12110
|
}
|
|
11999
12111
|
}
|
|
12000
|
-
var Namespace$0 = $S($EXPECT($
|
|
12112
|
+
var Namespace$0 = $S($EXPECT($L163, fail, 'Namespace "namespace"'), NonIdContinue);
|
|
12001
12113
|
function Namespace(state) {
|
|
12002
12114
|
if (state.events) {
|
|
12003
12115
|
const result = state.events.enter?.("Namespace", state);
|
|
@@ -12186,7 +12298,7 @@ ${input.slice(result.pos)}
|
|
|
12186
12298
|
return result;
|
|
12187
12299
|
}
|
|
12188
12300
|
}
|
|
12189
|
-
var TypeIndexSignature$0 = $S($E($S($R$0($EXPECT($
|
|
12301
|
+
var TypeIndexSignature$0 = $S($E($S($R$0($EXPECT($R50, fail, "TypeIndexSignature /[+-]?/")), $EXPECT($L130, fail, 'TypeIndexSignature "readonly"'), __)), OpenBracket, TypeIndex, CloseBracket, $E($S(__, $R$0($EXPECT($R4, fail, "TypeIndexSignature /[+-]/")), QuestionMark)));
|
|
12190
12302
|
function TypeIndexSignature(state) {
|
|
12191
12303
|
if (state.events) {
|
|
12192
12304
|
const result = state.events.enter?.("TypeIndexSignature", state);
|
|
@@ -12246,7 +12358,7 @@ ${input.slice(result.pos)}
|
|
|
12246
12358
|
return result;
|
|
12247
12359
|
}
|
|
12248
12360
|
}
|
|
12249
|
-
var ReturnTypeSuffix$0 = $TS($S(__, Colon, $E($S(__, $EXPECT($
|
|
12361
|
+
var ReturnTypeSuffix$0 = $TS($S(__, Colon, $E($S(__, $EXPECT($L164, fail, 'ReturnTypeSuffix "asserts"'), NonIdContinue)), TypePredicate), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
12250
12362
|
const children = [...$1, $2];
|
|
12251
12363
|
if ($3)
|
|
12252
12364
|
children.push($3);
|
|
@@ -12275,7 +12387,7 @@ ${input.slice(result.pos)}
|
|
|
12275
12387
|
return result;
|
|
12276
12388
|
}
|
|
12277
12389
|
}
|
|
12278
|
-
var TypePredicate$0 = $TS($S(Type, $E($S(__, $EXPECT($
|
|
12390
|
+
var TypePredicate$0 = $TS($S(Type, $E($S(__, $EXPECT($L75, fail, 'TypePredicate "is"'), NonIdContinue, Type))), function($skip, $loc, $0, $1, $2) {
|
|
12279
12391
|
if (!$2)
|
|
12280
12392
|
return $1;
|
|
12281
12393
|
return $0;
|
|
@@ -12381,10 +12493,10 @@ ${input.slice(result.pos)}
|
|
|
12381
12493
|
return result;
|
|
12382
12494
|
}
|
|
12383
12495
|
}
|
|
12384
|
-
var TypeUnaryOp$0 = $EXPECT($
|
|
12385
|
-
var TypeUnaryOp$1 = $EXPECT($
|
|
12386
|
-
var TypeUnaryOp$2 = $EXPECT($
|
|
12387
|
-
var TypeUnaryOp$3 = $EXPECT($
|
|
12496
|
+
var TypeUnaryOp$0 = $S($EXPECT($L165, fail, 'TypeUnaryOp "keyof"'), NonIdContinue);
|
|
12497
|
+
var TypeUnaryOp$1 = $S($EXPECT($L146, fail, 'TypeUnaryOp "typeof"'), NonIdContinue);
|
|
12498
|
+
var TypeUnaryOp$2 = $S($EXPECT($L166, fail, 'TypeUnaryOp "infer"'), NonIdContinue);
|
|
12499
|
+
var TypeUnaryOp$3 = $S($EXPECT($L130, fail, 'TypeUnaryOp "readonly"'), NonIdContinue);
|
|
12388
12500
|
function TypeUnaryOp(state) {
|
|
12389
12501
|
if (state.events) {
|
|
12390
12502
|
const result = state.events.enter?.("TypeUnaryOp", state);
|
|
@@ -12528,7 +12640,7 @@ ${input.slice(result.pos)}
|
|
|
12528
12640
|
return result;
|
|
12529
12641
|
}
|
|
12530
12642
|
}
|
|
12531
|
-
var TypeConditional$0 = $TS($S(TypeBinary, $E($S(__, $EXPECT($L6, fail, 'TypeConditional "extends"'), Type, $E($S(__, QuestionMark, Type, __, Colon, Type))))), function($skip, $loc, $0, $1, $2) {
|
|
12643
|
+
var TypeConditional$0 = $TS($S(TypeBinary, $E($S(__, $EXPECT($L6, fail, 'TypeConditional "extends"'), NonIdContinue, Type, $E($S(__, QuestionMark, Type, __, Colon, Type))))), function($skip, $loc, $0, $1, $2) {
|
|
12532
12644
|
if ($2)
|
|
12533
12645
|
return $0;
|
|
12534
12646
|
return $1;
|
|
@@ -12553,10 +12665,10 @@ ${input.slice(result.pos)}
|
|
|
12553
12665
|
}
|
|
12554
12666
|
var TypeLiteral$0 = Literal;
|
|
12555
12667
|
var TypeLiteral$1 = TemplateLiteral;
|
|
12556
|
-
var TypeLiteral$2 = $
|
|
12668
|
+
var TypeLiteral$2 = $TS($S($EXPECT($L150, fail, 'TypeLiteral "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
12557
12669
|
return { $loc, token: "void" };
|
|
12558
12670
|
});
|
|
12559
|
-
var TypeLiteral$3 = $TV($EXPECT($
|
|
12671
|
+
var TypeLiteral$3 = $TV($EXPECT($L167, fail, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
|
|
12560
12672
|
return { $loc, token: "[]" };
|
|
12561
12673
|
});
|
|
12562
12674
|
function TypeLiteral(state) {
|
|
@@ -12577,10 +12689,10 @@ ${input.slice(result.pos)}
|
|
|
12577
12689
|
return result;
|
|
12578
12690
|
}
|
|
12579
12691
|
}
|
|
12580
|
-
var TypeBinaryOp$0 = $TV($EXPECT($
|
|
12692
|
+
var TypeBinaryOp$0 = $TV($EXPECT($L78, fail, 'TypeBinaryOp "|"'), function($skip, $loc, $0, $1) {
|
|
12581
12693
|
return { $loc, token: "|" };
|
|
12582
12694
|
});
|
|
12583
|
-
var TypeBinaryOp$1 = $TV($EXPECT($
|
|
12695
|
+
var TypeBinaryOp$1 = $TV($EXPECT($L76, fail, 'TypeBinaryOp "&"'), function($skip, $loc, $0, $1) {
|
|
12584
12696
|
return { $loc, token: "&" };
|
|
12585
12697
|
});
|
|
12586
12698
|
function TypeBinaryOp(state) {
|
|
@@ -12746,7 +12858,7 @@ ${input.slice(result.pos)}
|
|
|
12746
12858
|
return result;
|
|
12747
12859
|
}
|
|
12748
12860
|
}
|
|
12749
|
-
var TypeConstraint$0 = $S(__, $EXPECT($L6, fail, 'TypeConstraint "extends"'), Type);
|
|
12861
|
+
var TypeConstraint$0 = $S(__, $EXPECT($L6, fail, 'TypeConstraint "extends"'), NonIdContinue, Type);
|
|
12750
12862
|
function TypeConstraint(state) {
|
|
12751
12863
|
if (state.events) {
|
|
12752
12864
|
const result = state.events.enter?.("TypeConstraint", state);
|
|
@@ -12788,7 +12900,7 @@ ${input.slice(result.pos)}
|
|
|
12788
12900
|
return result;
|
|
12789
12901
|
}
|
|
12790
12902
|
}
|
|
12791
|
-
var Shebang$0 = $S($R$0($EXPECT($
|
|
12903
|
+
var Shebang$0 = $S($R$0($EXPECT($R51, fail, "Shebang /#![^\\r\\n]*/")), EOL);
|
|
12792
12904
|
function Shebang(state) {
|
|
12793
12905
|
if (state.events) {
|
|
12794
12906
|
const result = state.events.enter?.("Shebang", state);
|
|
@@ -12807,11 +12919,11 @@ ${input.slice(result.pos)}
|
|
|
12807
12919
|
return result;
|
|
12808
12920
|
}
|
|
12809
12921
|
}
|
|
12810
|
-
var CivetPrologue$0 = $T($S($EXPECT($
|
|
12922
|
+
var CivetPrologue$0 = $T($S($EXPECT($R52, fail, "CivetPrologue /[\\t ]*/"), DoubleQuote, CivetPrologueContent, DoubleQuote, $TEXT(StatementDelimiter), $E(EOS)), function(value) {
|
|
12811
12923
|
var content = value[2];
|
|
12812
12924
|
return content;
|
|
12813
12925
|
});
|
|
12814
|
-
var CivetPrologue$1 = $T($S($EXPECT($
|
|
12926
|
+
var CivetPrologue$1 = $T($S($EXPECT($R52, fail, "CivetPrologue /[\\t ]*/"), SingleQuote, CivetPrologueContent, SingleQuote, $TEXT(StatementDelimiter), $E(EOS)), function(value) {
|
|
12815
12927
|
var content = value[2];
|
|
12816
12928
|
return content;
|
|
12817
12929
|
});
|
|
@@ -12833,8 +12945,8 @@ ${input.slice(result.pos)}
|
|
|
12833
12945
|
return result;
|
|
12834
12946
|
}
|
|
12835
12947
|
}
|
|
12836
|
-
var CivetPrologueContent$0 = $TS($S($EXPECT($
|
|
12837
|
-
var options = $
|
|
12948
|
+
var CivetPrologueContent$0 = $TS($S($EXPECT($L168, fail, 'CivetPrologueContent "civet"'), NonIdContinue, $Q(CivetOption), $EXPECT($R53, fail, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
12949
|
+
var options = $3;
|
|
12838
12950
|
return {
|
|
12839
12951
|
type: "CivetPrologue",
|
|
12840
12952
|
children: [],
|
|
@@ -12859,7 +12971,7 @@ ${input.slice(result.pos)}
|
|
|
12859
12971
|
return result;
|
|
12860
12972
|
}
|
|
12861
12973
|
}
|
|
12862
|
-
var CivetOption$0 = $TR($EXPECT($
|
|
12974
|
+
var CivetOption$0 = $TR($EXPECT($R54, fail, "CivetOption /\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([a-zA-Z0-9.+-]*))?/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
|
|
12863
12975
|
const optionName = $2.replace(/-+([a-z]?)/g, (_2, l) => {
|
|
12864
12976
|
if (l)
|
|
12865
12977
|
return l.toUpperCase();
|
|
@@ -12891,7 +13003,7 @@ ${input.slice(result.pos)}
|
|
|
12891
13003
|
return result;
|
|
12892
13004
|
}
|
|
12893
13005
|
}
|
|
12894
|
-
var UnknownPrologue$0 = $S($R$0($EXPECT($
|
|
13006
|
+
var UnknownPrologue$0 = $S($R$0($EXPECT($R52, fail, "UnknownPrologue /[\\t ]*/")), BasicStringLiteral, $TEXT(StatementDelimiter), EOS);
|
|
12895
13007
|
function UnknownPrologue(state) {
|
|
12896
13008
|
if (state.events) {
|
|
12897
13009
|
const result = state.events.enter?.("UnknownPrologue", state);
|
|
@@ -12949,7 +13061,7 @@ ${input.slice(result.pos)}
|
|
|
12949
13061
|
return result;
|
|
12950
13062
|
}
|
|
12951
13063
|
}
|
|
12952
|
-
var EOL$0 = $TR($EXPECT($
|
|
13064
|
+
var EOL$0 = $TR($EXPECT($R55, fail, "EOL /\\r\\n|\\n|\\r|$/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
|
|
12953
13065
|
return { $loc, token: $0 };
|
|
12954
13066
|
});
|
|
12955
13067
|
function EOL(state) {
|
|
@@ -13617,6 +13729,13 @@ ${input.slice(result.pos)}
|
|
|
13617
13729
|
};
|
|
13618
13730
|
module2.prelude.push(["", ["const ", hasPropRef, typeSuffix, " = {}.hasOwnProperty", module2.asAny, "\n"]]);
|
|
13619
13731
|
},
|
|
13732
|
+
modulo(moduloRef) {
|
|
13733
|
+
const typeSuffix = {
|
|
13734
|
+
ts: true,
|
|
13735
|
+
children: [": (a: number, b: number) => number"]
|
|
13736
|
+
};
|
|
13737
|
+
module2.prelude.push(["", ["const ", moduloRef, typeSuffix, " = (a, b) => (a % b + b) % b", "\n"]]);
|
|
13738
|
+
},
|
|
13620
13739
|
JSX(jsxRef) {
|
|
13621
13740
|
module2.prelude.push({
|
|
13622
13741
|
ts: true,
|
|
@@ -14054,6 +14173,21 @@ ${input.slice(result.pos)}
|
|
|
14054
14173
|
return;
|
|
14055
14174
|
node.splice(1, 0, "return ");
|
|
14056
14175
|
}
|
|
14176
|
+
module2.makeLeftHandSideExpression = function(exp) {
|
|
14177
|
+
switch (exp.type) {
|
|
14178
|
+
case "Identifier":
|
|
14179
|
+
case "Literal":
|
|
14180
|
+
case "CallExpression":
|
|
14181
|
+
case "MemberExpression":
|
|
14182
|
+
case "ParenthesizedExpression":
|
|
14183
|
+
return exp;
|
|
14184
|
+
default:
|
|
14185
|
+
return {
|
|
14186
|
+
type: "ParenthesizedExpression",
|
|
14187
|
+
children: ["(", exp, ")"]
|
|
14188
|
+
};
|
|
14189
|
+
}
|
|
14190
|
+
};
|
|
14057
14191
|
module2.isWhitespaceOrEmpty = function(node) {
|
|
14058
14192
|
if (!node)
|
|
14059
14193
|
return true;
|
|
@@ -14082,10 +14216,14 @@ ${input.slice(result.pos)}
|
|
|
14082
14216
|
if (op.special) {
|
|
14083
14217
|
let [a, wsOp, op2, wsB, b] = expandedOps.slice(i - 2, i + 3);
|
|
14084
14218
|
let children;
|
|
14085
|
-
if (op2.
|
|
14219
|
+
if (op2.call) {
|
|
14086
14220
|
wsOp = module2.insertTrimmingSpace(wsOp, "");
|
|
14087
|
-
|
|
14088
|
-
|
|
14221
|
+
if (op2.reversed) {
|
|
14222
|
+
wsB = module2.insertTrimmingSpace(wsB, "");
|
|
14223
|
+
children = [wsOp, op2.call, "(", wsB, b, ", ", a, ")", op2.suffix];
|
|
14224
|
+
} else {
|
|
14225
|
+
children = [wsOp, op2.call, "(", a, ",", wsB, b, ")", op2.suffix];
|
|
14226
|
+
}
|
|
14089
14227
|
} else if (op2.token === "instanceof" || op2.token === "in") {
|
|
14090
14228
|
children = ["!(", a, wsOp, op2, wsB, b, ")"];
|
|
14091
14229
|
} else {
|
|
@@ -14110,7 +14248,7 @@ ${input.slice(result.pos)}
|
|
|
14110
14248
|
let chains = [];
|
|
14111
14249
|
while (i < l) {
|
|
14112
14250
|
const [, op] = binops[i];
|
|
14113
|
-
if (relationalOps.includes(op.token) || op.
|
|
14251
|
+
if (relationalOps.includes(op.token) || op.relational) {
|
|
14114
14252
|
chains.push(i);
|
|
14115
14253
|
} else if (lowerPrecedenceOps.includes(op.token)) {
|
|
14116
14254
|
processChains();
|
|
@@ -14418,31 +14556,29 @@ ${input.slice(result.pos)}
|
|
|
14418
14556
|
const lastAssignment = $12[i];
|
|
14419
14557
|
if (lastAssignment[3].token === "=") {
|
|
14420
14558
|
const lhs = lastAssignment[1];
|
|
14421
|
-
if (
|
|
14422
|
-
const
|
|
14423
|
-
|
|
14424
|
-
|
|
14425
|
-
|
|
14426
|
-
|
|
14427
|
-
|
|
14428
|
-
|
|
14429
|
-
|
|
14430
|
-
|
|
14431
|
-
|
|
14432
|
-
|
|
14433
|
-
|
|
14434
|
-
|
|
14435
|
-
|
|
14559
|
+
if (lhs.type === "MemberExpression") {
|
|
14560
|
+
const members = lhs.children;
|
|
14561
|
+
const lastMember = members[members.length - 1];
|
|
14562
|
+
if (lastMember.type === "SliceExpression") {
|
|
14563
|
+
const { start, end, children: c } = lastMember;
|
|
14564
|
+
c[0].token = ".splice(";
|
|
14565
|
+
c[1] = start;
|
|
14566
|
+
c[2] = ", ";
|
|
14567
|
+
if (end)
|
|
14568
|
+
c[3] = [end, " - ", start];
|
|
14569
|
+
else
|
|
14570
|
+
c[3] = ["1/0"];
|
|
14571
|
+
c[4] = [", ...", $22];
|
|
14572
|
+
c[5] = ")";
|
|
14573
|
+
lastAssignment.pop();
|
|
14574
|
+
if (module2.isWhitespaceOrEmpty(lastAssignment[2]))
|
|
14436
14575
|
lastAssignment.pop();
|
|
14437
|
-
|
|
14438
|
-
|
|
14439
|
-
if ($12.length > 1) {
|
|
14440
|
-
throw new Error("Not implemented yet! TODO: Handle multiple splice assignments");
|
|
14441
|
-
}
|
|
14442
|
-
exp.children = [$12];
|
|
14443
|
-
exp.names = [];
|
|
14444
|
-
return;
|
|
14576
|
+
if ($12.length > 1) {
|
|
14577
|
+
throw new Error("Not implemented yet! TODO: Handle multiple splice assignments");
|
|
14445
14578
|
}
|
|
14579
|
+
exp.children = [$12];
|
|
14580
|
+
exp.names = [];
|
|
14581
|
+
return;
|
|
14446
14582
|
}
|
|
14447
14583
|
} else if (lhs.type === "ObjectBindingPattern" || lhs.type === "ArrayBindingPattern") {
|
|
14448
14584
|
processBindingPatternLHS(lhs, tail);
|
|
@@ -14740,7 +14876,7 @@ ${input.slice(result.pos)}
|
|
|
14740
14876
|
return result;
|
|
14741
14877
|
}
|
|
14742
14878
|
}
|
|
14743
|
-
var Indent$0 = $TR($EXPECT($
|
|
14879
|
+
var Indent$0 = $TR($EXPECT($R56, fail, "Indent /[ \\t]*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
|
|
14744
14880
|
let level;
|
|
14745
14881
|
if (module2.config.tab) {
|
|
14746
14882
|
const tabs = $0.match(/\t/g);
|
|
@@ -14933,470 +15069,463 @@ ${input.slice(result.pos)}
|
|
|
14933
15069
|
return result;
|
|
14934
15070
|
}
|
|
14935
15071
|
}
|
|
14936
|
-
|
|
14937
|
-
|
|
15072
|
+
exports.parse = parse2;
|
|
15073
|
+
exports.default = { parse: parse2 };
|
|
14938
15074
|
}
|
|
14939
15075
|
});
|
|
14940
15076
|
|
|
15077
|
+
// source/main.coffee
|
|
15078
|
+
var main_exports = {};
|
|
15079
|
+
__export(main_exports, {
|
|
15080
|
+
compile: () => compile,
|
|
15081
|
+
default: () => main_default,
|
|
15082
|
+
generate: () => generate_default,
|
|
15083
|
+
parse: () => parse,
|
|
15084
|
+
util: () => util_exports
|
|
15085
|
+
});
|
|
15086
|
+
module.exports = __toCommonJS(main_exports);
|
|
15087
|
+
var import_parser = __toESM(require_parser());
|
|
15088
|
+
|
|
14941
15089
|
// source/generate.coffee
|
|
14942
|
-
|
|
14943
|
-
|
|
14944
|
-
|
|
14945
|
-
|
|
14946
|
-
|
|
14947
|
-
|
|
14948
|
-
|
|
14949
|
-
|
|
14950
|
-
|
|
14951
|
-
|
|
14952
|
-
|
|
14953
|
-
if (options != null) {
|
|
14954
|
-
if (typeof options.updateSourceMap === "function") {
|
|
14955
|
-
options.updateSourceMap(node);
|
|
14956
|
-
}
|
|
14957
|
-
}
|
|
14958
|
-
return node;
|
|
14959
|
-
}
|
|
14960
|
-
if (Array.isArray(node)) {
|
|
14961
|
-
return node.map(function(child) {
|
|
14962
|
-
return gen2(child, options);
|
|
14963
|
-
}).join("");
|
|
15090
|
+
"civet coffeeCompat";
|
|
15091
|
+
var gen;
|
|
15092
|
+
var generate_default = gen = function(node, options) {
|
|
15093
|
+
var $loc, token;
|
|
15094
|
+
if (node === null || node === void 0) {
|
|
15095
|
+
return "";
|
|
15096
|
+
}
|
|
15097
|
+
if (typeof node === "string") {
|
|
15098
|
+
if (options != null) {
|
|
15099
|
+
if (typeof options.updateSourceMap === "function") {
|
|
15100
|
+
options.updateSourceMap(node);
|
|
14964
15101
|
}
|
|
14965
|
-
|
|
14966
|
-
|
|
14967
|
-
|
|
14968
|
-
|
|
14969
|
-
|
|
14970
|
-
|
|
14971
|
-
|
|
14972
|
-
|
|
14973
|
-
|
|
14974
|
-
|
|
14975
|
-
|
|
14976
|
-
|
|
14977
|
-
|
|
14978
|
-
|
|
14979
|
-
|
|
14980
|
-
|
|
14981
|
-
|
|
14982
|
-
|
|
14983
|
-
|
|
15102
|
+
}
|
|
15103
|
+
return node;
|
|
15104
|
+
}
|
|
15105
|
+
if (Array.isArray(node)) {
|
|
15106
|
+
return node.map(function(child) {
|
|
15107
|
+
return gen(child, options);
|
|
15108
|
+
}).join("");
|
|
15109
|
+
}
|
|
15110
|
+
if (typeof node === "object") {
|
|
15111
|
+
if (options.js && node.ts) {
|
|
15112
|
+
return "";
|
|
15113
|
+
}
|
|
15114
|
+
if (!options.js && node.js) {
|
|
15115
|
+
return "";
|
|
15116
|
+
}
|
|
15117
|
+
if (node.$loc != null) {
|
|
15118
|
+
({ token, $loc } = node);
|
|
15119
|
+
if (options != null) {
|
|
15120
|
+
if (typeof options.updateSourceMap === "function") {
|
|
15121
|
+
options.updateSourceMap(token, $loc.pos);
|
|
14984
15122
|
}
|
|
14985
|
-
return gen2(node.children, options);
|
|
14986
15123
|
}
|
|
15124
|
+
return token;
|
|
15125
|
+
}
|
|
15126
|
+
if (!node.children) {
|
|
14987
15127
|
debugger;
|
|
14988
15128
|
throw new Error("Unknown node", JSON.stringify(node));
|
|
14989
|
-
}
|
|
14990
|
-
|
|
14991
|
-
prune2 = function(node) {
|
|
14992
|
-
var a;
|
|
14993
|
-
if (node === null || node === void 0) {
|
|
14994
|
-
return;
|
|
14995
|
-
}
|
|
14996
|
-
if (node.length === 0) {
|
|
14997
|
-
return;
|
|
14998
|
-
}
|
|
14999
|
-
if (Array.isArray(node)) {
|
|
15000
|
-
a = node.map(function(n) {
|
|
15001
|
-
return prune2(n);
|
|
15002
|
-
}).filter(function(n) {
|
|
15003
|
-
return !!n;
|
|
15004
|
-
});
|
|
15005
|
-
if (a.length > 1) {
|
|
15006
|
-
return a;
|
|
15007
|
-
}
|
|
15008
|
-
if (a.length === 1) {
|
|
15009
|
-
return a[0];
|
|
15010
|
-
}
|
|
15011
|
-
return;
|
|
15012
|
-
}
|
|
15013
|
-
if (node.children != null) {
|
|
15014
|
-
node.children = prune2(node.children) || [];
|
|
15015
|
-
return node;
|
|
15016
|
-
}
|
|
15017
|
-
return node;
|
|
15018
|
-
};
|
|
15019
|
-
gen2.prune = prune2;
|
|
15129
|
+
}
|
|
15130
|
+
return gen(node.children, options);
|
|
15020
15131
|
}
|
|
15021
|
-
|
|
15132
|
+
debugger;
|
|
15133
|
+
throw new Error("Unknown node", JSON.stringify(node));
|
|
15134
|
+
};
|
|
15135
|
+
var prune = function(node) {
|
|
15136
|
+
var a;
|
|
15137
|
+
if (node === null || node === void 0) {
|
|
15138
|
+
return;
|
|
15139
|
+
}
|
|
15140
|
+
if (node.length === 0) {
|
|
15141
|
+
return;
|
|
15142
|
+
}
|
|
15143
|
+
if (Array.isArray(node)) {
|
|
15144
|
+
a = node.map(function(n) {
|
|
15145
|
+
return prune(n);
|
|
15146
|
+
}).filter(function(n) {
|
|
15147
|
+
return !!n;
|
|
15148
|
+
});
|
|
15149
|
+
if (a.length > 1) {
|
|
15150
|
+
return a;
|
|
15151
|
+
}
|
|
15152
|
+
if (a.length === 1) {
|
|
15153
|
+
return a[0];
|
|
15154
|
+
}
|
|
15155
|
+
return;
|
|
15156
|
+
}
|
|
15157
|
+
if (node.children != null) {
|
|
15158
|
+
node.children = prune(node.children) || [];
|
|
15159
|
+
return node;
|
|
15160
|
+
}
|
|
15161
|
+
return node;
|
|
15162
|
+
};
|
|
15022
15163
|
|
|
15023
15164
|
// source/util.coffee
|
|
15024
|
-
var
|
|
15025
|
-
|
|
15026
|
-
|
|
15027
|
-
|
|
15028
|
-
|
|
15029
|
-
|
|
15030
|
-
|
|
15031
|
-
|
|
15032
|
-
|
|
15033
|
-
|
|
15034
|
-
|
|
15035
|
-
|
|
15036
|
-
|
|
15037
|
-
|
|
15038
|
-
|
|
15039
|
-
|
|
15040
|
-
|
|
15041
|
-
|
|
15042
|
-
|
|
15043
|
-
|
|
15044
|
-
|
|
15045
|
-
|
|
15046
|
-
|
|
15047
|
-
|
|
15048
|
-
|
|
15049
|
-
|
|
15050
|
-
|
|
15051
|
-
|
|
15052
|
-
|
|
15053
|
-
|
|
15054
|
-
|
|
15055
|
-
|
|
15056
|
-
|
|
15057
|
-
|
|
15058
|
-
|
|
15059
|
-
|
|
15060
|
-
|
|
15061
|
-
|
|
15062
|
-
|
|
15063
|
-
|
|
15064
|
-
|
|
15065
|
-
|
|
15066
|
-
|
|
15067
|
-
|
|
15068
|
-
|
|
15069
|
-
|
|
15070
|
-
|
|
15071
|
-
|
|
15072
|
-
|
|
15073
|
-
|
|
15074
|
-
|
|
15075
|
-
|
|
15076
|
-
|
|
15077
|
-
|
|
15078
|
-
|
|
15079
|
-
|
|
15080
|
-
|
|
15081
|
-
|
|
15082
|
-
|
|
15083
|
-
|
|
15084
|
-
|
|
15085
|
-
|
|
15086
|
-
|
|
15087
|
-
|
|
15088
|
-
|
|
15089
|
-
return line.map(function(entry) {
|
|
15090
|
-
var colDelta, lineDelta, sourceFileIndex, srcCol, srcLine;
|
|
15091
|
-
if (entry.length === 4) {
|
|
15092
|
-
[colDelta, sourceFileIndex, srcLine, srcCol] = entry;
|
|
15093
|
-
lineDelta = srcLine - lastSourceLine;
|
|
15094
|
-
colDelta = srcCol - lastSourceColumn;
|
|
15095
|
-
lastSourceLine = srcLine;
|
|
15096
|
-
lastSourceColumn = srcCol;
|
|
15097
|
-
return `${encodeVlq(entry[0])}${encodeVlq(sourceFileIndex)}${encodeVlq(lineDelta)}${encodeVlq(colDelta)}`;
|
|
15098
|
-
} else {
|
|
15099
|
-
return encodeVlq(entry[0]);
|
|
15100
|
-
}
|
|
15101
|
-
}).join(",");
|
|
15102
|
-
}).join(";");
|
|
15103
|
-
},
|
|
15104
|
-
json: function(srcFileName, outFileName) {
|
|
15105
|
-
return {
|
|
15106
|
-
version: 3,
|
|
15107
|
-
file: outFileName,
|
|
15108
|
-
sources: [srcFileName],
|
|
15109
|
-
mappings: this.renderMappings(),
|
|
15110
|
-
names: [],
|
|
15111
|
-
sourcesContent: [sourceString]
|
|
15112
|
-
};
|
|
15113
|
-
},
|
|
15114
|
-
updateSourceMap: function(outputStr, inputPos) {
|
|
15115
|
-
var outLines, srcCol, srcLine;
|
|
15116
|
-
outLines = outputStr.split(EOL);
|
|
15117
|
-
if (inputPos != null) {
|
|
15118
|
-
[srcLine, srcCol] = lookupLineColumn(srcTable, inputPos);
|
|
15119
|
-
}
|
|
15120
|
-
outLines.forEach(function(line, i) {
|
|
15121
|
-
var l;
|
|
15122
|
-
if (i > 0) {
|
|
15123
|
-
sm.lineNum++;
|
|
15124
|
-
sm.colOffset = 0;
|
|
15125
|
-
sm.lines[sm.lineNum] = [];
|
|
15126
|
-
srcCol = 0;
|
|
15127
|
-
}
|
|
15128
|
-
l = sm.colOffset;
|
|
15129
|
-
sm.colOffset = line.length;
|
|
15130
|
-
if (inputPos != null) {
|
|
15131
|
-
return sm.lines[sm.lineNum].push([l, 0, srcLine + i, srcCol]);
|
|
15132
|
-
} else if (l !== 0) {
|
|
15133
|
-
return sm.lines[sm.lineNum].push([l]);
|
|
15134
|
-
}
|
|
15135
|
-
});
|
|
15136
|
-
}
|
|
15137
|
-
};
|
|
15138
|
-
};
|
|
15139
|
-
SourceMap2.parseWithLines = function(base64encodedJSONstr) {
|
|
15140
|
-
var json, lines, sourceColumn, sourceLine;
|
|
15141
|
-
json = JSON.parse(Buffer.from(base64encodedJSONstr, "base64").toString("utf8"));
|
|
15142
|
-
sourceLine = 0;
|
|
15143
|
-
sourceColumn = 0;
|
|
15144
|
-
lines = json.mappings.split(";").map(function(line) {
|
|
15145
|
-
if (line.length === 0) {
|
|
15146
|
-
return [];
|
|
15147
|
-
}
|
|
15148
|
-
return line.split(",").map(function(entry) {
|
|
15149
|
-
var result;
|
|
15150
|
-
result = decodeVLQ(entry);
|
|
15151
|
-
switch (result.length) {
|
|
15152
|
-
case 1:
|
|
15153
|
-
return [result[0]];
|
|
15154
|
-
case 4:
|
|
15155
|
-
return [result[0], result[1], sourceLine += result[2], sourceColumn += result[3]];
|
|
15156
|
-
case 5:
|
|
15157
|
-
return [result[0], result[1], sourceLine += result[2], sourceColumn += result[3], result[4]];
|
|
15158
|
-
default:
|
|
15159
|
-
throw new Error("Unknown source map entry", result);
|
|
15160
|
-
}
|
|
15161
|
-
});
|
|
15162
|
-
});
|
|
15163
|
-
json.lines = lines;
|
|
15164
|
-
return json;
|
|
15165
|
-
};
|
|
15166
|
-
smRegexp = /\n\/\/# sourceMappingURL=data:application\/json;charset=utf-8;base64,([+a-zA-Z0-9\/]*=?=?)$/;
|
|
15167
|
-
SourceMap2.remap = function(codeWithSourceMap, upstreamMap, sourcePath, targetPath) {
|
|
15168
|
-
var codeWithoutSourceMap, composedLines, newSourceMap, parsed, remappedCodeWithSourceMap, remappedSourceMapJSON, sourceMapText;
|
|
15169
|
-
sourceMapText = codeWithSourceMap.match(smRegexp);
|
|
15170
|
-
if (sourceMapText) {
|
|
15171
|
-
parsed = SourceMap2.parseWithLines(sourceMapText[1]);
|
|
15172
|
-
} else {
|
|
15173
|
-
console.warn("No source map found in code");
|
|
15174
|
-
return codeWithSourceMap;
|
|
15175
|
-
}
|
|
15176
|
-
composedLines = SourceMap2.composeLines(upstreamMap.data.lines, parsed.lines);
|
|
15177
|
-
upstreamMap.data.lines = composedLines;
|
|
15178
|
-
remappedSourceMapJSON = upstreamMap.json(sourcePath, targetPath);
|
|
15179
|
-
codeWithoutSourceMap = codeWithSourceMap.replace(smRegexp, "");
|
|
15180
|
-
newSourceMap = `${"sourceMapping"}URL=data:application/json;charset=utf-8;base64,${base64Encode2(JSON.stringify(remappedSourceMapJSON))}`;
|
|
15181
|
-
remappedCodeWithSourceMap = `${codeWithoutSourceMap}
|
|
15182
|
-
//# ${newSourceMap}`;
|
|
15183
|
-
return remappedCodeWithSourceMap;
|
|
15184
|
-
};
|
|
15185
|
-
SourceMap2.composeLines = function(upstreamMapping, lines) {
|
|
15186
|
-
return lines.map(function(line, l) {
|
|
15165
|
+
var util_exports = {};
|
|
15166
|
+
__export(util_exports, {
|
|
15167
|
+
SourceMap: () => SourceMap,
|
|
15168
|
+
base64Encode: () => base64Encode,
|
|
15169
|
+
locationTable: () => locationTable,
|
|
15170
|
+
lookupLineColumn: () => lookupLineColumn
|
|
15171
|
+
});
|
|
15172
|
+
"civet coffeeCompat";
|
|
15173
|
+
var BASE64_CHARS;
|
|
15174
|
+
var VLQ_CONTINUATION_BIT;
|
|
15175
|
+
var VLQ_SHIFT;
|
|
15176
|
+
var VLQ_VALUE_MASK;
|
|
15177
|
+
var decodeError;
|
|
15178
|
+
var decodeVLQ;
|
|
15179
|
+
var encodeBase64;
|
|
15180
|
+
var encodeVlq;
|
|
15181
|
+
var prettySourceExcerpt;
|
|
15182
|
+
var remapPosition;
|
|
15183
|
+
var smRegexp;
|
|
15184
|
+
var vlqChars;
|
|
15185
|
+
var vlqTable;
|
|
15186
|
+
var locationTable = function(input) {
|
|
15187
|
+
var line, lines, linesRe, pos, result;
|
|
15188
|
+
linesRe = /([^\r\n]*)(\r\n|\r|\n|$)/y;
|
|
15189
|
+
lines = [];
|
|
15190
|
+
line = 0;
|
|
15191
|
+
pos = 0;
|
|
15192
|
+
while (result = linesRe.exec(input)) {
|
|
15193
|
+
pos += result[0].length;
|
|
15194
|
+
lines[line++] = pos;
|
|
15195
|
+
if (pos === input.length) {
|
|
15196
|
+
break;
|
|
15197
|
+
}
|
|
15198
|
+
}
|
|
15199
|
+
return lines;
|
|
15200
|
+
};
|
|
15201
|
+
var lookupLineColumn = function(table, pos) {
|
|
15202
|
+
var l, prevEnd;
|
|
15203
|
+
l = 0;
|
|
15204
|
+
prevEnd = 0;
|
|
15205
|
+
while (table[l] <= pos) {
|
|
15206
|
+
prevEnd = table[l++];
|
|
15207
|
+
}
|
|
15208
|
+
return [l, pos - prevEnd];
|
|
15209
|
+
};
|
|
15210
|
+
var SourceMap = function(sourceString) {
|
|
15211
|
+
var EOL, sm, srcTable;
|
|
15212
|
+
srcTable = locationTable(sourceString);
|
|
15213
|
+
sm = {
|
|
15214
|
+
lines: [[]],
|
|
15215
|
+
lineNum: 0,
|
|
15216
|
+
colOffset: 0,
|
|
15217
|
+
srcTable
|
|
15218
|
+
};
|
|
15219
|
+
EOL = /\r?\n|\r/;
|
|
15220
|
+
return {
|
|
15221
|
+
data: sm,
|
|
15222
|
+
source: function() {
|
|
15223
|
+
return sourceString;
|
|
15224
|
+
},
|
|
15225
|
+
renderMappings: function() {
|
|
15226
|
+
var lastSourceColumn, lastSourceLine;
|
|
15227
|
+
lastSourceLine = 0;
|
|
15228
|
+
lastSourceColumn = 0;
|
|
15229
|
+
return sm.lines.map(function(line) {
|
|
15187
15230
|
return line.map(function(entry) {
|
|
15188
|
-
var colDelta, sourceFileIndex, srcCol, srcLine
|
|
15189
|
-
if (entry.length === 1) {
|
|
15190
|
-
return entry;
|
|
15191
|
-
}
|
|
15192
|
-
[colDelta, sourceFileIndex, srcLine, srcCol] = entry;
|
|
15193
|
-
srcPos = remapPosition([srcLine, srcCol], upstreamMapping);
|
|
15194
|
-
if (!srcPos) {
|
|
15195
|
-
return [entry[0]];
|
|
15196
|
-
}
|
|
15197
|
-
[upstreamLine, upstreamCol] = srcPos;
|
|
15231
|
+
var colDelta, lineDelta, sourceFileIndex, srcCol, srcLine;
|
|
15198
15232
|
if (entry.length === 4) {
|
|
15199
|
-
|
|
15200
|
-
|
|
15201
|
-
|
|
15202
|
-
|
|
15203
|
-
|
|
15204
|
-
|
|
15205
|
-
|
|
15206
|
-
|
|
15207
|
-
lines = source.split(/\r?\n|\r/);
|
|
15208
|
-
lineNum = location.line;
|
|
15209
|
-
colNum = location.column;
|
|
15210
|
-
for (i = j = ref = lineNum - 2, ref1 = lineNum + 2; ref <= ref1 ? j <= ref1 : j >= ref1; i = ref <= ref1 ? ++j : --j) {
|
|
15211
|
-
if (i < 0 || i >= lines.length) {
|
|
15212
|
-
continue;
|
|
15213
|
-
}
|
|
15214
|
-
line = lines[i];
|
|
15215
|
-
lineNumStr = (i + 1).toString();
|
|
15216
|
-
while (lineNumStr.length < 4) {
|
|
15217
|
-
lineNumStr = " " + lineNumStr;
|
|
15218
|
-
}
|
|
15219
|
-
if (i === lineNum) {
|
|
15220
|
-
console.log(`${lineNumStr}: ${line}`);
|
|
15221
|
-
console.log(" ".repeat(lineNumStr.length + 2 + colNum) + "^".repeat(length));
|
|
15222
|
-
} else {
|
|
15223
|
-
console.log(`${lineNumStr}: ${line}`);
|
|
15224
|
-
}
|
|
15225
|
-
}
|
|
15226
|
-
};
|
|
15227
|
-
VLQ_SHIFT = 5;
|
|
15228
|
-
VLQ_CONTINUATION_BIT = 1 << VLQ_SHIFT;
|
|
15229
|
-
VLQ_VALUE_MASK = VLQ_CONTINUATION_BIT - 1;
|
|
15230
|
-
encodeVlq = function(value) {
|
|
15231
|
-
var answer, nextChunk, signBit, valueToEncode;
|
|
15232
|
-
answer = "";
|
|
15233
|
-
signBit = value < 0 ? 1 : 0;
|
|
15234
|
-
valueToEncode = (Math.abs(value) << 1) + signBit;
|
|
15235
|
-
while (valueToEncode || !answer) {
|
|
15236
|
-
nextChunk = valueToEncode & VLQ_VALUE_MASK;
|
|
15237
|
-
valueToEncode = valueToEncode >> VLQ_SHIFT;
|
|
15238
|
-
if (valueToEncode) {
|
|
15239
|
-
nextChunk |= VLQ_CONTINUATION_BIT;
|
|
15240
|
-
}
|
|
15241
|
-
answer += encodeBase64(nextChunk);
|
|
15242
|
-
}
|
|
15243
|
-
return answer;
|
|
15244
|
-
};
|
|
15245
|
-
BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
15246
|
-
encodeBase64 = function(value) {
|
|
15247
|
-
return BASE64_CHARS[value] || function() {
|
|
15248
|
-
throw new Error(`Cannot Base64 encode value: ${value}`);
|
|
15249
|
-
}();
|
|
15250
|
-
};
|
|
15251
|
-
base64Encode2 = function(src) {
|
|
15252
|
-
return Buffer.from(src).toString("base64");
|
|
15253
|
-
};
|
|
15254
|
-
module2.exports = { base64Encode: base64Encode2, locationTable, lookupLineColumn, SourceMap: SourceMap2 };
|
|
15255
|
-
vlqTable = new Uint8Array(128);
|
|
15256
|
-
vlqChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
15257
|
-
(function() {
|
|
15258
|
-
var i, l, results;
|
|
15259
|
-
i = 0;
|
|
15260
|
-
l = vlqTable.length;
|
|
15261
|
-
while (i < l) {
|
|
15262
|
-
vlqTable[i] = 255;
|
|
15263
|
-
i++;
|
|
15264
|
-
}
|
|
15265
|
-
i = 0;
|
|
15266
|
-
l = vlqChars.length;
|
|
15267
|
-
results = [];
|
|
15268
|
-
while (i < l) {
|
|
15269
|
-
vlqTable[vlqChars.charCodeAt(i)] = i;
|
|
15270
|
-
results.push(i++);
|
|
15271
|
-
}
|
|
15272
|
-
return results;
|
|
15273
|
-
})();
|
|
15274
|
-
decodeError = function(message) {
|
|
15275
|
-
throw new Error(message);
|
|
15276
|
-
};
|
|
15277
|
-
decodeVLQ = function(mapping) {
|
|
15278
|
-
var c, i, index, l, result, shift, v, vlq;
|
|
15279
|
-
i = 0;
|
|
15280
|
-
l = mapping.length;
|
|
15281
|
-
result = [];
|
|
15282
|
-
while (i < l) {
|
|
15283
|
-
shift = 0;
|
|
15284
|
-
vlq = 0;
|
|
15285
|
-
while (true) {
|
|
15286
|
-
if (i >= l) {
|
|
15287
|
-
decodeError("Unexpected early end of mapping data");
|
|
15288
|
-
}
|
|
15289
|
-
c = mapping.charCodeAt(i);
|
|
15290
|
-
if ((c & 127) !== c) {
|
|
15291
|
-
decodeError(`Invalid mapping character: ${JSON.stringify(String.fromCharCode(c))}`);
|
|
15292
|
-
}
|
|
15293
|
-
index = vlqTable[c & 127];
|
|
15294
|
-
if (index === 255) {
|
|
15295
|
-
decodeError(`Invalid mapping character: ${JSON.stringify(String.fromCharCode(c))}`);
|
|
15296
|
-
}
|
|
15297
|
-
i++;
|
|
15298
|
-
vlq |= (index & 31) << shift;
|
|
15299
|
-
shift += 5;
|
|
15300
|
-
if ((index & 32) === 0) {
|
|
15301
|
-
break;
|
|
15233
|
+
[colDelta, sourceFileIndex, srcLine, srcCol] = entry;
|
|
15234
|
+
lineDelta = srcLine - lastSourceLine;
|
|
15235
|
+
colDelta = srcCol - lastSourceColumn;
|
|
15236
|
+
lastSourceLine = srcLine;
|
|
15237
|
+
lastSourceColumn = srcCol;
|
|
15238
|
+
return `${encodeVlq(entry[0])}${encodeVlq(sourceFileIndex)}${encodeVlq(lineDelta)}${encodeVlq(colDelta)}`;
|
|
15239
|
+
} else {
|
|
15240
|
+
return encodeVlq(entry[0]);
|
|
15302
15241
|
}
|
|
15242
|
+
}).join(",");
|
|
15243
|
+
}).join(";");
|
|
15244
|
+
},
|
|
15245
|
+
json: function(srcFileName, outFileName) {
|
|
15246
|
+
return {
|
|
15247
|
+
version: 3,
|
|
15248
|
+
file: outFileName,
|
|
15249
|
+
sources: [srcFileName],
|
|
15250
|
+
mappings: this.renderMappings(),
|
|
15251
|
+
names: [],
|
|
15252
|
+
sourcesContent: [sourceString]
|
|
15253
|
+
};
|
|
15254
|
+
},
|
|
15255
|
+
updateSourceMap: function(outputStr, inputPos) {
|
|
15256
|
+
var outLines, srcCol, srcLine;
|
|
15257
|
+
outLines = outputStr.split(EOL);
|
|
15258
|
+
if (inputPos != null) {
|
|
15259
|
+
[srcLine, srcCol] = lookupLineColumn(srcTable, inputPos);
|
|
15260
|
+
}
|
|
15261
|
+
outLines.forEach(function(line, i) {
|
|
15262
|
+
var l;
|
|
15263
|
+
if (i > 0) {
|
|
15264
|
+
sm.lineNum++;
|
|
15265
|
+
sm.colOffset = 0;
|
|
15266
|
+
sm.lines[sm.lineNum] = [];
|
|
15267
|
+
srcCol = 0;
|
|
15303
15268
|
}
|
|
15304
|
-
|
|
15305
|
-
|
|
15306
|
-
|
|
15307
|
-
|
|
15269
|
+
l = sm.colOffset;
|
|
15270
|
+
sm.colOffset = line.length;
|
|
15271
|
+
if (inputPos != null) {
|
|
15272
|
+
return sm.lines[sm.lineNum].push([l, 0, srcLine + i, srcCol]);
|
|
15273
|
+
} else if (l !== 0) {
|
|
15274
|
+
return sm.lines[sm.lineNum].push([l]);
|
|
15308
15275
|
}
|
|
15309
|
-
|
|
15276
|
+
});
|
|
15277
|
+
}
|
|
15278
|
+
};
|
|
15279
|
+
};
|
|
15280
|
+
SourceMap.parseWithLines = function(base64encodedJSONstr) {
|
|
15281
|
+
var json, lines, sourceColumn, sourceLine;
|
|
15282
|
+
json = JSON.parse(Buffer.from(base64encodedJSONstr, "base64").toString("utf8"));
|
|
15283
|
+
sourceLine = 0;
|
|
15284
|
+
sourceColumn = 0;
|
|
15285
|
+
lines = json.mappings.split(";").map(function(line) {
|
|
15286
|
+
if (line.length === 0) {
|
|
15287
|
+
return [];
|
|
15288
|
+
}
|
|
15289
|
+
return line.split(",").map(function(entry) {
|
|
15290
|
+
var result;
|
|
15291
|
+
result = decodeVLQ(entry);
|
|
15292
|
+
switch (result.length) {
|
|
15293
|
+
case 1:
|
|
15294
|
+
return [result[0]];
|
|
15295
|
+
case 4:
|
|
15296
|
+
return [result[0], result[1], sourceLine += result[2], sourceColumn += result[3]];
|
|
15297
|
+
case 5:
|
|
15298
|
+
return [result[0], result[1], sourceLine += result[2], sourceColumn += result[3], result[4]];
|
|
15299
|
+
default:
|
|
15300
|
+
throw new Error("Unknown source map entry", result);
|
|
15310
15301
|
}
|
|
15311
|
-
|
|
15312
|
-
|
|
15313
|
-
|
|
15314
|
-
|
|
15315
|
-
|
|
15316
|
-
|
|
15317
|
-
|
|
15318
|
-
|
|
15319
|
-
|
|
15320
|
-
|
|
15321
|
-
|
|
15322
|
-
|
|
15323
|
-
|
|
15324
|
-
|
|
15325
|
-
|
|
15326
|
-
|
|
15327
|
-
|
|
15328
|
-
|
|
15329
|
-
|
|
15330
|
-
|
|
15331
|
-
|
|
15332
|
-
|
|
15333
|
-
|
|
15334
|
-
|
|
15335
|
-
|
|
15302
|
+
});
|
|
15303
|
+
});
|
|
15304
|
+
json.lines = lines;
|
|
15305
|
+
return json;
|
|
15306
|
+
};
|
|
15307
|
+
smRegexp = /\n\/\/# sourceMappingURL=data:application\/json;charset=utf-8;base64,([+a-zA-Z0-9\/]*=?=?)$/;
|
|
15308
|
+
SourceMap.remap = function(codeWithSourceMap, upstreamMap, sourcePath, targetPath) {
|
|
15309
|
+
var codeWithoutSourceMap, composedLines, newSourceMap, parsed, remappedCodeWithSourceMap, remappedSourceMapJSON, sourceMapText;
|
|
15310
|
+
sourceMapText = codeWithSourceMap.match(smRegexp);
|
|
15311
|
+
if (sourceMapText) {
|
|
15312
|
+
parsed = SourceMap.parseWithLines(sourceMapText[1]);
|
|
15313
|
+
} else {
|
|
15314
|
+
console.warn("No source map found in code");
|
|
15315
|
+
return codeWithSourceMap;
|
|
15316
|
+
}
|
|
15317
|
+
composedLines = SourceMap.composeLines(upstreamMap.data.lines, parsed.lines);
|
|
15318
|
+
upstreamMap.data.lines = composedLines;
|
|
15319
|
+
remappedSourceMapJSON = upstreamMap.json(sourcePath, targetPath);
|
|
15320
|
+
codeWithoutSourceMap = codeWithSourceMap.replace(smRegexp, "");
|
|
15321
|
+
newSourceMap = `${"sourceMapping"}URL=data:application/json;charset=utf-8;base64,${base64Encode(JSON.stringify(remappedSourceMapJSON))}`;
|
|
15322
|
+
remappedCodeWithSourceMap = `${codeWithoutSourceMap}
|
|
15323
|
+
//# ${newSourceMap}`;
|
|
15324
|
+
return remappedCodeWithSourceMap;
|
|
15325
|
+
};
|
|
15326
|
+
SourceMap.composeLines = function(upstreamMapping, lines) {
|
|
15327
|
+
return lines.map(function(line, l) {
|
|
15328
|
+
return line.map(function(entry) {
|
|
15329
|
+
var colDelta, sourceFileIndex, srcCol, srcLine, srcPos, upstreamCol, upstreamLine;
|
|
15330
|
+
if (entry.length === 1) {
|
|
15331
|
+
return entry;
|
|
15336
15332
|
}
|
|
15337
|
-
|
|
15338
|
-
|
|
15333
|
+
[colDelta, sourceFileIndex, srcLine, srcCol] = entry;
|
|
15334
|
+
srcPos = remapPosition([srcLine, srcCol], upstreamMapping);
|
|
15335
|
+
if (!srcPos) {
|
|
15336
|
+
return [entry[0]];
|
|
15339
15337
|
}
|
|
15340
|
-
|
|
15341
|
-
|
|
15342
|
-
|
|
15343
|
-
return void 0;
|
|
15338
|
+
[upstreamLine, upstreamCol] = srcPos;
|
|
15339
|
+
if (entry.length === 4) {
|
|
15340
|
+
return [colDelta, sourceFileIndex, upstreamLine, upstreamCol];
|
|
15344
15341
|
}
|
|
15345
|
-
|
|
15342
|
+
return [colDelta, sourceFileIndex, upstreamLine, upstreamCol, entry[4]];
|
|
15343
|
+
});
|
|
15344
|
+
});
|
|
15345
|
+
};
|
|
15346
|
+
prettySourceExcerpt = function(source, location, length) {
|
|
15347
|
+
var colNum, i, j, line, lineNum, lineNumStr, lines, ref, ref1;
|
|
15348
|
+
lines = source.split(/\r?\n|\r/);
|
|
15349
|
+
lineNum = location.line;
|
|
15350
|
+
colNum = location.column;
|
|
15351
|
+
for (i = j = ref = lineNum - 2, ref1 = lineNum + 2; ref <= ref1 ? j <= ref1 : j >= ref1; i = ref <= ref1 ? ++j : --j) {
|
|
15352
|
+
if (i < 0 || i >= lines.length) {
|
|
15353
|
+
continue;
|
|
15354
|
+
}
|
|
15355
|
+
line = lines[i];
|
|
15356
|
+
lineNumStr = (i + 1).toString();
|
|
15357
|
+
while (lineNumStr.length < 4) {
|
|
15358
|
+
lineNumStr = " " + lineNumStr;
|
|
15359
|
+
}
|
|
15360
|
+
if (i === lineNum) {
|
|
15361
|
+
console.log(`${lineNumStr}: ${line}`);
|
|
15362
|
+
console.log(" ".repeat(lineNumStr.length + 2 + colNum) + "^".repeat(length));
|
|
15363
|
+
} else {
|
|
15364
|
+
console.log(`${lineNumStr}: ${line}`);
|
|
15365
|
+
}
|
|
15346
15366
|
}
|
|
15347
|
-
}
|
|
15367
|
+
};
|
|
15368
|
+
VLQ_SHIFT = 5;
|
|
15369
|
+
VLQ_CONTINUATION_BIT = 1 << VLQ_SHIFT;
|
|
15370
|
+
VLQ_VALUE_MASK = VLQ_CONTINUATION_BIT - 1;
|
|
15371
|
+
encodeVlq = function(value) {
|
|
15372
|
+
var answer, nextChunk, signBit, valueToEncode;
|
|
15373
|
+
answer = "";
|
|
15374
|
+
signBit = value < 0 ? 1 : 0;
|
|
15375
|
+
valueToEncode = (Math.abs(value) << 1) + signBit;
|
|
15376
|
+
while (valueToEncode || !answer) {
|
|
15377
|
+
nextChunk = valueToEncode & VLQ_VALUE_MASK;
|
|
15378
|
+
valueToEncode = valueToEncode >> VLQ_SHIFT;
|
|
15379
|
+
if (valueToEncode) {
|
|
15380
|
+
nextChunk |= VLQ_CONTINUATION_BIT;
|
|
15381
|
+
}
|
|
15382
|
+
answer += encodeBase64(nextChunk);
|
|
15383
|
+
}
|
|
15384
|
+
return answer;
|
|
15385
|
+
};
|
|
15386
|
+
BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
15387
|
+
encodeBase64 = function(value) {
|
|
15388
|
+
return BASE64_CHARS[value] || function() {
|
|
15389
|
+
throw new Error(`Cannot Base64 encode value: ${value}`);
|
|
15390
|
+
}();
|
|
15391
|
+
};
|
|
15392
|
+
var base64Encode = function(src) {
|
|
15393
|
+
return Buffer.from(src).toString("base64");
|
|
15394
|
+
};
|
|
15395
|
+
vlqTable = new Uint8Array(128);
|
|
15396
|
+
vlqChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
15397
|
+
(function() {
|
|
15398
|
+
var i, l, results;
|
|
15399
|
+
i = 0;
|
|
15400
|
+
l = vlqTable.length;
|
|
15401
|
+
while (i < l) {
|
|
15402
|
+
vlqTable[i] = 255;
|
|
15403
|
+
i++;
|
|
15404
|
+
}
|
|
15405
|
+
i = 0;
|
|
15406
|
+
l = vlqChars.length;
|
|
15407
|
+
results = [];
|
|
15408
|
+
while (i < l) {
|
|
15409
|
+
vlqTable[vlqChars.charCodeAt(i)] = i;
|
|
15410
|
+
results.push(i++);
|
|
15411
|
+
}
|
|
15412
|
+
return results;
|
|
15413
|
+
})();
|
|
15414
|
+
decodeError = function(message) {
|
|
15415
|
+
throw new Error(message);
|
|
15416
|
+
};
|
|
15417
|
+
decodeVLQ = function(mapping) {
|
|
15418
|
+
var c, i, index, l, result, shift, v, vlq;
|
|
15419
|
+
i = 0;
|
|
15420
|
+
l = mapping.length;
|
|
15421
|
+
result = [];
|
|
15422
|
+
while (i < l) {
|
|
15423
|
+
shift = 0;
|
|
15424
|
+
vlq = 0;
|
|
15425
|
+
while (true) {
|
|
15426
|
+
if (i >= l) {
|
|
15427
|
+
decodeError("Unexpected early end of mapping data");
|
|
15428
|
+
}
|
|
15429
|
+
c = mapping.charCodeAt(i);
|
|
15430
|
+
if ((c & 127) !== c) {
|
|
15431
|
+
decodeError(`Invalid mapping character: ${JSON.stringify(String.fromCharCode(c))}`);
|
|
15432
|
+
}
|
|
15433
|
+
index = vlqTable[c & 127];
|
|
15434
|
+
if (index === 255) {
|
|
15435
|
+
decodeError(`Invalid mapping character: ${JSON.stringify(String.fromCharCode(c))}`);
|
|
15436
|
+
}
|
|
15437
|
+
i++;
|
|
15438
|
+
vlq |= (index & 31) << shift;
|
|
15439
|
+
shift += 5;
|
|
15440
|
+
if ((index & 32) === 0) {
|
|
15441
|
+
break;
|
|
15442
|
+
}
|
|
15443
|
+
}
|
|
15444
|
+
if (vlq & 1) {
|
|
15445
|
+
v = -(vlq >> 1);
|
|
15446
|
+
} else {
|
|
15447
|
+
v = vlq >> 1;
|
|
15448
|
+
}
|
|
15449
|
+
result.push(v);
|
|
15450
|
+
}
|
|
15451
|
+
return result;
|
|
15452
|
+
};
|
|
15453
|
+
remapPosition = function(position, sourcemapLines) {
|
|
15454
|
+
var character, i, l, lastMapping, lastMappingPosition, line, mapping, p, textLine;
|
|
15455
|
+
[line, character] = position;
|
|
15456
|
+
textLine = sourcemapLines[line];
|
|
15457
|
+
if (!(textLine != null ? textLine.length : void 0)) {
|
|
15458
|
+
return void 0;
|
|
15459
|
+
}
|
|
15460
|
+
i = 0;
|
|
15461
|
+
p = 0;
|
|
15462
|
+
l = textLine.length;
|
|
15463
|
+
lastMapping = void 0;
|
|
15464
|
+
lastMappingPosition = 0;
|
|
15465
|
+
while (i < l) {
|
|
15466
|
+
mapping = textLine[i];
|
|
15467
|
+
p += mapping[0];
|
|
15468
|
+
if (mapping.length === 4) {
|
|
15469
|
+
lastMapping = mapping;
|
|
15470
|
+
lastMappingPosition = p;
|
|
15471
|
+
}
|
|
15472
|
+
if (p >= character) {
|
|
15473
|
+
break;
|
|
15474
|
+
}
|
|
15475
|
+
i++;
|
|
15476
|
+
}
|
|
15477
|
+
if (character - lastMappingPosition !== 0) {
|
|
15478
|
+
return void 0;
|
|
15479
|
+
}
|
|
15480
|
+
if (lastMapping) {
|
|
15481
|
+
return [lastMapping[2], lastMapping[3]];
|
|
15482
|
+
} else {
|
|
15483
|
+
return void 0;
|
|
15484
|
+
}
|
|
15485
|
+
};
|
|
15348
15486
|
|
|
15349
15487
|
// source/main.coffee
|
|
15350
15488
|
"civet coffeeCompat";
|
|
15351
|
-
var
|
|
15352
|
-
var
|
|
15489
|
+
var SourceMap2;
|
|
15490
|
+
var base64Encode2;
|
|
15353
15491
|
var defaultOptions;
|
|
15354
|
-
var gen;
|
|
15355
15492
|
var makeCache;
|
|
15356
15493
|
var parse;
|
|
15357
|
-
var prune;
|
|
15358
15494
|
var uncacheable;
|
|
15359
|
-
|
|
15360
|
-
({
|
|
15361
|
-
({ prune } = gen = require_generate());
|
|
15362
|
-
({ SourceMap, base64Encode } = util = require_util());
|
|
15495
|
+
({ parse } = import_parser.default);
|
|
15496
|
+
({ SourceMap: SourceMap2, base64Encode: base64Encode2 } = util_exports);
|
|
15363
15497
|
defaultOptions = {};
|
|
15364
|
-
uncacheable = /* @__PURE__ */ new Set(["TrackIndented", "Samedent", "IndentedFurther", "PushIndent", "PopIndent", "Nested", "InsertIndent", "Arguments", "ArgumentsWithTrailingCallExpressions", "ApplicationStart", "CallExpression", "CallExpressionRest", "LeftHandSideExpression", "ActualAssignment", "UpdateExpression", "UnaryExpression", "BinaryOpExpression", "BinaryOpRHS", "ConditionalExpression", "ShortCircuitExpression", "InlineObjectLiteral", "ImplicitInlineObjectPropertyDelimiter", "ImplicitNestedBlock", "ObjectLiteral", "NestedObject", "NestedImplicitObjectLiteral", "BracedObjectLiteralContent", "NestedPropertyDefinitions", "NestedImplicitPropertyDefinition", "NestedImplicitPropertyDefinitions", "NestedBlockStatement", "NestedElement", "NestedElementList", "NestedBindingElement", "NestedBindingElements", "NestedInterfaceProperty", "MemberExpression", "PrimaryExpression", "IndentedApplicationAllowed", "ExpressionWithIndentedApplicationSuppressed", "SuppressIndentedApplication", "AssignmentExpressionTail", "AssignmentExpression", "ExtendedExpression", "Expression", "MemberExpressionRest", "ElseClause", "CoffeeCommentEnabled", "SingleLineComment", "Debugger", "JSXElement", "TypedJSXElement", "JSXFragment", "TypedJSXFragment", "JSXChild", "JSXChildren", "JSXNestedChildren", "JSXMixedChildren"]);
|
|
15365
|
-
|
|
15366
|
-
|
|
15367
|
-
|
|
15368
|
-
|
|
15369
|
-
|
|
15370
|
-
|
|
15371
|
-
|
|
15372
|
-
|
|
15373
|
-
|
|
15374
|
-
|
|
15375
|
-
|
|
15376
|
-
ast
|
|
15377
|
-
|
|
15378
|
-
|
|
15379
|
-
|
|
15380
|
-
|
|
15381
|
-
|
|
15382
|
-
|
|
15383
|
-
|
|
15384
|
-
|
|
15385
|
-
|
|
15386
|
-
return `${code}
|
|
15387
|
-
${"//#"} sourceMappingURL=data:application/json;base64,${base64Encode(JSON.stringify(srcMapJSON))}
|
|
15498
|
+
uncacheable = /* @__PURE__ */ new Set(["TrackIndented", "Samedent", "IndentedFurther", "PushIndent", "PopIndent", "Nested", "InsertIndent", "Arguments", "ArgumentsWithTrailingCallExpressions", "ApplicationStart", "CallExpression", "CallExpressionRest", "LeftHandSideExpression", "ActualAssignment", "UpdateExpression", "UnaryExpression", "BinaryOpExpression", "BinaryOpRHS", "ConditionalExpression", "ShortCircuitExpression", "InlineObjectLiteral", "ImplicitInlineObjectPropertyDelimiter", "ImplicitNestedBlock", "IndentedJSXChildExpression", "NestedJSXChildExpression", "ObjectLiteral", "NestedObject", "NestedImplicitObjectLiteral", "BracedObjectLiteralContent", "NestedPropertyDefinitions", "NestedImplicitPropertyDefinition", "NestedImplicitPropertyDefinitions", "NestedBlockStatement", "NestedElement", "NestedElementList", "NestedBindingElement", "NestedBindingElements", "NestedInterfaceProperty", "MemberExpression", "PrimaryExpression", "IndentedApplicationAllowed", "ExpressionWithIndentedApplicationSuppressed", "SuppressIndentedApplication", "AssignmentExpressionTail", "AssignmentExpression", "ExtendedExpression", "Expression", "MemberExpressionRest", "ElseClause", "CoffeeCommentEnabled", "SingleLineComment", "Debugger", "JSXElement", "TypedJSXElement", "JSXFragment", "TypedJSXFragment", "JSXChild", "JSXChildren", "JSXNestedChildren", "JSXMixedChildren"]);
|
|
15499
|
+
var compile = function(src, options = defaultOptions) {
|
|
15500
|
+
var ast, code, events, filename, sm, srcMapJSON;
|
|
15501
|
+
filename = options.filename || "unknown";
|
|
15502
|
+
if (filename.endsWith(".coffee") && !/^(#![^\r\n]*(\r\n|\n|\r))?\s*['"]civet/.test(src)) {
|
|
15503
|
+
src = `"civet coffeeCompat"; ${src}`;
|
|
15504
|
+
}
|
|
15505
|
+
if (!options.noCache) {
|
|
15506
|
+
events = makeCache();
|
|
15507
|
+
}
|
|
15508
|
+
ast = prune(parse(src, { filename, events }));
|
|
15509
|
+
if (options.ast) {
|
|
15510
|
+
return ast;
|
|
15511
|
+
}
|
|
15512
|
+
if (options.sourceMap || options.inlineMap) {
|
|
15513
|
+
sm = SourceMap2(src);
|
|
15514
|
+
options.updateSourceMap = sm.updateSourceMap;
|
|
15515
|
+
code = generate_default(ast, options);
|
|
15516
|
+
if (options.inlineMap) {
|
|
15517
|
+
srcMapJSON = sm.json(filename, "");
|
|
15518
|
+
return `${code}
|
|
15519
|
+
${"//#"} sourceMappingURL=data:application/json;base64,${base64Encode2(JSON.stringify(srcMapJSON))}
|
|
15388
15520
|
`;
|
|
15389
|
-
|
|
15390
|
-
|
|
15391
|
-
|
|
15392
|
-
|
|
15393
|
-
|
|
15394
|
-
}
|
|
15521
|
+
} else {
|
|
15522
|
+
return {
|
|
15523
|
+
code,
|
|
15524
|
+
sourceMap: sm
|
|
15525
|
+
};
|
|
15395
15526
|
}
|
|
15396
|
-
|
|
15397
|
-
|
|
15398
|
-
generate: gen,
|
|
15399
|
-
util
|
|
15527
|
+
}
|
|
15528
|
+
return generate_default(ast, options);
|
|
15400
15529
|
};
|
|
15401
15530
|
makeCache = function() {
|
|
15402
15531
|
var caches, events;
|
|
@@ -15435,3 +15564,11 @@ makeCache = function() {
|
|
|
15435
15564
|
};
|
|
15436
15565
|
return events;
|
|
15437
15566
|
};
|
|
15567
|
+
var main_default = { parse, generate: generate_default, util: util_exports, compile };
|
|
15568
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
15569
|
+
0 && (module.exports = {
|
|
15570
|
+
compile,
|
|
15571
|
+
generate,
|
|
15572
|
+
parse,
|
|
15573
|
+
util
|
|
15574
|
+
});
|