@weborigami/language 0.4.2 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/main.js +0 -1
- package/package.json +7 -7
- package/src/compiler/compile.js +2 -4
- package/src/compiler/optimize.js +7 -2
- package/src/compiler/origami.pegjs +14 -10
- package/src/compiler/parse.js +1190 -1019
- package/src/compiler/parserHelpers.js +10 -8
- package/src/runtime/errors.js +4 -0
- package/src/runtime/handlers.js +1 -0
- package/src/runtime/jsGlobals.js +3 -0
- package/src/runtime/ops.js +54 -10
- package/test/compiler/compile.test.js +4 -5
- package/test/compiler/optimize.test.js +4 -3
- package/test/compiler/parse.test.js +145 -147
- package/test/runtime/ops.test.js +8 -1
- package/src/runtime/templateIndent.js +0 -120
- package/test/runtime/taggedTemplateIndent.test.js +0 -44
package/src/compiler/parse.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @generated by Peggy
|
|
1
|
+
// @generated by Peggy 5.0.6.
|
|
2
2
|
//
|
|
3
3
|
// https://peggyjs.org/
|
|
4
4
|
|
|
@@ -36,772 +36,896 @@ import {
|
|
|
36
36
|
import isOrigamiFrontMatter from "./isOrigamiFrontMatter.js";
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
39
|
+
class peg$SyntaxError extends SyntaxError {
|
|
40
|
+
constructor(message, expected, found, location) {
|
|
41
|
+
super(message);
|
|
42
|
+
this.expected = expected;
|
|
43
|
+
this.found = found;
|
|
44
|
+
this.location = location;
|
|
45
|
+
this.name = "SyntaxError";
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
format(sources) {
|
|
49
|
+
let str = "Error: " + this.message;
|
|
50
|
+
if (this.location) {
|
|
51
|
+
let src = null;
|
|
52
|
+
const st = sources.find(s => s.source === this.location.source);
|
|
53
|
+
if (st) {
|
|
54
|
+
src = st.text.split(/\r\n|\n|\r/g);
|
|
55
|
+
}
|
|
56
|
+
const s = this.location.start;
|
|
57
|
+
const offset_s = (this.location.source && (typeof this.location.source.offset === "function"))
|
|
58
|
+
? this.location.source.offset(s)
|
|
59
|
+
: s;
|
|
60
|
+
const loc = this.location.source + ":" + offset_s.line + ":" + offset_s.column;
|
|
61
|
+
if (src) {
|
|
62
|
+
const e = this.location.end;
|
|
63
|
+
const filler = "".padEnd(offset_s.line.toString().length, " ");
|
|
64
|
+
const line = src[s.line - 1];
|
|
65
|
+
const last = s.line === e.line ? e.column : line.length + 1;
|
|
66
|
+
const hatLen = (last - s.column) || 1;
|
|
67
|
+
str += "\n --> " + loc + "\n"
|
|
68
|
+
+ filler + " |\n"
|
|
69
|
+
+ offset_s.line + " | " + line + "\n"
|
|
70
|
+
+ filler + " | " + "".padEnd(s.column - 1, " ")
|
|
71
|
+
+ "".padEnd(hatLen, "^");
|
|
72
|
+
} else {
|
|
73
|
+
str += "\n at " + loc;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return str;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
static buildMessage(expected, found) {
|
|
80
|
+
function hex(ch) {
|
|
81
|
+
return ch.codePointAt(0).toString(16).toUpperCase();
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const nonPrintable = Object.prototype.hasOwnProperty.call(RegExp.prototype, "unicode")
|
|
85
|
+
? new RegExp("[\\p{C}\\p{Mn}\\p{Mc}]", "gu")
|
|
86
|
+
: null;
|
|
87
|
+
function unicodeEscape(s) {
|
|
88
|
+
if (nonPrintable) {
|
|
89
|
+
return s.replace(nonPrintable, ch => "\\u{" + hex(ch) + "}");
|
|
90
|
+
}
|
|
91
|
+
return s;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function literalEscape(s) {
|
|
95
|
+
return unicodeEscape(s
|
|
96
|
+
.replace(/\\/g, "\\\\")
|
|
97
|
+
.replace(/"/g, "\\\"")
|
|
98
|
+
.replace(/\0/g, "\\0")
|
|
99
|
+
.replace(/\t/g, "\\t")
|
|
100
|
+
.replace(/\n/g, "\\n")
|
|
101
|
+
.replace(/\r/g, "\\r")
|
|
102
|
+
.replace(/[\x00-\x0F]/g, ch => "\\x0" + hex(ch))
|
|
103
|
+
.replace(/[\x10-\x1F\x7F-\x9F]/g, ch => "\\x" + hex(ch)));
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function classEscape(s) {
|
|
107
|
+
return unicodeEscape(s
|
|
108
|
+
.replace(/\\/g, "\\\\")
|
|
109
|
+
.replace(/\]/g, "\\]")
|
|
110
|
+
.replace(/\^/g, "\\^")
|
|
111
|
+
.replace(/-/g, "\\-")
|
|
112
|
+
.replace(/\0/g, "\\0")
|
|
113
|
+
.replace(/\t/g, "\\t")
|
|
114
|
+
.replace(/\n/g, "\\n")
|
|
115
|
+
.replace(/\r/g, "\\r")
|
|
116
|
+
.replace(/[\x00-\x0F]/g, ch => "\\x0" + hex(ch))
|
|
117
|
+
.replace(/[\x10-\x1F\x7F-\x9F]/g, ch => "\\x" + hex(ch)));
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
const DESCRIBE_EXPECTATION_FNS = {
|
|
121
|
+
literal(expectation) {
|
|
122
|
+
return "\"" + literalEscape(expectation.text) + "\"";
|
|
123
|
+
},
|
|
101
124
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
125
|
+
class(expectation) {
|
|
126
|
+
const escapedParts = expectation.parts.map(
|
|
127
|
+
part => (Array.isArray(part)
|
|
128
|
+
? classEscape(part[0]) + "-" + classEscape(part[1])
|
|
129
|
+
: classEscape(part))
|
|
130
|
+
);
|
|
107
131
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
return Array.isArray(part)
|
|
111
|
-
? classEscape(part[0]) + "-" + classEscape(part[1])
|
|
112
|
-
: classEscape(part);
|
|
113
|
-
});
|
|
132
|
+
return "[" + (expectation.inverted ? "^" : "") + escapedParts.join("") + "]" + (expectation.unicode ? "u" : "");
|
|
133
|
+
},
|
|
114
134
|
|
|
115
|
-
|
|
116
|
-
|
|
135
|
+
any() {
|
|
136
|
+
return "any character";
|
|
137
|
+
},
|
|
117
138
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
139
|
+
end() {
|
|
140
|
+
return "end of input";
|
|
141
|
+
},
|
|
121
142
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
143
|
+
other(expectation) {
|
|
144
|
+
return expectation.description;
|
|
145
|
+
},
|
|
146
|
+
};
|
|
125
147
|
|
|
126
|
-
|
|
127
|
-
return expectation.
|
|
148
|
+
function describeExpectation(expectation) {
|
|
149
|
+
return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);
|
|
128
150
|
}
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
function hex(ch) {
|
|
132
|
-
return ch.charCodeAt(0).toString(16).toUpperCase();
|
|
133
|
-
}
|
|
134
151
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
.
|
|
138
|
-
.replace(/"/g, "\\\"")
|
|
139
|
-
.replace(/\0/g, "\\0")
|
|
140
|
-
.replace(/\t/g, "\\t")
|
|
141
|
-
.replace(/\n/g, "\\n")
|
|
142
|
-
.replace(/\r/g, "\\r")
|
|
143
|
-
.replace(/[\x00-\x0F]/g, function(ch) { return "\\x0" + hex(ch); })
|
|
144
|
-
.replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return "\\x" + hex(ch); });
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
function classEscape(s) {
|
|
148
|
-
return s
|
|
149
|
-
.replace(/\\/g, "\\\\")
|
|
150
|
-
.replace(/\]/g, "\\]")
|
|
151
|
-
.replace(/\^/g, "\\^")
|
|
152
|
-
.replace(/-/g, "\\-")
|
|
153
|
-
.replace(/\0/g, "\\0")
|
|
154
|
-
.replace(/\t/g, "\\t")
|
|
155
|
-
.replace(/\n/g, "\\n")
|
|
156
|
-
.replace(/\r/g, "\\r")
|
|
157
|
-
.replace(/[\x00-\x0F]/g, function(ch) { return "\\x0" + hex(ch); })
|
|
158
|
-
.replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return "\\x" + hex(ch); });
|
|
159
|
-
}
|
|
152
|
+
function describeExpected(expected) {
|
|
153
|
+
const descriptions = expected.map(describeExpectation);
|
|
154
|
+
descriptions.sort();
|
|
160
155
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
156
|
+
if (descriptions.length > 0) {
|
|
157
|
+
let j = 1;
|
|
158
|
+
for (let i = 1; i < descriptions.length; i++) {
|
|
159
|
+
if (descriptions[i - 1] !== descriptions[i]) {
|
|
160
|
+
descriptions[j] = descriptions[i];
|
|
161
|
+
j++;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
descriptions.length = j;
|
|
165
|
+
}
|
|
164
166
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
167
|
+
switch (descriptions.length) {
|
|
168
|
+
case 1:
|
|
169
|
+
return descriptions[0];
|
|
168
170
|
|
|
169
|
-
|
|
171
|
+
case 2:
|
|
172
|
+
return descriptions[0] + " or " + descriptions[1];
|
|
170
173
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
j++;
|
|
176
|
-
}
|
|
174
|
+
default:
|
|
175
|
+
return descriptions.slice(0, -1).join(", ")
|
|
176
|
+
+ ", or "
|
|
177
|
+
+ descriptions[descriptions.length - 1];
|
|
177
178
|
}
|
|
178
|
-
descriptions.length = j;
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
return descriptions[0];
|
|
184
|
-
|
|
185
|
-
case 2:
|
|
186
|
-
return descriptions[0] + " or " + descriptions[1];
|
|
187
|
-
|
|
188
|
-
default:
|
|
189
|
-
return descriptions.slice(0, -1).join(", ")
|
|
190
|
-
+ ", or "
|
|
191
|
-
+ descriptions[descriptions.length - 1];
|
|
181
|
+
function describeFound(found) {
|
|
182
|
+
return found ? "\"" + literalEscape(found) + "\"" : "end of input";
|
|
192
183
|
}
|
|
193
|
-
}
|
|
194
184
|
|
|
195
|
-
|
|
196
|
-
return found ? "\"" + literalEscape(found) + "\"" : "end of input";
|
|
185
|
+
return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found.";
|
|
197
186
|
}
|
|
198
|
-
|
|
199
|
-
return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found.";
|
|
200
|
-
};
|
|
187
|
+
}
|
|
201
188
|
|
|
202
189
|
function peg$parse(input, options) {
|
|
203
190
|
options = options !== undefined ? options : {};
|
|
204
191
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
var peg$e56 = peg$otherExpectation("JavaScript identifier start");
|
|
351
|
-
var peg$e57 = peg$otherExpectation("function call with implicit parentheses");
|
|
352
|
-
var peg$e58 = peg$classExpectation([" ", "\t"], false, false);
|
|
353
|
-
var peg$e59 = peg$otherExpectation("integer");
|
|
354
|
-
var peg$e60 = peg$classExpectation(["!", "+"], false, false);
|
|
355
|
-
var peg$e61 = peg$classExpectation([["%", "&"], "*", "^", "|"], false, false);
|
|
356
|
-
var peg$e62 = peg$classExpectation([".", "@", "~"], false, false);
|
|
357
|
-
var peg$e63 = peg$otherExpectation("list");
|
|
358
|
-
var peg$e64 = peg$literalExpectation("&&", false);
|
|
359
|
-
var peg$e65 = peg$literalExpectation("||", false);
|
|
360
|
-
var peg$e66 = peg$literalExpectation("-", false);
|
|
361
|
-
var peg$e67 = peg$literalExpectation("-\n", false);
|
|
362
|
-
var peg$e68 = peg$literalExpectation("/*", false);
|
|
363
|
-
var peg$e69 = peg$literalExpectation("*/", false);
|
|
364
|
-
var peg$e70 = peg$classExpectation(["%", "*", "/"], false, false);
|
|
365
|
-
var peg$e71 = peg$literalExpectation("new", false);
|
|
366
|
-
var peg$e72 = peg$literalExpectation("new:", false);
|
|
367
|
-
var peg$e73 = peg$literalExpectation("\n", false);
|
|
368
|
-
var peg$e74 = peg$literalExpectation("\r\n", false);
|
|
369
|
-
var peg$e75 = peg$literalExpectation("\r", false);
|
|
370
|
-
var peg$e76 = peg$otherExpectation("number");
|
|
371
|
-
var peg$e77 = peg$literalExpectation("??", false);
|
|
372
|
-
var peg$e78 = peg$otherExpectation("object literal");
|
|
373
|
-
var peg$e79 = peg$literalExpectation("{", false);
|
|
374
|
-
var peg$e80 = peg$otherExpectation("object getter");
|
|
375
|
-
var peg$e81 = peg$literalExpectation("=", false);
|
|
376
|
-
var peg$e82 = peg$otherExpectation("object key");
|
|
377
|
-
var peg$e83 = peg$otherExpectation("object property");
|
|
378
|
-
var peg$e84 = peg$otherExpectation("object identifier");
|
|
379
|
-
var peg$e85 = peg$literalExpectation("?.", false);
|
|
380
|
-
var peg$e86 = peg$otherExpectation("function arguments in parentheses");
|
|
381
|
-
var peg$e87 = peg$otherExpectation("Origami program");
|
|
382
|
-
var peg$e88 = peg$classExpectation(["g", "i", "m", "u", "y"], false, false);
|
|
383
|
-
var peg$e89 = peg$classExpectation(["/", "\n", "\r"], true, false);
|
|
384
|
-
var peg$e90 = peg$literalExpectation("<=", false);
|
|
385
|
-
var peg$e91 = peg$literalExpectation(">=", false);
|
|
386
|
-
var peg$e92 = peg$literalExpectation("#!", false);
|
|
387
|
-
var peg$e93 = peg$classExpectation(["\n", "\r"], true, false);
|
|
388
|
-
var peg$e94 = peg$literalExpectation("<<", false);
|
|
389
|
-
var peg$e95 = peg$literalExpectation(">>>", false);
|
|
390
|
-
var peg$e96 = peg$literalExpectation(">>", false);
|
|
391
|
-
var peg$e97 = peg$otherExpectation("lambda function");
|
|
392
|
-
var peg$e98 = peg$literalExpectation("\u2192", false);
|
|
393
|
-
var peg$e99 = peg$literalExpectation("->", false);
|
|
394
|
-
var peg$e100 = peg$otherExpectation("single quote string");
|
|
395
|
-
var peg$e101 = peg$otherExpectation("string");
|
|
396
|
-
var peg$e102 = peg$otherExpectation("template");
|
|
397
|
-
var peg$e103 = peg$literalExpectation("${", false);
|
|
398
|
-
var peg$e104 = peg$otherExpectation("template text");
|
|
399
|
-
var peg$e105 = peg$otherExpectation("template document");
|
|
400
|
-
var peg$e106 = peg$otherExpectation("template literal");
|
|
401
|
-
var peg$e107 = peg$otherExpectation("template substitution");
|
|
402
|
-
var peg$e108 = peg$classExpectation(["/", ",", ")", "]", "}"], true, false);
|
|
403
|
-
var peg$e109 = peg$otherExpectation("slash-separated path");
|
|
404
|
-
var peg$e110 = peg$classExpectation([["a", "z"]], false, false);
|
|
405
|
-
var peg$e111 = peg$classExpectation([["a", "z"], ["0", "9"], ["+", "."]], false, false);
|
|
406
|
-
var peg$e112 = peg$classExpectation([":"], false, false);
|
|
407
|
-
var peg$e113 = peg$literalExpectation("~", false);
|
|
408
|
-
var peg$e114 = peg$classExpectation(["/", ")", "]", "}"], false, false);
|
|
409
|
-
|
|
410
|
-
var peg$f0 = function() {
|
|
411
|
-
return null;
|
|
192
|
+
const peg$FAILED = {};
|
|
193
|
+
const peg$source = options.grammarSource;
|
|
194
|
+
|
|
195
|
+
const peg$startRuleFunctions = {
|
|
196
|
+
__: peg$parse__,
|
|
197
|
+
additiveExpression: peg$parseadditiveExpression,
|
|
198
|
+
additiveOperator: peg$parseadditiveOperator,
|
|
199
|
+
angleBracketLiteral: peg$parseangleBracketLiteral,
|
|
200
|
+
angleBracketPath: peg$parseangleBracketPath,
|
|
201
|
+
angleBracketKey: peg$parseangleBracketKey,
|
|
202
|
+
angleBracketPathChar: peg$parseangleBracketPathChar,
|
|
203
|
+
arguments: peg$parsearguments,
|
|
204
|
+
arrayLiteral: peg$parsearrayLiteral,
|
|
205
|
+
arrayEntries: peg$parsearrayEntries,
|
|
206
|
+
arrayEntry: peg$parsearrayEntry,
|
|
207
|
+
arrowFunction: peg$parsearrowFunction,
|
|
208
|
+
bitwiseAndExpression: peg$parsebitwiseAndExpression,
|
|
209
|
+
bitwiseAndOperator: peg$parsebitwiseAndOperator,
|
|
210
|
+
bitwiseOrExpression: peg$parsebitwiseOrExpression,
|
|
211
|
+
bitwiseOrOperator: peg$parsebitwiseOrOperator,
|
|
212
|
+
bitwiseXorExpression: peg$parsebitwiseXorExpression,
|
|
213
|
+
bitwiseXorOperator: peg$parsebitwiseXorOperator,
|
|
214
|
+
callExpression: peg$parsecallExpression,
|
|
215
|
+
commaExpression: peg$parsecommaExpression,
|
|
216
|
+
comment: peg$parsecomment,
|
|
217
|
+
computedPropertyAccess: peg$parsecomputedPropertyAccess,
|
|
218
|
+
computedPropertySpace: peg$parsecomputedPropertySpace,
|
|
219
|
+
conditionalExpression: peg$parseconditionalExpression,
|
|
220
|
+
digits: peg$parsedigits,
|
|
221
|
+
doubleArrow: peg$parsedoubleArrow,
|
|
222
|
+
doubleQuoteString: peg$parsedoubleQuoteString,
|
|
223
|
+
doubleQuoteStringChar: peg$parsedoubleQuoteStringChar,
|
|
224
|
+
ellipsis: peg$parseellipsis,
|
|
225
|
+
equalityExpression: peg$parseequalityExpression,
|
|
226
|
+
equalityOperator: peg$parseequalityOperator,
|
|
227
|
+
escapedChar: peg$parseescapedChar,
|
|
228
|
+
expectBacktick: peg$parseexpectBacktick,
|
|
229
|
+
expectClosingBrace: peg$parseexpectClosingBrace,
|
|
230
|
+
expectClosingBracket: peg$parseexpectClosingBracket,
|
|
231
|
+
expectClosingParenthesis: peg$parseexpectClosingParenthesis,
|
|
232
|
+
expectDoubleQuote: peg$parseexpectDoubleQuote,
|
|
233
|
+
expectExpression: peg$parseexpectExpression,
|
|
234
|
+
expectFrontDelimiter: peg$parseexpectFrontDelimiter,
|
|
235
|
+
expectGuillemet: peg$parseexpectGuillemet,
|
|
236
|
+
expectSingleQuote: peg$parseexpectSingleQuote,
|
|
237
|
+
expectPipelineExpression: peg$parseexpectPipelineExpression,
|
|
238
|
+
expectUnaryExpression: peg$parseexpectUnaryExpression,
|
|
239
|
+
exponentiationExpression: peg$parseexponentiationExpression,
|
|
240
|
+
expression: peg$parseexpression,
|
|
241
|
+
floatLiteral: peg$parsefloatLiteral,
|
|
242
|
+
frontDelimiter: peg$parsefrontDelimiter,
|
|
243
|
+
frontMatterExpression: peg$parsefrontMatterExpression,
|
|
244
|
+
frontMatterText: peg$parsefrontMatterText,
|
|
245
|
+
frontMatterYaml: peg$parsefrontMatterYaml,
|
|
246
|
+
group: peg$parsegroup,
|
|
247
|
+
guillemetString: peg$parseguillemetString,
|
|
248
|
+
guillemetStringChar: peg$parseguillemetStringChar,
|
|
249
|
+
host: peg$parsehost,
|
|
250
|
+
hostname: peg$parsehostname,
|
|
251
|
+
identifier: peg$parseidentifier,
|
|
252
|
+
identifierLiteral: peg$parseidentifierLiteral,
|
|
253
|
+
identifierPart: peg$parseidentifierPart,
|
|
254
|
+
identifierStart: peg$parseidentifierStart,
|
|
255
|
+
implicitParenthesesCallExpression: peg$parseimplicitParenthesesCallExpression,
|
|
256
|
+
implicitParensthesesArguments: peg$parseimplicitParensthesesArguments,
|
|
257
|
+
inlineSpace: peg$parseinlineSpace,
|
|
258
|
+
integerLiteral: peg$parseintegerLiteral,
|
|
259
|
+
key: peg$parsekey,
|
|
260
|
+
keyChar: peg$parsekeyChar,
|
|
261
|
+
keyCharStart: peg$parsekeyCharStart,
|
|
262
|
+
list: peg$parselist,
|
|
263
|
+
logicalAndExpression: peg$parselogicalAndExpression,
|
|
264
|
+
logicalOrExpression: peg$parselogicalOrExpression,
|
|
265
|
+
minus: peg$parseminus,
|
|
266
|
+
multiLineComment: peg$parsemultiLineComment,
|
|
267
|
+
multiplicativeExpression: peg$parsemultiplicativeExpression,
|
|
268
|
+
multiplicativeOperator: peg$parsemultiplicativeOperator,
|
|
269
|
+
newExpression: peg$parsenewExpression,
|
|
270
|
+
newLine: peg$parsenewLine,
|
|
271
|
+
numericLiteral: peg$parsenumericLiteral,
|
|
272
|
+
nullishCoalescingExpression: peg$parsenullishCoalescingExpression,
|
|
273
|
+
objectLiteral: peg$parseobjectLiteral,
|
|
274
|
+
objectEntries: peg$parseobjectEntries,
|
|
275
|
+
objectEntry: peg$parseobjectEntry,
|
|
276
|
+
objectGetter: peg$parseobjectGetter,
|
|
277
|
+
objectHiddenKey: peg$parseobjectHiddenKey,
|
|
278
|
+
objectKey: peg$parseobjectKey,
|
|
279
|
+
objectProperty: peg$parseobjectProperty,
|
|
280
|
+
objectShorthandProperty: peg$parseobjectShorthandProperty,
|
|
281
|
+
objectPublicKey: peg$parseobjectPublicKey,
|
|
282
|
+
optionalChaining: peg$parseoptionalChaining,
|
|
283
|
+
parameter: peg$parseparameter,
|
|
284
|
+
parameterList: peg$parseparameterList,
|
|
285
|
+
parameterSingleton: peg$parseparameterSingleton,
|
|
286
|
+
parenthesesArguments: peg$parseparenthesesArguments,
|
|
287
|
+
pathArguments: peg$parsepathArguments,
|
|
288
|
+
pathKeys: peg$parsepathKeys,
|
|
289
|
+
pathLiteral: peg$parsepathLiteral,
|
|
290
|
+
pathSegment: peg$parsepathSegment,
|
|
291
|
+
pipelineExpression: peg$parsepipelineExpression,
|
|
292
|
+
primary: peg$parseprimary,
|
|
293
|
+
program: peg$parseprogram,
|
|
294
|
+
programMode: peg$parseprogramMode,
|
|
295
|
+
propertyAccess: peg$parsepropertyAccess,
|
|
296
|
+
regexFlags: peg$parseregexFlags,
|
|
297
|
+
regexLiteral: peg$parseregexLiteral,
|
|
298
|
+
regexLiteralChar: peg$parseregexLiteralChar,
|
|
299
|
+
relationalExpression: peg$parserelationalExpression,
|
|
300
|
+
relationalOperator: peg$parserelationalOperator,
|
|
301
|
+
separator: peg$parseseparator,
|
|
302
|
+
shebang: peg$parseshebang,
|
|
303
|
+
shellMode: peg$parseshellMode,
|
|
304
|
+
shiftExpression: peg$parseshiftExpression,
|
|
305
|
+
shiftOperator: peg$parseshiftOperator,
|
|
306
|
+
shorthandFunction: peg$parseshorthandFunction,
|
|
307
|
+
singleArrow: peg$parsesingleArrow,
|
|
308
|
+
singleLineComment: peg$parsesingleLineComment,
|
|
309
|
+
singleQuoteString: peg$parsesingleQuoteString,
|
|
310
|
+
singleQuoteStringChar: peg$parsesingleQuoteStringChar,
|
|
311
|
+
slash: peg$parseslash,
|
|
312
|
+
slashes: peg$parseslashes,
|
|
313
|
+
slashFollows: peg$parseslashFollows,
|
|
314
|
+
spreadElement: peg$parsespreadElement,
|
|
315
|
+
stringLiteral: peg$parsestringLiteral,
|
|
316
|
+
templateBody: peg$parsetemplateBody,
|
|
317
|
+
templateBodyChar: peg$parsetemplateBodyChar,
|
|
318
|
+
templateBodyText: peg$parsetemplateBodyText,
|
|
319
|
+
templateDocument: peg$parsetemplateDocument,
|
|
320
|
+
templateLiteral: peg$parsetemplateLiteral,
|
|
321
|
+
templateLiteralChar: peg$parsetemplateLiteralChar,
|
|
322
|
+
templateLiteralText: peg$parsetemplateLiteralText,
|
|
323
|
+
templateSubstitution: peg$parsetemplateSubstitution,
|
|
324
|
+
textChar: peg$parsetextChar,
|
|
325
|
+
unaryExpression: peg$parseunaryExpression,
|
|
326
|
+
uri: peg$parseuri,
|
|
327
|
+
uriExpression: peg$parseuriExpression,
|
|
328
|
+
uriKey: peg$parseuriKey,
|
|
329
|
+
uriKeyChar: peg$parseuriKeyChar,
|
|
330
|
+
uriPath: peg$parseuriPath,
|
|
331
|
+
uriScheme: peg$parseuriScheme,
|
|
332
|
+
unaryOperator: peg$parseunaryOperator,
|
|
333
|
+
whitespace: peg$parsewhitespace,
|
|
334
|
+
whitespaceChar: peg$parsewhitespaceChar,
|
|
335
|
+
whitespaceOptionalForProgram: peg$parsewhitespaceOptionalForProgram,
|
|
336
|
+
whitespaceWithNewLine: peg$parsewhitespaceWithNewLine,
|
|
412
337
|
};
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
338
|
+
let peg$startRuleFunction = peg$parse__;
|
|
339
|
+
|
|
340
|
+
const peg$c0 = "+";
|
|
341
|
+
const peg$c1 = "<";
|
|
342
|
+
const peg$c2 = "//";
|
|
343
|
+
const peg$c3 = ">";
|
|
344
|
+
const peg$c4 = "</";
|
|
345
|
+
const peg$c5 = "/";
|
|
346
|
+
const peg$c6 = "[";
|
|
347
|
+
const peg$c7 = "]";
|
|
348
|
+
const peg$c8 = "(";
|
|
349
|
+
const peg$c9 = ")";
|
|
350
|
+
const peg$c10 = "&";
|
|
351
|
+
const peg$c11 = "|";
|
|
352
|
+
const peg$c12 = "^";
|
|
353
|
+
const peg$c13 = ",";
|
|
354
|
+
const peg$c14 = "?";
|
|
355
|
+
const peg$c15 = ":";
|
|
356
|
+
const peg$c16 = "\u21D2";
|
|
357
|
+
const peg$c17 = "=>";
|
|
358
|
+
const peg$c18 = "\"";
|
|
359
|
+
const peg$c19 = "...";
|
|
360
|
+
const peg$c20 = "\u2026";
|
|
361
|
+
const peg$c21 = "===";
|
|
362
|
+
const peg$c22 = "!==";
|
|
363
|
+
const peg$c23 = "==";
|
|
364
|
+
const peg$c24 = "!=";
|
|
365
|
+
const peg$c25 = "\\0";
|
|
366
|
+
const peg$c26 = "\\b";
|
|
367
|
+
const peg$c27 = "\\f";
|
|
368
|
+
const peg$c28 = "\\n";
|
|
369
|
+
const peg$c29 = "\\r";
|
|
370
|
+
const peg$c30 = "\\t";
|
|
371
|
+
const peg$c31 = "\\v";
|
|
372
|
+
const peg$c32 = "\\";
|
|
373
|
+
const peg$c33 = "`";
|
|
374
|
+
const peg$c34 = "}";
|
|
375
|
+
const peg$c35 = "\xBB";
|
|
376
|
+
const peg$c36 = "'";
|
|
377
|
+
const peg$c37 = "**";
|
|
378
|
+
const peg$c38 = ".";
|
|
379
|
+
const peg$c39 = "---\n";
|
|
380
|
+
const peg$c40 = "\xAB";
|
|
381
|
+
const peg$c41 = "&&";
|
|
382
|
+
const peg$c42 = "||";
|
|
383
|
+
const peg$c43 = "-";
|
|
384
|
+
const peg$c44 = "-\n";
|
|
385
|
+
const peg$c45 = "/*";
|
|
386
|
+
const peg$c46 = "*/";
|
|
387
|
+
const peg$c47 = "new";
|
|
388
|
+
const peg$c48 = "new:";
|
|
389
|
+
const peg$c49 = "\n";
|
|
390
|
+
const peg$c50 = "\r\n";
|
|
391
|
+
const peg$c51 = "\r";
|
|
392
|
+
const peg$c52 = "??";
|
|
393
|
+
const peg$c53 = "{";
|
|
394
|
+
const peg$c54 = "=";
|
|
395
|
+
const peg$c55 = "?.";
|
|
396
|
+
const peg$c56 = "<=";
|
|
397
|
+
const peg$c57 = ">=";
|
|
398
|
+
const peg$c58 = "#!";
|
|
399
|
+
const peg$c59 = "<<";
|
|
400
|
+
const peg$c60 = ">>>";
|
|
401
|
+
const peg$c61 = ">>";
|
|
402
|
+
const peg$c62 = "\u2192";
|
|
403
|
+
const peg$c63 = "->";
|
|
404
|
+
const peg$c64 = "${";
|
|
405
|
+
const peg$c65 = "~";
|
|
406
|
+
|
|
407
|
+
const peg$r0 = /^[^\/>\t\n\r]/;
|
|
408
|
+
const peg$r1 = /^[0-9]/;
|
|
409
|
+
const peg$r2 = /^[ \t]/;
|
|
410
|
+
const peg$r3 = /^[!+]/;
|
|
411
|
+
const peg$r4 = /^[%-&*\^|]/;
|
|
412
|
+
const peg$r5 = /^[.@~]/;
|
|
413
|
+
const peg$r6 = /^[%*\/]/;
|
|
414
|
+
const peg$r7 = /^[gimuy]/;
|
|
415
|
+
const peg$r8 = /^[^\/\n\r]/;
|
|
416
|
+
const peg$r9 = /^[^\n\r]/;
|
|
417
|
+
const peg$r10 = /^[^\/,)\]}]/;
|
|
418
|
+
const peg$r11 = /^[a-z]/;
|
|
419
|
+
const peg$r12 = /^[a-z0-9+-.]/;
|
|
420
|
+
const peg$r13 = /^[:]/;
|
|
421
|
+
const peg$r14 = /^[\/)\]}]/;
|
|
422
|
+
|
|
423
|
+
const peg$e0 = peg$literalExpectation("+", false);
|
|
424
|
+
const peg$e1 = peg$literalExpectation("<", false);
|
|
425
|
+
const peg$e2 = peg$literalExpectation("//", false);
|
|
426
|
+
const peg$e3 = peg$literalExpectation(">", false);
|
|
427
|
+
const peg$e4 = peg$literalExpectation("</", false);
|
|
428
|
+
const peg$e5 = peg$literalExpectation("/", false);
|
|
429
|
+
const peg$e6 = peg$classExpectation(["/", ">", "\t", "\n", "\r"], true, false, false);
|
|
430
|
+
const peg$e7 = peg$otherExpectation("function arguments");
|
|
431
|
+
const peg$e8 = peg$otherExpectation("array");
|
|
432
|
+
const peg$e9 = peg$literalExpectation("[", false);
|
|
433
|
+
const peg$e10 = peg$literalExpectation("]", false);
|
|
434
|
+
const peg$e11 = peg$literalExpectation("(", false);
|
|
435
|
+
const peg$e12 = peg$literalExpectation(")", false);
|
|
436
|
+
const peg$e13 = peg$literalExpectation("&", false);
|
|
437
|
+
const peg$e14 = peg$literalExpectation("|", false);
|
|
438
|
+
const peg$e15 = peg$literalExpectation("^", false);
|
|
439
|
+
const peg$e16 = peg$otherExpectation("function call");
|
|
440
|
+
const peg$e17 = peg$literalExpectation(",", false);
|
|
441
|
+
const peg$e18 = peg$otherExpectation("comment");
|
|
442
|
+
const peg$e19 = peg$literalExpectation("?", false);
|
|
443
|
+
const peg$e20 = peg$literalExpectation(":", false);
|
|
444
|
+
const peg$e21 = peg$classExpectation([["0", "9"]], false, false, false);
|
|
445
|
+
const peg$e22 = peg$literalExpectation("\u21D2", false);
|
|
446
|
+
const peg$e23 = peg$literalExpectation("=>", false);
|
|
447
|
+
const peg$e24 = peg$otherExpectation("double quote string");
|
|
448
|
+
const peg$e25 = peg$literalExpectation("\"", false);
|
|
449
|
+
const peg$e26 = peg$literalExpectation("...", false);
|
|
450
|
+
const peg$e27 = peg$literalExpectation("\u2026", false);
|
|
451
|
+
const peg$e28 = peg$literalExpectation("===", false);
|
|
452
|
+
const peg$e29 = peg$literalExpectation("!==", false);
|
|
453
|
+
const peg$e30 = peg$literalExpectation("==", false);
|
|
454
|
+
const peg$e31 = peg$literalExpectation("!=", false);
|
|
455
|
+
const peg$e32 = peg$otherExpectation("backslash-escaped character");
|
|
456
|
+
const peg$e33 = peg$literalExpectation("\\0", false);
|
|
457
|
+
const peg$e34 = peg$literalExpectation("\\b", false);
|
|
458
|
+
const peg$e35 = peg$literalExpectation("\\f", false);
|
|
459
|
+
const peg$e36 = peg$literalExpectation("\\n", false);
|
|
460
|
+
const peg$e37 = peg$literalExpectation("\\r", false);
|
|
461
|
+
const peg$e38 = peg$literalExpectation("\\t", false);
|
|
462
|
+
const peg$e39 = peg$literalExpectation("\\v", false);
|
|
463
|
+
const peg$e40 = peg$literalExpectation("\\", false);
|
|
464
|
+
const peg$e41 = peg$anyExpectation();
|
|
465
|
+
const peg$e42 = peg$literalExpectation("`", false);
|
|
466
|
+
const peg$e43 = peg$literalExpectation("}", false);
|
|
467
|
+
const peg$e44 = peg$literalExpectation("\xBB", false);
|
|
468
|
+
const peg$e45 = peg$literalExpectation("'", false);
|
|
469
|
+
const peg$e46 = peg$literalExpectation("**", false);
|
|
470
|
+
const peg$e47 = peg$otherExpectation("floating-point number");
|
|
471
|
+
const peg$e48 = peg$literalExpectation(".", false);
|
|
472
|
+
const peg$e49 = peg$literalExpectation("---\n", false);
|
|
473
|
+
const peg$e50 = peg$otherExpectation("YAML front matter");
|
|
474
|
+
const peg$e51 = peg$otherExpectation("parenthetical group");
|
|
475
|
+
const peg$e52 = peg$otherExpectation("guillemet string");
|
|
476
|
+
const peg$e53 = peg$literalExpectation("\xAB", false);
|
|
477
|
+
const peg$e54 = peg$otherExpectation("HTTP/HTTPS host");
|
|
478
|
+
const peg$e55 = peg$otherExpectation("JavaScript identifier continuation");
|
|
479
|
+
const peg$e56 = peg$otherExpectation("JavaScript identifier start");
|
|
480
|
+
const peg$e57 = peg$otherExpectation("function call with implicit parentheses");
|
|
481
|
+
const peg$e58 = peg$classExpectation([" ", "\t"], false, false, false);
|
|
482
|
+
const peg$e59 = peg$otherExpectation("integer");
|
|
483
|
+
const peg$e60 = peg$classExpectation(["!", "+"], false, false, false);
|
|
484
|
+
const peg$e61 = peg$classExpectation([["%", "&"], "*", "^", "|"], false, false, false);
|
|
485
|
+
const peg$e62 = peg$classExpectation([".", "@", "~"], false, false, false);
|
|
486
|
+
const peg$e63 = peg$otherExpectation("list");
|
|
487
|
+
const peg$e64 = peg$literalExpectation("&&", false);
|
|
488
|
+
const peg$e65 = peg$literalExpectation("||", false);
|
|
489
|
+
const peg$e66 = peg$literalExpectation("-", false);
|
|
490
|
+
const peg$e67 = peg$literalExpectation("-\n", false);
|
|
491
|
+
const peg$e68 = peg$literalExpectation("/*", false);
|
|
492
|
+
const peg$e69 = peg$literalExpectation("*/", false);
|
|
493
|
+
const peg$e70 = peg$classExpectation(["%", "*", "/"], false, false, false);
|
|
494
|
+
const peg$e71 = peg$literalExpectation("new", false);
|
|
495
|
+
const peg$e72 = peg$literalExpectation("new:", false);
|
|
496
|
+
const peg$e73 = peg$literalExpectation("\n", false);
|
|
497
|
+
const peg$e74 = peg$literalExpectation("\r\n", false);
|
|
498
|
+
const peg$e75 = peg$literalExpectation("\r", false);
|
|
499
|
+
const peg$e76 = peg$otherExpectation("number");
|
|
500
|
+
const peg$e77 = peg$literalExpectation("??", false);
|
|
501
|
+
const peg$e78 = peg$otherExpectation("object literal");
|
|
502
|
+
const peg$e79 = peg$literalExpectation("{", false);
|
|
503
|
+
const peg$e80 = peg$otherExpectation("object getter");
|
|
504
|
+
const peg$e81 = peg$literalExpectation("=", false);
|
|
505
|
+
const peg$e82 = peg$otherExpectation("object key");
|
|
506
|
+
const peg$e83 = peg$otherExpectation("object property");
|
|
507
|
+
const peg$e84 = peg$otherExpectation("object identifier");
|
|
508
|
+
const peg$e85 = peg$literalExpectation("?.", false);
|
|
509
|
+
const peg$e86 = peg$otherExpectation("function arguments in parentheses");
|
|
510
|
+
const peg$e87 = peg$otherExpectation("Origami program");
|
|
511
|
+
const peg$e88 = peg$classExpectation(["g", "i", "m", "u", "y"], false, false, false);
|
|
512
|
+
const peg$e89 = peg$classExpectation(["/", "\n", "\r"], true, false, false);
|
|
513
|
+
const peg$e90 = peg$literalExpectation("<=", false);
|
|
514
|
+
const peg$e91 = peg$literalExpectation(">=", false);
|
|
515
|
+
const peg$e92 = peg$literalExpectation("#!", false);
|
|
516
|
+
const peg$e93 = peg$classExpectation(["\n", "\r"], true, false, false);
|
|
517
|
+
const peg$e94 = peg$literalExpectation("<<", false);
|
|
518
|
+
const peg$e95 = peg$literalExpectation(">>>", false);
|
|
519
|
+
const peg$e96 = peg$literalExpectation(">>", false);
|
|
520
|
+
const peg$e97 = peg$otherExpectation("lambda function");
|
|
521
|
+
const peg$e98 = peg$literalExpectation("\u2192", false);
|
|
522
|
+
const peg$e99 = peg$literalExpectation("->", false);
|
|
523
|
+
const peg$e100 = peg$otherExpectation("single quote string");
|
|
524
|
+
const peg$e101 = peg$otherExpectation("string");
|
|
525
|
+
const peg$e102 = peg$literalExpectation("${", false);
|
|
526
|
+
const peg$e103 = peg$otherExpectation("template document");
|
|
527
|
+
const peg$e104 = peg$otherExpectation("template literal");
|
|
528
|
+
const peg$e105 = peg$otherExpectation("template substitution");
|
|
529
|
+
const peg$e106 = peg$classExpectation(["/", ",", ")", "]", "}"], true, false, false);
|
|
530
|
+
const peg$e107 = peg$otherExpectation("slash-separated path");
|
|
531
|
+
const peg$e108 = peg$classExpectation([["a", "z"]], false, false, false);
|
|
532
|
+
const peg$e109 = peg$classExpectation([["a", "z"], ["0", "9"], ["+", "."]], false, false, false);
|
|
533
|
+
const peg$e110 = peg$classExpectation([":"], false, false, false);
|
|
534
|
+
const peg$e111 = peg$literalExpectation("~", false);
|
|
535
|
+
const peg$e112 = peg$classExpectation(["/", ")", "]", "}"], false, false, false);
|
|
536
|
+
|
|
537
|
+
function peg$f0() {
|
|
538
|
+
return null;
|
|
539
|
+
}
|
|
540
|
+
function peg$f1(head, tail) {
|
|
541
|
+
return tail.reduce(makeBinaryOperation, head);
|
|
542
|
+
}
|
|
543
|
+
function peg$f2(scheme, path) {
|
|
417
544
|
return annotate([scheme, ...path], location());
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
545
|
+
}
|
|
546
|
+
function peg$f3(path) {
|
|
547
|
+
const external = annotate([markers.external, "/"], location());
|
|
548
|
+
return annotate([markers.traverse, external, ...path], location());
|
|
549
|
+
}
|
|
550
|
+
function peg$f4(path) {
|
|
551
|
+
const [head, ...tail] = path;
|
|
552
|
+
const external = annotate([markers.external, head[1]], location());
|
|
553
|
+
return annotate([markers.traverse, external, ...tail], location());
|
|
554
|
+
}
|
|
555
|
+
function peg$f5(chars, slashFollows) {
|
|
556
|
+
// Append a trailing slash if one follows (but don't consume it)
|
|
557
|
+
const key = chars.join("") + (slashFollows ? "/" : "");
|
|
558
|
+
return annotate([ops.literal, key], location());
|
|
559
|
+
}
|
|
560
|
+
function peg$f6(entries) {
|
|
561
|
+
return makeArray(entries ?? [], location());
|
|
562
|
+
}
|
|
563
|
+
function peg$f7(entries) {
|
|
564
|
+
return annotate(entries, location());
|
|
565
|
+
}
|
|
566
|
+
function peg$f8() {
|
|
567
|
+
return annotate([ops.literal, undefined], location());
|
|
568
|
+
}
|
|
569
|
+
function peg$f9(parameters, pipeline) {
|
|
570
|
+
const lambdaParameters = parameters ?? annotate([], location());
|
|
571
|
+
return annotate([ops.lambda, lambdaParameters, pipeline], location());
|
|
572
|
+
}
|
|
573
|
+
function peg$f10(parameter, pipeline) {
|
|
574
|
+
return annotate([ops.lambda, parameter, pipeline], location());
|
|
575
|
+
}
|
|
576
|
+
function peg$f11(head, tail) {
|
|
577
|
+
return tail.reduce(makeBinaryOperation, head);
|
|
578
|
+
}
|
|
579
|
+
function peg$f12(head, tail) {
|
|
580
|
+
return tail.reduce(makeBinaryOperation, head);
|
|
581
|
+
}
|
|
582
|
+
function peg$f13(head, tail) {
|
|
583
|
+
return tail.reduce(makeBinaryOperation, head);
|
|
584
|
+
}
|
|
585
|
+
function peg$f14(head, tail) {
|
|
586
|
+
return tail.reduce(
|
|
587
|
+
(target, args) => makeCall(target, args, location()),
|
|
588
|
+
head
|
|
589
|
+
);
|
|
590
|
+
}
|
|
591
|
+
function peg$f15(list) {
|
|
592
|
+
return list.length === 1
|
|
593
|
+
? list[0]
|
|
594
|
+
: annotate([ops.comma, ...list], location());
|
|
595
|
+
}
|
|
596
|
+
function peg$f16(expression) {
|
|
597
|
+
return annotate([markers.property, expression], location());
|
|
598
|
+
}
|
|
599
|
+
function peg$f17(condition, tail) {
|
|
600
|
+
if (!tail) {
|
|
601
|
+
return condition;
|
|
602
|
+
}
|
|
603
|
+
const deferred = makeDeferredArguments(tail);
|
|
604
|
+
return annotate([
|
|
605
|
+
ops.conditional,
|
|
606
|
+
condition,
|
|
607
|
+
deferred[0],
|
|
608
|
+
deferred[1]
|
|
609
|
+
], location());
|
|
610
|
+
}
|
|
611
|
+
function peg$f18(chars) {
|
|
485
612
|
return annotate([ops.literal, chars.join("")], location());
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
613
|
+
}
|
|
614
|
+
function peg$f19() {
|
|
615
|
+
console.warn("The use of the Unicode ellipsis character for an object spread is deprecated; use `...` (three periods) instead.");
|
|
616
|
+
}
|
|
617
|
+
function peg$f20(head, tail) {
|
|
618
|
+
return tail.reduce(makeBinaryOperation, head);
|
|
619
|
+
}
|
|
620
|
+
function peg$f21() { return "\0"; }
|
|
621
|
+
function peg$f22() { return "\b"; }
|
|
622
|
+
function peg$f23() { return "\f"; }
|
|
623
|
+
function peg$f24() { return "\n"; }
|
|
624
|
+
function peg$f25() { return "\r"; }
|
|
625
|
+
function peg$f26() { return "\t"; }
|
|
626
|
+
function peg$f27() { return "\v"; }
|
|
627
|
+
function peg$f28() {
|
|
628
|
+
error("Expected closing backtick");
|
|
629
|
+
}
|
|
630
|
+
function peg$f29() {
|
|
631
|
+
error(`An object ended without a closing brace, or contained something that wasn't expected.\nThe top level of an object can only contain definitions ("a: b" or "a = b") or spreads ("...a").`);
|
|
632
|
+
}
|
|
633
|
+
function peg$f30() {
|
|
634
|
+
error("Expected right bracket");
|
|
635
|
+
}
|
|
636
|
+
function peg$f31() {
|
|
637
|
+
error("Expected right parenthesis");
|
|
638
|
+
}
|
|
639
|
+
function peg$f32() {
|
|
640
|
+
error("Expected closing quote");
|
|
641
|
+
}
|
|
642
|
+
function peg$f33() {
|
|
643
|
+
error("Expected an expression");
|
|
644
|
+
}
|
|
645
|
+
function peg$f34() {
|
|
646
|
+
error("Expected \"---\"");
|
|
647
|
+
}
|
|
648
|
+
function peg$f35() {
|
|
649
|
+
error("Expected closing guillemet");
|
|
650
|
+
}
|
|
651
|
+
function peg$f36() {
|
|
652
|
+
error("Expected closing quote");
|
|
653
|
+
}
|
|
654
|
+
function peg$f37() {
|
|
655
|
+
error("Expected an expression");
|
|
656
|
+
}
|
|
657
|
+
function peg$f38() {
|
|
658
|
+
error("Expected an expression");
|
|
659
|
+
}
|
|
660
|
+
function peg$f39(left, right) {
|
|
661
|
+
return right ? annotate([ops.exponentiation, left, right], location()) : left;
|
|
662
|
+
}
|
|
663
|
+
function peg$f40() {
|
|
664
|
+
return annotate([ops.literal, parseFloat(text())], location());
|
|
665
|
+
}
|
|
666
|
+
function peg$f41() {
|
|
537
667
|
return isOrigamiFrontMatter(input.slice(location().end.offset))
|
|
538
|
-
}
|
|
539
|
-
|
|
668
|
+
}
|
|
669
|
+
function peg$f42(chars) {
|
|
540
670
|
return chars.join("");
|
|
541
|
-
}
|
|
542
|
-
|
|
671
|
+
}
|
|
672
|
+
function peg$f43(yaml) {
|
|
543
673
|
return makeYamlObject(yaml, location());
|
|
544
|
-
}
|
|
545
|
-
|
|
674
|
+
}
|
|
675
|
+
function peg$f44(expression) {
|
|
546
676
|
return annotate(expression, location());
|
|
547
|
-
}
|
|
548
|
-
|
|
677
|
+
}
|
|
678
|
+
function peg$f45(chars) {
|
|
549
679
|
return annotate([ops.literal, chars.join("")], location());
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
680
|
+
}
|
|
681
|
+
function peg$f46(name, port, slashFollows) {
|
|
682
|
+
const portText = port ? `:${port[1]}` : "";
|
|
683
|
+
const slashText = slashFollows ? "/" : "";
|
|
684
|
+
const host = name + portText + slashText;
|
|
685
|
+
return annotate([ops.literal, host], location());
|
|
686
|
+
}
|
|
687
|
+
function peg$f47() {
|
|
558
688
|
return text();
|
|
559
|
-
}
|
|
560
|
-
|
|
689
|
+
}
|
|
690
|
+
function peg$f48(id) {
|
|
561
691
|
return id;
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
692
|
+
}
|
|
693
|
+
function peg$f49(id) {
|
|
694
|
+
return annotate([ops.literal, id], location());
|
|
695
|
+
}
|
|
696
|
+
function peg$f50(char) { return char.match(/[$_\p{ID_Continue}]/u) }
|
|
697
|
+
function peg$f51(char) { return char.match(/[$_\p{ID_Start}]/u) }
|
|
698
|
+
function peg$f52(head, args) {
|
|
699
|
+
return args ? makeCall(head, args, location()) : head;
|
|
700
|
+
}
|
|
701
|
+
function peg$f53(values) {
|
|
702
|
+
return annotate(values, location());
|
|
703
|
+
}
|
|
704
|
+
function peg$f54() {
|
|
705
|
+
return annotate([ops.literal, parseInt(text())], location());
|
|
706
|
+
}
|
|
707
|
+
function peg$f55() {
|
|
578
708
|
return text();
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
709
|
+
}
|
|
710
|
+
function peg$f56(char) { return char.match(/[$_\p{ID_Continue}]/u) }
|
|
711
|
+
function peg$f57(values) {
|
|
712
|
+
return annotate(values, location());
|
|
713
|
+
}
|
|
714
|
+
function peg$f58(head, tail) {
|
|
715
|
+
return tail.length === 0
|
|
716
|
+
? head
|
|
717
|
+
: annotate(
|
|
718
|
+
[ops.logicalAnd, head, ...makeDeferredArguments(tail)],
|
|
719
|
+
location()
|
|
720
|
+
);
|
|
721
|
+
}
|
|
722
|
+
function peg$f59(head, tail) {
|
|
723
|
+
return tail.length === 0
|
|
724
|
+
? head
|
|
725
|
+
: annotate(
|
|
726
|
+
[ops.logicalOr, head, ...makeDeferredArguments(tail)],
|
|
727
|
+
location()
|
|
728
|
+
);
|
|
729
|
+
}
|
|
730
|
+
function peg$f60() { return null; }
|
|
731
|
+
function peg$f61(head, tail) {
|
|
732
|
+
return tail.reduce(makeBinaryOperation, head);
|
|
733
|
+
}
|
|
734
|
+
function peg$f62(head, tail) {
|
|
735
|
+
const args = tail?.[0] !== undefined ? tail : [];
|
|
736
|
+
return annotate([ops.construct, head, ...args], location());
|
|
737
|
+
}
|
|
738
|
+
function peg$f63(head, tail) {
|
|
739
|
+
const args = tail?.[0] !== undefined ? tail : [];
|
|
740
|
+
return annotate([ops.construct, head, ...args], location());
|
|
741
|
+
}
|
|
742
|
+
function peg$f64(head, tail) {
|
|
743
|
+
return tail.length === 0
|
|
744
|
+
? head
|
|
745
|
+
: annotate(
|
|
746
|
+
[ops.nullishCoalescing, head, ...makeDeferredArguments(tail)],
|
|
747
|
+
location()
|
|
748
|
+
);
|
|
749
|
+
}
|
|
750
|
+
function peg$f65(entries) {
|
|
751
|
+
return makeObject(entries ?? [], location());
|
|
752
|
+
}
|
|
753
|
+
function peg$f66(entries) {
|
|
754
|
+
return annotate(entries, location());
|
|
755
|
+
}
|
|
756
|
+
function peg$f67(key, pipeline) {
|
|
757
|
+
const getter = annotate([ops.getter, pipeline], location());
|
|
758
|
+
return annotate([key, getter], location());
|
|
759
|
+
}
|
|
760
|
+
function peg$f68(hiddenKey) { return hiddenKey.join(""); }
|
|
761
|
+
function peg$f69(key, pipeline) {
|
|
762
|
+
return annotate([key, pipeline], location());
|
|
763
|
+
}
|
|
764
|
+
function peg$f70(key) {
|
|
765
|
+
const reference = annotate([markers.reference, key], location());
|
|
766
|
+
const traverse = annotate([markers.traverse, reference], location());
|
|
767
|
+
return annotate([key, traverse], location());
|
|
768
|
+
}
|
|
769
|
+
function peg$f71(path) {
|
|
640
770
|
let lastKey = path.at(-1);
|
|
641
771
|
if (lastKey instanceof Array) {
|
|
642
772
|
lastKey = lastKey[1]; // get scope identifier or literal
|
|
643
773
|
}
|
|
644
774
|
return annotate([lastKey, path], location());
|
|
645
|
-
}
|
|
646
|
-
|
|
775
|
+
}
|
|
776
|
+
function peg$f72(key, slash) {
|
|
647
777
|
return text();
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
778
|
+
}
|
|
779
|
+
function peg$f73(string) {
|
|
780
|
+
// Remove `ops.literal` from the string code
|
|
781
|
+
return string[1];
|
|
782
|
+
}
|
|
783
|
+
function peg$f74(property) {
|
|
654
784
|
return annotate([ops.optionalTraverse, property], location());
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
785
|
+
}
|
|
786
|
+
function peg$f75(key) {
|
|
787
|
+
return annotate([ops.literal, key], location());
|
|
788
|
+
}
|
|
789
|
+
function peg$f76(list) {
|
|
790
|
+
return annotate(list, location());
|
|
791
|
+
}
|
|
792
|
+
function peg$f77(param) {
|
|
793
|
+
return annotate([param], location());
|
|
794
|
+
}
|
|
795
|
+
function peg$f78(list) {
|
|
796
|
+
return annotate(list ?? [undefined], location());
|
|
797
|
+
}
|
|
798
|
+
function peg$f79(keys) {
|
|
799
|
+
const args = keys ?? [];
|
|
800
|
+
return annotate([markers.traverse, ...args], location());
|
|
801
|
+
}
|
|
802
|
+
function peg$f80(keys) {
|
|
803
|
+
return makePath(keys);
|
|
804
|
+
}
|
|
805
|
+
function peg$f81(key) {
|
|
806
|
+
return annotate([ops.literal, text()], location());
|
|
807
|
+
}
|
|
808
|
+
function peg$f82() {
|
|
809
|
+
return annotate([ops.literal, text()], location());
|
|
810
|
+
}
|
|
811
|
+
function peg$f83(head, tail) {
|
|
812
|
+
return annotate(
|
|
813
|
+
tail.reduce((arg, fn) => makePipeline(arg, fn, location()), head),
|
|
814
|
+
location()
|
|
815
|
+
);
|
|
816
|
+
}
|
|
817
|
+
function peg$f84() { return options.mode === "program" }
|
|
818
|
+
function peg$f85(property) {
|
|
689
819
|
return annotate([markers.property, property], location());
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
820
|
+
}
|
|
821
|
+
function peg$f86(flags) {
|
|
822
|
+
return flags.join("");
|
|
823
|
+
}
|
|
824
|
+
function peg$f87(chars, flags) {
|
|
825
|
+
const regex = new RegExp(chars.join(""), flags);
|
|
826
|
+
return annotate([ops.literal, regex], location());
|
|
827
|
+
}
|
|
828
|
+
function peg$f88(head, tail) {
|
|
829
|
+
return tail.reduce(makeBinaryOperation, head);
|
|
830
|
+
}
|
|
831
|
+
function peg$f89() { return null; }
|
|
832
|
+
function peg$f90() { return options.mode === "shell" }
|
|
833
|
+
function peg$f91(head, tail) {
|
|
834
|
+
return tail.reduce(makeBinaryOperation, head);
|
|
835
|
+
}
|
|
836
|
+
function peg$f92(definition) {
|
|
837
|
+
if (options.mode === "program") {
|
|
838
|
+
console.warn("Warning: the shorthand function syntax is deprecated in Origami programs. Use arrow syntax instead.");
|
|
839
|
+
}
|
|
840
|
+
const lambdaParameters = annotate(
|
|
841
|
+
[annotate([ops.literal, "_"], location())],
|
|
842
|
+
location()
|
|
843
|
+
);
|
|
844
|
+
return annotate([ops.lambda, lambdaParameters, definition], location());
|
|
845
|
+
}
|
|
846
|
+
function peg$f93() { return null; }
|
|
847
|
+
function peg$f94(chars) {
|
|
718
848
|
return annotate([ops.literal, chars.join("")], location());
|
|
719
|
-
}
|
|
720
|
-
|
|
849
|
+
}
|
|
850
|
+
function peg$f95() {
|
|
721
851
|
return annotate([ops.literal, "/"], location());
|
|
722
|
-
}
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
return makeCall(scheme, keys, location());
|
|
779
|
-
};
|
|
780
|
-
var peg$f109 = function(chars) {
|
|
781
|
-
return annotate([ops.literal, text()], location());
|
|
782
|
-
};
|
|
783
|
-
var peg$f110 = function() {
|
|
852
|
+
}
|
|
853
|
+
function peg$f96() {
|
|
854
|
+
return annotate([ops.literal, "/"], location());
|
|
855
|
+
}
|
|
856
|
+
function peg$f97() {
|
|
857
|
+
return true;
|
|
858
|
+
}
|
|
859
|
+
function peg$f98(value) {
|
|
860
|
+
return annotate([ops.spread, value], location());
|
|
861
|
+
}
|
|
862
|
+
function peg$f99(head, tail) {
|
|
863
|
+
return makeTemplate(ops.templateIndent, head, tail, location());
|
|
864
|
+
}
|
|
865
|
+
function peg$f100(chars) {
|
|
866
|
+
return annotate([ops.literal, chars.join("")], location());
|
|
867
|
+
}
|
|
868
|
+
function peg$f101(front, body) {
|
|
869
|
+
return annotate(applyMacro(front, "_template", body), location());
|
|
870
|
+
}
|
|
871
|
+
function peg$f102(front, body) {
|
|
872
|
+
return makeDocument(front, body, location());
|
|
873
|
+
}
|
|
874
|
+
function peg$f103(body) {
|
|
875
|
+
if (options.front) {
|
|
876
|
+
return makeDocument(options.front, body, location());
|
|
877
|
+
}
|
|
878
|
+
const lambdaParameters = annotate(
|
|
879
|
+
[annotate([ops.literal, "_"], location())],
|
|
880
|
+
location()
|
|
881
|
+
);
|
|
882
|
+
return annotate([ops.lambda, lambdaParameters, body], location());
|
|
883
|
+
}
|
|
884
|
+
function peg$f104(head, tail) {
|
|
885
|
+
return makeTemplate(ops.templateText, head, tail, location());
|
|
886
|
+
}
|
|
887
|
+
function peg$f105(chars) {
|
|
888
|
+
return annotate([ops.literal, chars.join("")], location());
|
|
889
|
+
}
|
|
890
|
+
function peg$f106(expression) {
|
|
891
|
+
return annotate(expression, location());
|
|
892
|
+
}
|
|
893
|
+
function peg$f107(operator, expression) {
|
|
894
|
+
return makeUnaryOperation(operator, expression, location());
|
|
895
|
+
}
|
|
896
|
+
function peg$f108(scheme, host, path) {
|
|
897
|
+
const rest = path ? path[1] : [];
|
|
898
|
+
const keys = annotate([host, ...rest], location());
|
|
899
|
+
return makeCall(scheme, keys, location());
|
|
900
|
+
}
|
|
901
|
+
function peg$f109(scheme, keys) {
|
|
902
|
+
return makeCall(scheme, keys, location());
|
|
903
|
+
}
|
|
904
|
+
function peg$f110(chars) {
|
|
905
|
+
return annotate([ops.literal, text()], location());
|
|
906
|
+
}
|
|
907
|
+
function peg$f111() {
|
|
784
908
|
// A single slash is a path key
|
|
785
909
|
return annotate([ops.literal, ""], location());
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
910
|
+
}
|
|
911
|
+
function peg$f112(char) { return /\s/.test(char); }
|
|
912
|
+
function peg$f113(char) { return char; }
|
|
913
|
+
function peg$f114(keys) {
|
|
914
|
+
return annotate(keys, location());
|
|
915
|
+
}
|
|
916
|
+
function peg$f115() {
|
|
917
|
+
return annotate([markers.global, text()], location());
|
|
918
|
+
}
|
|
919
|
+
function peg$f116(char) { return /\s/.test(char); }
|
|
920
|
+
function peg$f117(char) { return char; }
|
|
921
|
+
let peg$currPos = options.peg$currPos | 0;
|
|
922
|
+
let peg$savedPos = peg$currPos;
|
|
923
|
+
const peg$posDetailsCache = [{ line: 1, column: 1 }];
|
|
924
|
+
let peg$maxFailPos = peg$currPos;
|
|
925
|
+
let peg$maxFailExpected = options.peg$maxFailExpected || [];
|
|
926
|
+
let peg$silentFails = options.peg$silentFails | 0;
|
|
803
927
|
|
|
804
|
-
|
|
928
|
+
let peg$result;
|
|
805
929
|
|
|
806
930
|
if (options.startRule) {
|
|
807
931
|
if (!(options.startRule in peg$startRuleFunctions)) {
|
|
@@ -823,7 +947,7 @@ function peg$parse(input, options) {
|
|
|
823
947
|
return {
|
|
824
948
|
source: peg$source,
|
|
825
949
|
start: peg$savedPos,
|
|
826
|
-
end: peg$currPos
|
|
950
|
+
end: peg$currPos,
|
|
827
951
|
};
|
|
828
952
|
}
|
|
829
953
|
|
|
@@ -851,12 +975,20 @@ function peg$parse(input, options) {
|
|
|
851
975
|
throw peg$buildSimpleError(message, location);
|
|
852
976
|
}
|
|
853
977
|
|
|
978
|
+
function peg$getUnicode(pos = peg$currPos) {
|
|
979
|
+
const cp = input.codePointAt(pos);
|
|
980
|
+
if (cp === undefined) {
|
|
981
|
+
return "";
|
|
982
|
+
}
|
|
983
|
+
return String.fromCodePoint(cp);
|
|
984
|
+
}
|
|
985
|
+
|
|
854
986
|
function peg$literalExpectation(text, ignoreCase) {
|
|
855
|
-
return { type: "literal", text
|
|
987
|
+
return { type: "literal", text, ignoreCase };
|
|
856
988
|
}
|
|
857
989
|
|
|
858
|
-
function peg$classExpectation(parts, inverted, ignoreCase) {
|
|
859
|
-
return { type: "class", parts
|
|
990
|
+
function peg$classExpectation(parts, inverted, ignoreCase, unicode) {
|
|
991
|
+
return { type: "class", parts, inverted, ignoreCase, unicode };
|
|
860
992
|
}
|
|
861
993
|
|
|
862
994
|
function peg$anyExpectation() {
|
|
@@ -868,12 +1000,12 @@ function peg$parse(input, options) {
|
|
|
868
1000
|
}
|
|
869
1001
|
|
|
870
1002
|
function peg$otherExpectation(description) {
|
|
871
|
-
return { type: "other", description
|
|
1003
|
+
return { type: "other", description };
|
|
872
1004
|
}
|
|
873
1005
|
|
|
874
1006
|
function peg$computePosDetails(pos) {
|
|
875
|
-
|
|
876
|
-
|
|
1007
|
+
let details = peg$posDetailsCache[pos];
|
|
1008
|
+
let p;
|
|
877
1009
|
|
|
878
1010
|
if (details) {
|
|
879
1011
|
return details;
|
|
@@ -888,7 +1020,7 @@ function peg$parse(input, options) {
|
|
|
888
1020
|
details = peg$posDetailsCache[p];
|
|
889
1021
|
details = {
|
|
890
1022
|
line: details.line,
|
|
891
|
-
column: details.column
|
|
1023
|
+
column: details.column,
|
|
892
1024
|
};
|
|
893
1025
|
|
|
894
1026
|
while (p < pos) {
|
|
@@ -909,21 +1041,21 @@ function peg$parse(input, options) {
|
|
|
909
1041
|
}
|
|
910
1042
|
|
|
911
1043
|
function peg$computeLocation(startPos, endPos, offset) {
|
|
912
|
-
|
|
913
|
-
|
|
1044
|
+
const startPosDetails = peg$computePosDetails(startPos);
|
|
1045
|
+
const endPosDetails = peg$computePosDetails(endPos);
|
|
914
1046
|
|
|
915
|
-
|
|
1047
|
+
const res = {
|
|
916
1048
|
source: peg$source,
|
|
917
1049
|
start: {
|
|
918
1050
|
offset: startPos,
|
|
919
1051
|
line: startPosDetails.line,
|
|
920
|
-
column: startPosDetails.column
|
|
1052
|
+
column: startPosDetails.column,
|
|
921
1053
|
},
|
|
922
1054
|
end: {
|
|
923
1055
|
offset: endPos,
|
|
924
1056
|
line: endPosDetails.line,
|
|
925
|
-
column: endPosDetails.column
|
|
926
|
-
}
|
|
1057
|
+
column: endPosDetails.column,
|
|
1058
|
+
},
|
|
927
1059
|
};
|
|
928
1060
|
if (offset && peg$source && (typeof peg$source.offset === "function")) {
|
|
929
1061
|
res.start = peg$source.offset(res.start);
|
|
@@ -957,7 +1089,7 @@ function peg$parse(input, options) {
|
|
|
957
1089
|
}
|
|
958
1090
|
|
|
959
1091
|
function peg$parse__() {
|
|
960
|
-
|
|
1092
|
+
let s0, s1, s2;
|
|
961
1093
|
|
|
962
1094
|
s0 = peg$currPos;
|
|
963
1095
|
s1 = [];
|
|
@@ -974,7 +1106,7 @@ function peg$parse(input, options) {
|
|
|
974
1106
|
}
|
|
975
1107
|
|
|
976
1108
|
function peg$parseadditiveExpression() {
|
|
977
|
-
|
|
1109
|
+
let s0, s1, s2, s3, s4, s5, s6, s7;
|
|
978
1110
|
|
|
979
1111
|
s0 = peg$currPos;
|
|
980
1112
|
s1 = peg$parsemultiplicativeExpression();
|
|
@@ -1046,7 +1178,7 @@ function peg$parse(input, options) {
|
|
|
1046
1178
|
}
|
|
1047
1179
|
|
|
1048
1180
|
function peg$parseadditiveOperator() {
|
|
1049
|
-
|
|
1181
|
+
let s0;
|
|
1050
1182
|
|
|
1051
1183
|
if (input.charCodeAt(peg$currPos) === 43) {
|
|
1052
1184
|
s0 = peg$c0;
|
|
@@ -1063,7 +1195,7 @@ function peg$parse(input, options) {
|
|
|
1063
1195
|
}
|
|
1064
1196
|
|
|
1065
1197
|
function peg$parseangleBracketLiteral() {
|
|
1066
|
-
|
|
1198
|
+
let s0, s1, s2, s3, s4, s5;
|
|
1067
1199
|
|
|
1068
1200
|
s0 = peg$currPos;
|
|
1069
1201
|
if (input.charCodeAt(peg$currPos) === 60) {
|
|
@@ -1174,7 +1306,7 @@ function peg$parse(input, options) {
|
|
|
1174
1306
|
}
|
|
1175
1307
|
|
|
1176
1308
|
function peg$parseangleBracketPath() {
|
|
1177
|
-
|
|
1309
|
+
let s0, s1, s2, s3;
|
|
1178
1310
|
|
|
1179
1311
|
s0 = peg$currPos;
|
|
1180
1312
|
s1 = [];
|
|
@@ -1217,7 +1349,7 @@ function peg$parse(input, options) {
|
|
|
1217
1349
|
}
|
|
1218
1350
|
|
|
1219
1351
|
function peg$parseangleBracketKey() {
|
|
1220
|
-
|
|
1352
|
+
let s0, s1, s2;
|
|
1221
1353
|
|
|
1222
1354
|
s0 = peg$currPos;
|
|
1223
1355
|
s1 = [];
|
|
@@ -1246,7 +1378,7 @@ function peg$parse(input, options) {
|
|
|
1246
1378
|
}
|
|
1247
1379
|
|
|
1248
1380
|
function peg$parseangleBracketPathChar() {
|
|
1249
|
-
|
|
1381
|
+
let s0;
|
|
1250
1382
|
|
|
1251
1383
|
s0 = input.charAt(peg$currPos);
|
|
1252
1384
|
if (peg$r0.test(s0)) {
|
|
@@ -1263,7 +1395,7 @@ function peg$parse(input, options) {
|
|
|
1263
1395
|
}
|
|
1264
1396
|
|
|
1265
1397
|
function peg$parsearguments() {
|
|
1266
|
-
|
|
1398
|
+
let s0, s1;
|
|
1267
1399
|
|
|
1268
1400
|
peg$silentFails++;
|
|
1269
1401
|
s0 = peg$parseparenthesesArguments();
|
|
@@ -1289,7 +1421,7 @@ function peg$parse(input, options) {
|
|
|
1289
1421
|
}
|
|
1290
1422
|
|
|
1291
1423
|
function peg$parsearrayLiteral() {
|
|
1292
|
-
|
|
1424
|
+
let s0, s1, s2, s3, s4, s5;
|
|
1293
1425
|
|
|
1294
1426
|
peg$silentFails++;
|
|
1295
1427
|
s0 = peg$currPos;
|
|
@@ -1329,7 +1461,7 @@ function peg$parse(input, options) {
|
|
|
1329
1461
|
}
|
|
1330
1462
|
|
|
1331
1463
|
function peg$parsearrayEntries() {
|
|
1332
|
-
|
|
1464
|
+
let s0, s1, s2, s3, s4;
|
|
1333
1465
|
|
|
1334
1466
|
s0 = peg$currPos;
|
|
1335
1467
|
s1 = peg$currPos;
|
|
@@ -1373,7 +1505,7 @@ function peg$parse(input, options) {
|
|
|
1373
1505
|
}
|
|
1374
1506
|
|
|
1375
1507
|
function peg$parsearrayEntry() {
|
|
1376
|
-
|
|
1508
|
+
let s0, s1, s2, s3;
|
|
1377
1509
|
|
|
1378
1510
|
s0 = peg$parsespreadElement();
|
|
1379
1511
|
if (s0 === peg$FAILED) {
|
|
@@ -1411,7 +1543,7 @@ function peg$parse(input, options) {
|
|
|
1411
1543
|
}
|
|
1412
1544
|
|
|
1413
1545
|
function peg$parsearrowFunction() {
|
|
1414
|
-
|
|
1546
|
+
let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;
|
|
1415
1547
|
|
|
1416
1548
|
s0 = peg$currPos;
|
|
1417
1549
|
if (input.charCodeAt(peg$currPos) === 40) {
|
|
@@ -1493,7 +1625,7 @@ function peg$parse(input, options) {
|
|
|
1493
1625
|
}
|
|
1494
1626
|
|
|
1495
1627
|
function peg$parsebitwiseAndExpression() {
|
|
1496
|
-
|
|
1628
|
+
let s0, s1, s2, s3, s4, s5, s6, s7;
|
|
1497
1629
|
|
|
1498
1630
|
s0 = peg$currPos;
|
|
1499
1631
|
s1 = peg$parseequalityExpression();
|
|
@@ -1565,7 +1697,7 @@ function peg$parse(input, options) {
|
|
|
1565
1697
|
}
|
|
1566
1698
|
|
|
1567
1699
|
function peg$parsebitwiseAndOperator() {
|
|
1568
|
-
|
|
1700
|
+
let s0, s1, s2, s3;
|
|
1569
1701
|
|
|
1570
1702
|
s0 = peg$currPos;
|
|
1571
1703
|
if (input.charCodeAt(peg$currPos) === 38) {
|
|
@@ -1607,7 +1739,7 @@ function peg$parse(input, options) {
|
|
|
1607
1739
|
}
|
|
1608
1740
|
|
|
1609
1741
|
function peg$parsebitwiseOrExpression() {
|
|
1610
|
-
|
|
1742
|
+
let s0, s1, s2, s3, s4, s5, s6, s7;
|
|
1611
1743
|
|
|
1612
1744
|
s0 = peg$currPos;
|
|
1613
1745
|
s1 = peg$parsebitwiseXorExpression();
|
|
@@ -1679,7 +1811,7 @@ function peg$parse(input, options) {
|
|
|
1679
1811
|
}
|
|
1680
1812
|
|
|
1681
1813
|
function peg$parsebitwiseOrOperator() {
|
|
1682
|
-
|
|
1814
|
+
let s0, s1, s2, s3;
|
|
1683
1815
|
|
|
1684
1816
|
s0 = peg$currPos;
|
|
1685
1817
|
if (input.charCodeAt(peg$currPos) === 124) {
|
|
@@ -1721,7 +1853,7 @@ function peg$parse(input, options) {
|
|
|
1721
1853
|
}
|
|
1722
1854
|
|
|
1723
1855
|
function peg$parsebitwiseXorExpression() {
|
|
1724
|
-
|
|
1856
|
+
let s0, s1, s2, s3, s4, s5, s6, s7;
|
|
1725
1857
|
|
|
1726
1858
|
s0 = peg$currPos;
|
|
1727
1859
|
s1 = peg$parsebitwiseAndExpression();
|
|
@@ -1793,7 +1925,7 @@ function peg$parse(input, options) {
|
|
|
1793
1925
|
}
|
|
1794
1926
|
|
|
1795
1927
|
function peg$parsebitwiseXorOperator() {
|
|
1796
|
-
|
|
1928
|
+
let s0;
|
|
1797
1929
|
|
|
1798
1930
|
if (input.charCodeAt(peg$currPos) === 94) {
|
|
1799
1931
|
s0 = peg$c12;
|
|
@@ -1807,7 +1939,7 @@ function peg$parse(input, options) {
|
|
|
1807
1939
|
}
|
|
1808
1940
|
|
|
1809
1941
|
function peg$parsecallExpression() {
|
|
1810
|
-
|
|
1942
|
+
let s0, s1, s2, s3;
|
|
1811
1943
|
|
|
1812
1944
|
peg$silentFails++;
|
|
1813
1945
|
s0 = peg$currPos;
|
|
@@ -1835,7 +1967,7 @@ function peg$parse(input, options) {
|
|
|
1835
1967
|
}
|
|
1836
1968
|
|
|
1837
1969
|
function peg$parsecommaExpression() {
|
|
1838
|
-
|
|
1970
|
+
let s0, s1, s2, s3, s4, s5, s6, s7;
|
|
1839
1971
|
|
|
1840
1972
|
s0 = peg$currPos;
|
|
1841
1973
|
s1 = peg$currPos;
|
|
@@ -1889,7 +2021,7 @@ function peg$parse(input, options) {
|
|
|
1889
2021
|
}
|
|
1890
2022
|
|
|
1891
2023
|
function peg$parsecomment() {
|
|
1892
|
-
|
|
2024
|
+
let s0, s1;
|
|
1893
2025
|
|
|
1894
2026
|
peg$silentFails++;
|
|
1895
2027
|
s0 = peg$parsemultiLineComment();
|
|
@@ -1906,7 +2038,7 @@ function peg$parse(input, options) {
|
|
|
1906
2038
|
}
|
|
1907
2039
|
|
|
1908
2040
|
function peg$parsecomputedPropertyAccess() {
|
|
1909
|
-
|
|
2041
|
+
let s0, s1, s2, s3, s4;
|
|
1910
2042
|
|
|
1911
2043
|
s0 = peg$currPos;
|
|
1912
2044
|
s1 = peg$parsecomputedPropertySpace();
|
|
@@ -1946,7 +2078,7 @@ function peg$parse(input, options) {
|
|
|
1946
2078
|
}
|
|
1947
2079
|
|
|
1948
2080
|
function peg$parsecomputedPropertySpace() {
|
|
1949
|
-
|
|
2081
|
+
let s0, s1, s2;
|
|
1950
2082
|
|
|
1951
2083
|
s0 = peg$parseshellMode();
|
|
1952
2084
|
if (s0 === peg$FAILED) {
|
|
@@ -1975,7 +2107,7 @@ function peg$parse(input, options) {
|
|
|
1975
2107
|
}
|
|
1976
2108
|
|
|
1977
2109
|
function peg$parseconditionalExpression() {
|
|
1978
|
-
|
|
2110
|
+
let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10;
|
|
1979
2111
|
|
|
1980
2112
|
s0 = peg$currPos;
|
|
1981
2113
|
s1 = peg$parselogicalOrExpression();
|
|
@@ -2036,7 +2168,7 @@ function peg$parse(input, options) {
|
|
|
2036
2168
|
}
|
|
2037
2169
|
|
|
2038
2170
|
function peg$parsedigits() {
|
|
2039
|
-
|
|
2171
|
+
let s0, s1, s2;
|
|
2040
2172
|
|
|
2041
2173
|
s0 = peg$currPos;
|
|
2042
2174
|
s1 = [];
|
|
@@ -2072,7 +2204,7 @@ function peg$parse(input, options) {
|
|
|
2072
2204
|
}
|
|
2073
2205
|
|
|
2074
2206
|
function peg$parsedoubleArrow() {
|
|
2075
|
-
|
|
2207
|
+
let s0;
|
|
2076
2208
|
|
|
2077
2209
|
if (input.charCodeAt(peg$currPos) === 8658) {
|
|
2078
2210
|
s0 = peg$c16;
|
|
@@ -2095,7 +2227,7 @@ function peg$parse(input, options) {
|
|
|
2095
2227
|
}
|
|
2096
2228
|
|
|
2097
2229
|
function peg$parsedoubleQuoteString() {
|
|
2098
|
-
|
|
2230
|
+
let s0, s1, s2, s3;
|
|
2099
2231
|
|
|
2100
2232
|
peg$silentFails++;
|
|
2101
2233
|
s0 = peg$currPos;
|
|
@@ -2135,7 +2267,7 @@ function peg$parse(input, options) {
|
|
|
2135
2267
|
}
|
|
2136
2268
|
|
|
2137
2269
|
function peg$parsedoubleQuoteStringChar() {
|
|
2138
|
-
|
|
2270
|
+
let s0, s1, s2;
|
|
2139
2271
|
|
|
2140
2272
|
s0 = peg$currPos;
|
|
2141
2273
|
s1 = peg$currPos;
|
|
@@ -2174,7 +2306,7 @@ function peg$parse(input, options) {
|
|
|
2174
2306
|
}
|
|
2175
2307
|
|
|
2176
2308
|
function peg$parseellipsis() {
|
|
2177
|
-
|
|
2309
|
+
let s0, s1;
|
|
2178
2310
|
|
|
2179
2311
|
if (input.substr(peg$currPos, 3) === peg$c19) {
|
|
2180
2312
|
s0 = peg$c19;
|
|
@@ -2184,20 +2316,26 @@ function peg$parse(input, options) {
|
|
|
2184
2316
|
if (peg$silentFails === 0) { peg$fail(peg$e26); }
|
|
2185
2317
|
}
|
|
2186
2318
|
if (s0 === peg$FAILED) {
|
|
2319
|
+
s0 = peg$currPos;
|
|
2187
2320
|
if (input.charCodeAt(peg$currPos) === 8230) {
|
|
2188
|
-
|
|
2321
|
+
s1 = peg$c20;
|
|
2189
2322
|
peg$currPos++;
|
|
2190
2323
|
} else {
|
|
2191
|
-
|
|
2324
|
+
s1 = peg$FAILED;
|
|
2192
2325
|
if (peg$silentFails === 0) { peg$fail(peg$e27); }
|
|
2193
2326
|
}
|
|
2327
|
+
if (s1 !== peg$FAILED) {
|
|
2328
|
+
peg$savedPos = s0;
|
|
2329
|
+
s1 = peg$f19();
|
|
2330
|
+
}
|
|
2331
|
+
s0 = s1;
|
|
2194
2332
|
}
|
|
2195
2333
|
|
|
2196
2334
|
return s0;
|
|
2197
2335
|
}
|
|
2198
2336
|
|
|
2199
2337
|
function peg$parseequalityExpression() {
|
|
2200
|
-
|
|
2338
|
+
let s0, s1, s2, s3, s4, s5, s6, s7;
|
|
2201
2339
|
|
|
2202
2340
|
s0 = peg$currPos;
|
|
2203
2341
|
s1 = peg$parserelationalExpression();
|
|
@@ -2239,7 +2377,7 @@ function peg$parse(input, options) {
|
|
|
2239
2377
|
}
|
|
2240
2378
|
}
|
|
2241
2379
|
peg$savedPos = s0;
|
|
2242
|
-
s0 = peg$
|
|
2380
|
+
s0 = peg$f20(s1, s2);
|
|
2243
2381
|
} else {
|
|
2244
2382
|
peg$currPos = s0;
|
|
2245
2383
|
s0 = peg$FAILED;
|
|
@@ -2249,7 +2387,7 @@ function peg$parse(input, options) {
|
|
|
2249
2387
|
}
|
|
2250
2388
|
|
|
2251
2389
|
function peg$parseequalityOperator() {
|
|
2252
|
-
|
|
2390
|
+
let s0;
|
|
2253
2391
|
|
|
2254
2392
|
if (input.substr(peg$currPos, 3) === peg$c21) {
|
|
2255
2393
|
s0 = peg$c21;
|
|
@@ -2290,7 +2428,7 @@ function peg$parse(input, options) {
|
|
|
2290
2428
|
}
|
|
2291
2429
|
|
|
2292
2430
|
function peg$parseescapedChar() {
|
|
2293
|
-
|
|
2431
|
+
let s0, s1, s2;
|
|
2294
2432
|
|
|
2295
2433
|
peg$silentFails++;
|
|
2296
2434
|
s0 = peg$currPos;
|
|
@@ -2303,7 +2441,7 @@ function peg$parse(input, options) {
|
|
|
2303
2441
|
}
|
|
2304
2442
|
if (s1 !== peg$FAILED) {
|
|
2305
2443
|
peg$savedPos = s0;
|
|
2306
|
-
s1 = peg$
|
|
2444
|
+
s1 = peg$f21();
|
|
2307
2445
|
}
|
|
2308
2446
|
s0 = s1;
|
|
2309
2447
|
if (s0 === peg$FAILED) {
|
|
@@ -2317,7 +2455,7 @@ function peg$parse(input, options) {
|
|
|
2317
2455
|
}
|
|
2318
2456
|
if (s1 !== peg$FAILED) {
|
|
2319
2457
|
peg$savedPos = s0;
|
|
2320
|
-
s1 = peg$
|
|
2458
|
+
s1 = peg$f22();
|
|
2321
2459
|
}
|
|
2322
2460
|
s0 = s1;
|
|
2323
2461
|
if (s0 === peg$FAILED) {
|
|
@@ -2331,7 +2469,7 @@ function peg$parse(input, options) {
|
|
|
2331
2469
|
}
|
|
2332
2470
|
if (s1 !== peg$FAILED) {
|
|
2333
2471
|
peg$savedPos = s0;
|
|
2334
|
-
s1 = peg$
|
|
2472
|
+
s1 = peg$f23();
|
|
2335
2473
|
}
|
|
2336
2474
|
s0 = s1;
|
|
2337
2475
|
if (s0 === peg$FAILED) {
|
|
@@ -2345,7 +2483,7 @@ function peg$parse(input, options) {
|
|
|
2345
2483
|
}
|
|
2346
2484
|
if (s1 !== peg$FAILED) {
|
|
2347
2485
|
peg$savedPos = s0;
|
|
2348
|
-
s1 = peg$
|
|
2486
|
+
s1 = peg$f24();
|
|
2349
2487
|
}
|
|
2350
2488
|
s0 = s1;
|
|
2351
2489
|
if (s0 === peg$FAILED) {
|
|
@@ -2359,7 +2497,7 @@ function peg$parse(input, options) {
|
|
|
2359
2497
|
}
|
|
2360
2498
|
if (s1 !== peg$FAILED) {
|
|
2361
2499
|
peg$savedPos = s0;
|
|
2362
|
-
s1 = peg$
|
|
2500
|
+
s1 = peg$f25();
|
|
2363
2501
|
}
|
|
2364
2502
|
s0 = s1;
|
|
2365
2503
|
if (s0 === peg$FAILED) {
|
|
@@ -2373,7 +2511,7 @@ function peg$parse(input, options) {
|
|
|
2373
2511
|
}
|
|
2374
2512
|
if (s1 !== peg$FAILED) {
|
|
2375
2513
|
peg$savedPos = s0;
|
|
2376
|
-
s1 = peg$
|
|
2514
|
+
s1 = peg$f26();
|
|
2377
2515
|
}
|
|
2378
2516
|
s0 = s1;
|
|
2379
2517
|
if (s0 === peg$FAILED) {
|
|
@@ -2387,7 +2525,7 @@ function peg$parse(input, options) {
|
|
|
2387
2525
|
}
|
|
2388
2526
|
if (s1 !== peg$FAILED) {
|
|
2389
2527
|
peg$savedPos = s0;
|
|
2390
|
-
s1 = peg$
|
|
2528
|
+
s1 = peg$f27();
|
|
2391
2529
|
}
|
|
2392
2530
|
s0 = s1;
|
|
2393
2531
|
if (s0 === peg$FAILED) {
|
|
@@ -2434,7 +2572,7 @@ function peg$parse(input, options) {
|
|
|
2434
2572
|
}
|
|
2435
2573
|
|
|
2436
2574
|
function peg$parseexpectBacktick() {
|
|
2437
|
-
|
|
2575
|
+
let s0, s1;
|
|
2438
2576
|
|
|
2439
2577
|
if (input.charCodeAt(peg$currPos) === 96) {
|
|
2440
2578
|
s0 = peg$c33;
|
|
@@ -2456,7 +2594,7 @@ function peg$parse(input, options) {
|
|
|
2456
2594
|
s1 = null;
|
|
2457
2595
|
}
|
|
2458
2596
|
peg$savedPos = s0;
|
|
2459
|
-
s1 = peg$
|
|
2597
|
+
s1 = peg$f28();
|
|
2460
2598
|
s0 = s1;
|
|
2461
2599
|
}
|
|
2462
2600
|
|
|
@@ -2464,7 +2602,7 @@ function peg$parse(input, options) {
|
|
|
2464
2602
|
}
|
|
2465
2603
|
|
|
2466
2604
|
function peg$parseexpectClosingBrace() {
|
|
2467
|
-
|
|
2605
|
+
let s0, s1;
|
|
2468
2606
|
|
|
2469
2607
|
if (input.charCodeAt(peg$currPos) === 125) {
|
|
2470
2608
|
s0 = peg$c34;
|
|
@@ -2486,7 +2624,7 @@ function peg$parse(input, options) {
|
|
|
2486
2624
|
s1 = null;
|
|
2487
2625
|
}
|
|
2488
2626
|
peg$savedPos = s0;
|
|
2489
|
-
s1 = peg$
|
|
2627
|
+
s1 = peg$f29();
|
|
2490
2628
|
s0 = s1;
|
|
2491
2629
|
}
|
|
2492
2630
|
|
|
@@ -2494,7 +2632,7 @@ function peg$parse(input, options) {
|
|
|
2494
2632
|
}
|
|
2495
2633
|
|
|
2496
2634
|
function peg$parseexpectClosingBracket() {
|
|
2497
|
-
|
|
2635
|
+
let s0, s1;
|
|
2498
2636
|
|
|
2499
2637
|
if (input.charCodeAt(peg$currPos) === 93) {
|
|
2500
2638
|
s0 = peg$c7;
|
|
@@ -2516,7 +2654,7 @@ function peg$parse(input, options) {
|
|
|
2516
2654
|
s1 = null;
|
|
2517
2655
|
}
|
|
2518
2656
|
peg$savedPos = s0;
|
|
2519
|
-
s1 = peg$
|
|
2657
|
+
s1 = peg$f30();
|
|
2520
2658
|
s0 = s1;
|
|
2521
2659
|
}
|
|
2522
2660
|
|
|
@@ -2524,7 +2662,7 @@ function peg$parse(input, options) {
|
|
|
2524
2662
|
}
|
|
2525
2663
|
|
|
2526
2664
|
function peg$parseexpectClosingParenthesis() {
|
|
2527
|
-
|
|
2665
|
+
let s0, s1;
|
|
2528
2666
|
|
|
2529
2667
|
if (input.charCodeAt(peg$currPos) === 41) {
|
|
2530
2668
|
s0 = peg$c9;
|
|
@@ -2546,7 +2684,7 @@ function peg$parse(input, options) {
|
|
|
2546
2684
|
s1 = null;
|
|
2547
2685
|
}
|
|
2548
2686
|
peg$savedPos = s0;
|
|
2549
|
-
s1 = peg$
|
|
2687
|
+
s1 = peg$f31();
|
|
2550
2688
|
s0 = s1;
|
|
2551
2689
|
}
|
|
2552
2690
|
|
|
@@ -2554,7 +2692,7 @@ function peg$parse(input, options) {
|
|
|
2554
2692
|
}
|
|
2555
2693
|
|
|
2556
2694
|
function peg$parseexpectDoubleQuote() {
|
|
2557
|
-
|
|
2695
|
+
let s0, s1;
|
|
2558
2696
|
|
|
2559
2697
|
if (input.charCodeAt(peg$currPos) === 34) {
|
|
2560
2698
|
s0 = peg$c18;
|
|
@@ -2576,7 +2714,7 @@ function peg$parse(input, options) {
|
|
|
2576
2714
|
s1 = null;
|
|
2577
2715
|
}
|
|
2578
2716
|
peg$savedPos = s0;
|
|
2579
|
-
s1 = peg$
|
|
2717
|
+
s1 = peg$f32();
|
|
2580
2718
|
s0 = s1;
|
|
2581
2719
|
}
|
|
2582
2720
|
|
|
@@ -2584,7 +2722,7 @@ function peg$parse(input, options) {
|
|
|
2584
2722
|
}
|
|
2585
2723
|
|
|
2586
2724
|
function peg$parseexpectExpression() {
|
|
2587
|
-
|
|
2725
|
+
let s0, s1;
|
|
2588
2726
|
|
|
2589
2727
|
s0 = peg$parseexpression();
|
|
2590
2728
|
if (s0 === peg$FAILED) {
|
|
@@ -2600,7 +2738,7 @@ function peg$parse(input, options) {
|
|
|
2600
2738
|
s1 = null;
|
|
2601
2739
|
}
|
|
2602
2740
|
peg$savedPos = s0;
|
|
2603
|
-
s1 = peg$
|
|
2741
|
+
s1 = peg$f33();
|
|
2604
2742
|
s0 = s1;
|
|
2605
2743
|
}
|
|
2606
2744
|
|
|
@@ -2608,7 +2746,7 @@ function peg$parse(input, options) {
|
|
|
2608
2746
|
}
|
|
2609
2747
|
|
|
2610
2748
|
function peg$parseexpectFrontDelimiter() {
|
|
2611
|
-
|
|
2749
|
+
let s0, s1;
|
|
2612
2750
|
|
|
2613
2751
|
s0 = peg$parsefrontDelimiter();
|
|
2614
2752
|
if (s0 === peg$FAILED) {
|
|
@@ -2624,7 +2762,7 @@ function peg$parse(input, options) {
|
|
|
2624
2762
|
s1 = null;
|
|
2625
2763
|
}
|
|
2626
2764
|
peg$savedPos = s0;
|
|
2627
|
-
s1 = peg$
|
|
2765
|
+
s1 = peg$f34();
|
|
2628
2766
|
s0 = s1;
|
|
2629
2767
|
}
|
|
2630
2768
|
|
|
@@ -2632,7 +2770,7 @@ function peg$parse(input, options) {
|
|
|
2632
2770
|
}
|
|
2633
2771
|
|
|
2634
2772
|
function peg$parseexpectGuillemet() {
|
|
2635
|
-
|
|
2773
|
+
let s0, s1;
|
|
2636
2774
|
|
|
2637
2775
|
if (input.charCodeAt(peg$currPos) === 187) {
|
|
2638
2776
|
s0 = peg$c35;
|
|
@@ -2654,7 +2792,7 @@ function peg$parse(input, options) {
|
|
|
2654
2792
|
s1 = null;
|
|
2655
2793
|
}
|
|
2656
2794
|
peg$savedPos = s0;
|
|
2657
|
-
s1 = peg$
|
|
2795
|
+
s1 = peg$f35();
|
|
2658
2796
|
s0 = s1;
|
|
2659
2797
|
}
|
|
2660
2798
|
|
|
@@ -2662,7 +2800,7 @@ function peg$parse(input, options) {
|
|
|
2662
2800
|
}
|
|
2663
2801
|
|
|
2664
2802
|
function peg$parseexpectSingleQuote() {
|
|
2665
|
-
|
|
2803
|
+
let s0, s1;
|
|
2666
2804
|
|
|
2667
2805
|
if (input.charCodeAt(peg$currPos) === 39) {
|
|
2668
2806
|
s0 = peg$c36;
|
|
@@ -2684,7 +2822,7 @@ function peg$parse(input, options) {
|
|
|
2684
2822
|
s1 = null;
|
|
2685
2823
|
}
|
|
2686
2824
|
peg$savedPos = s0;
|
|
2687
|
-
s1 = peg$
|
|
2825
|
+
s1 = peg$f36();
|
|
2688
2826
|
s0 = s1;
|
|
2689
2827
|
}
|
|
2690
2828
|
|
|
@@ -2692,7 +2830,7 @@ function peg$parse(input, options) {
|
|
|
2692
2830
|
}
|
|
2693
2831
|
|
|
2694
2832
|
function peg$parseexpectPipelineExpression() {
|
|
2695
|
-
|
|
2833
|
+
let s0, s1;
|
|
2696
2834
|
|
|
2697
2835
|
s0 = peg$parsepipelineExpression();
|
|
2698
2836
|
if (s0 === peg$FAILED) {
|
|
@@ -2708,7 +2846,7 @@ function peg$parse(input, options) {
|
|
|
2708
2846
|
s1 = null;
|
|
2709
2847
|
}
|
|
2710
2848
|
peg$savedPos = s0;
|
|
2711
|
-
s1 = peg$
|
|
2849
|
+
s1 = peg$f37();
|
|
2712
2850
|
s0 = s1;
|
|
2713
2851
|
}
|
|
2714
2852
|
|
|
@@ -2716,7 +2854,7 @@ function peg$parse(input, options) {
|
|
|
2716
2854
|
}
|
|
2717
2855
|
|
|
2718
2856
|
function peg$parseexpectUnaryExpression() {
|
|
2719
|
-
|
|
2857
|
+
let s0, s1;
|
|
2720
2858
|
|
|
2721
2859
|
s0 = peg$parseunaryExpression();
|
|
2722
2860
|
if (s0 === peg$FAILED) {
|
|
@@ -2732,7 +2870,7 @@ function peg$parse(input, options) {
|
|
|
2732
2870
|
s1 = null;
|
|
2733
2871
|
}
|
|
2734
2872
|
peg$savedPos = s0;
|
|
2735
|
-
s1 = peg$
|
|
2873
|
+
s1 = peg$f38();
|
|
2736
2874
|
s0 = s1;
|
|
2737
2875
|
}
|
|
2738
2876
|
|
|
@@ -2740,7 +2878,7 @@ function peg$parse(input, options) {
|
|
|
2740
2878
|
}
|
|
2741
2879
|
|
|
2742
2880
|
function peg$parseexponentiationExpression() {
|
|
2743
|
-
|
|
2881
|
+
let s0, s1, s2, s3, s4, s5, s6;
|
|
2744
2882
|
|
|
2745
2883
|
s0 = peg$currPos;
|
|
2746
2884
|
s1 = peg$parseunaryExpression();
|
|
@@ -2781,7 +2919,7 @@ function peg$parse(input, options) {
|
|
|
2781
2919
|
s2 = null;
|
|
2782
2920
|
}
|
|
2783
2921
|
peg$savedPos = s0;
|
|
2784
|
-
s0 = peg$
|
|
2922
|
+
s0 = peg$f39(s1, s2);
|
|
2785
2923
|
} else {
|
|
2786
2924
|
peg$currPos = s0;
|
|
2787
2925
|
s0 = peg$FAILED;
|
|
@@ -2791,7 +2929,7 @@ function peg$parse(input, options) {
|
|
|
2791
2929
|
}
|
|
2792
2930
|
|
|
2793
2931
|
function peg$parseexpression() {
|
|
2794
|
-
|
|
2932
|
+
let s0, s1, s2, s3;
|
|
2795
2933
|
|
|
2796
2934
|
s0 = peg$currPos;
|
|
2797
2935
|
s1 = peg$parse__();
|
|
@@ -2808,7 +2946,7 @@ function peg$parse(input, options) {
|
|
|
2808
2946
|
}
|
|
2809
2947
|
|
|
2810
2948
|
function peg$parsefloatLiteral() {
|
|
2811
|
-
|
|
2949
|
+
let s0, s1, s2, s3;
|
|
2812
2950
|
|
|
2813
2951
|
peg$silentFails++;
|
|
2814
2952
|
s0 = peg$currPos;
|
|
@@ -2827,7 +2965,7 @@ function peg$parse(input, options) {
|
|
|
2827
2965
|
s3 = peg$parsedigits();
|
|
2828
2966
|
if (s3 !== peg$FAILED) {
|
|
2829
2967
|
peg$savedPos = s0;
|
|
2830
|
-
s0 = peg$
|
|
2968
|
+
s0 = peg$f40();
|
|
2831
2969
|
} else {
|
|
2832
2970
|
peg$currPos = s0;
|
|
2833
2971
|
s0 = peg$FAILED;
|
|
@@ -2846,7 +2984,7 @@ function peg$parse(input, options) {
|
|
|
2846
2984
|
}
|
|
2847
2985
|
|
|
2848
2986
|
function peg$parsefrontDelimiter() {
|
|
2849
|
-
|
|
2987
|
+
let s0;
|
|
2850
2988
|
|
|
2851
2989
|
if (input.substr(peg$currPos, 4) === peg$c39) {
|
|
2852
2990
|
s0 = peg$c39;
|
|
@@ -2860,13 +2998,13 @@ function peg$parse(input, options) {
|
|
|
2860
2998
|
}
|
|
2861
2999
|
|
|
2862
3000
|
function peg$parsefrontMatterExpression() {
|
|
2863
|
-
|
|
3001
|
+
let s0, s1, s2, s3, s4;
|
|
2864
3002
|
|
|
2865
3003
|
s0 = peg$currPos;
|
|
2866
3004
|
s1 = peg$parsefrontDelimiter();
|
|
2867
3005
|
if (s1 !== peg$FAILED) {
|
|
2868
3006
|
peg$savedPos = peg$currPos;
|
|
2869
|
-
s2 = peg$
|
|
3007
|
+
s2 = peg$f41();
|
|
2870
3008
|
if (s2) {
|
|
2871
3009
|
s2 = undefined;
|
|
2872
3010
|
} else {
|
|
@@ -2899,7 +3037,7 @@ function peg$parse(input, options) {
|
|
|
2899
3037
|
}
|
|
2900
3038
|
|
|
2901
3039
|
function peg$parsefrontMatterText() {
|
|
2902
|
-
|
|
3040
|
+
let s0, s1, s2, s3, s4;
|
|
2903
3041
|
|
|
2904
3042
|
s0 = peg$currPos;
|
|
2905
3043
|
s1 = [];
|
|
@@ -2965,14 +3103,14 @@ function peg$parse(input, options) {
|
|
|
2965
3103
|
}
|
|
2966
3104
|
}
|
|
2967
3105
|
peg$savedPos = s0;
|
|
2968
|
-
s1 = peg$
|
|
3106
|
+
s1 = peg$f42(s1);
|
|
2969
3107
|
s0 = s1;
|
|
2970
3108
|
|
|
2971
3109
|
return s0;
|
|
2972
3110
|
}
|
|
2973
3111
|
|
|
2974
3112
|
function peg$parsefrontMatterYaml() {
|
|
2975
|
-
|
|
3113
|
+
let s0, s1, s2, s3;
|
|
2976
3114
|
|
|
2977
3115
|
peg$silentFails++;
|
|
2978
3116
|
s0 = peg$currPos;
|
|
@@ -2982,7 +3120,7 @@ function peg$parse(input, options) {
|
|
|
2982
3120
|
s3 = peg$parsefrontDelimiter();
|
|
2983
3121
|
if (s3 !== peg$FAILED) {
|
|
2984
3122
|
peg$savedPos = s0;
|
|
2985
|
-
s0 = peg$
|
|
3123
|
+
s0 = peg$f43(s2);
|
|
2986
3124
|
} else {
|
|
2987
3125
|
peg$currPos = s0;
|
|
2988
3126
|
s0 = peg$FAILED;
|
|
@@ -3001,7 +3139,7 @@ function peg$parse(input, options) {
|
|
|
3001
3139
|
}
|
|
3002
3140
|
|
|
3003
3141
|
function peg$parsegroup() {
|
|
3004
|
-
|
|
3142
|
+
let s0, s1, s2, s3;
|
|
3005
3143
|
|
|
3006
3144
|
peg$silentFails++;
|
|
3007
3145
|
s0 = peg$currPos;
|
|
@@ -3018,7 +3156,7 @@ function peg$parse(input, options) {
|
|
|
3018
3156
|
s3 = peg$parseexpectClosingParenthesis();
|
|
3019
3157
|
if (s3 !== peg$FAILED) {
|
|
3020
3158
|
peg$savedPos = s0;
|
|
3021
|
-
s0 = peg$
|
|
3159
|
+
s0 = peg$f44(s2);
|
|
3022
3160
|
} else {
|
|
3023
3161
|
peg$currPos = s0;
|
|
3024
3162
|
s0 = peg$FAILED;
|
|
@@ -3041,7 +3179,7 @@ function peg$parse(input, options) {
|
|
|
3041
3179
|
}
|
|
3042
3180
|
|
|
3043
3181
|
function peg$parseguillemetString() {
|
|
3044
|
-
|
|
3182
|
+
let s0, s1, s2, s3;
|
|
3045
3183
|
|
|
3046
3184
|
peg$silentFails++;
|
|
3047
3185
|
s0 = peg$currPos;
|
|
@@ -3062,7 +3200,7 @@ function peg$parse(input, options) {
|
|
|
3062
3200
|
s3 = peg$parseexpectGuillemet();
|
|
3063
3201
|
if (s3 !== peg$FAILED) {
|
|
3064
3202
|
peg$savedPos = s0;
|
|
3065
|
-
s0 = peg$
|
|
3203
|
+
s0 = peg$f45(s2);
|
|
3066
3204
|
} else {
|
|
3067
3205
|
peg$currPos = s0;
|
|
3068
3206
|
s0 = peg$FAILED;
|
|
@@ -3081,7 +3219,7 @@ function peg$parse(input, options) {
|
|
|
3081
3219
|
}
|
|
3082
3220
|
|
|
3083
3221
|
function peg$parseguillemetStringChar() {
|
|
3084
|
-
|
|
3222
|
+
let s0, s1, s2;
|
|
3085
3223
|
|
|
3086
3224
|
s0 = peg$currPos;
|
|
3087
3225
|
s1 = peg$currPos;
|
|
@@ -3120,7 +3258,7 @@ function peg$parse(input, options) {
|
|
|
3120
3258
|
}
|
|
3121
3259
|
|
|
3122
3260
|
function peg$parsehost() {
|
|
3123
|
-
|
|
3261
|
+
let s0, s1, s2, s3, s4;
|
|
3124
3262
|
|
|
3125
3263
|
peg$silentFails++;
|
|
3126
3264
|
s0 = peg$currPos;
|
|
@@ -3154,7 +3292,7 @@ function peg$parse(input, options) {
|
|
|
3154
3292
|
s3 = null;
|
|
3155
3293
|
}
|
|
3156
3294
|
peg$savedPos = s0;
|
|
3157
|
-
s0 = peg$
|
|
3295
|
+
s0 = peg$f46(s1, s2, s3);
|
|
3158
3296
|
} else {
|
|
3159
3297
|
peg$currPos = s0;
|
|
3160
3298
|
s0 = peg$FAILED;
|
|
@@ -3169,13 +3307,13 @@ function peg$parse(input, options) {
|
|
|
3169
3307
|
}
|
|
3170
3308
|
|
|
3171
3309
|
function peg$parsehostname() {
|
|
3172
|
-
|
|
3310
|
+
let s0, s1;
|
|
3173
3311
|
|
|
3174
3312
|
s0 = peg$currPos;
|
|
3175
3313
|
s1 = peg$parsekey();
|
|
3176
3314
|
if (s1 !== peg$FAILED) {
|
|
3177
3315
|
peg$savedPos = s0;
|
|
3178
|
-
s1 = peg$
|
|
3316
|
+
s1 = peg$f47();
|
|
3179
3317
|
}
|
|
3180
3318
|
s0 = s1;
|
|
3181
3319
|
|
|
@@ -3183,7 +3321,7 @@ function peg$parse(input, options) {
|
|
|
3183
3321
|
}
|
|
3184
3322
|
|
|
3185
3323
|
function peg$parseidentifier() {
|
|
3186
|
-
|
|
3324
|
+
let s0, s1, s2, s3, s4, s5;
|
|
3187
3325
|
|
|
3188
3326
|
s0 = peg$currPos;
|
|
3189
3327
|
s1 = peg$currPos;
|
|
@@ -3209,7 +3347,7 @@ function peg$parse(input, options) {
|
|
|
3209
3347
|
}
|
|
3210
3348
|
if (s1 !== peg$FAILED) {
|
|
3211
3349
|
peg$savedPos = s0;
|
|
3212
|
-
s1 = peg$
|
|
3350
|
+
s1 = peg$f48(s1);
|
|
3213
3351
|
}
|
|
3214
3352
|
s0 = s1;
|
|
3215
3353
|
|
|
@@ -3217,13 +3355,13 @@ function peg$parse(input, options) {
|
|
|
3217
3355
|
}
|
|
3218
3356
|
|
|
3219
3357
|
function peg$parseidentifierLiteral() {
|
|
3220
|
-
|
|
3358
|
+
let s0, s1;
|
|
3221
3359
|
|
|
3222
3360
|
s0 = peg$currPos;
|
|
3223
3361
|
s1 = peg$parseidentifier();
|
|
3224
3362
|
if (s1 !== peg$FAILED) {
|
|
3225
3363
|
peg$savedPos = s0;
|
|
3226
|
-
s1 = peg$
|
|
3364
|
+
s1 = peg$f49(s1);
|
|
3227
3365
|
}
|
|
3228
3366
|
s0 = s1;
|
|
3229
3367
|
|
|
@@ -3231,7 +3369,7 @@ function peg$parse(input, options) {
|
|
|
3231
3369
|
}
|
|
3232
3370
|
|
|
3233
3371
|
function peg$parseidentifierPart() {
|
|
3234
|
-
|
|
3372
|
+
let s0, s1, s2;
|
|
3235
3373
|
|
|
3236
3374
|
peg$silentFails++;
|
|
3237
3375
|
s0 = peg$currPos;
|
|
@@ -3244,7 +3382,7 @@ function peg$parse(input, options) {
|
|
|
3244
3382
|
}
|
|
3245
3383
|
if (s1 !== peg$FAILED) {
|
|
3246
3384
|
peg$savedPos = peg$currPos;
|
|
3247
|
-
s2 = peg$
|
|
3385
|
+
s2 = peg$f50(s1);
|
|
3248
3386
|
if (s2) {
|
|
3249
3387
|
s2 = undefined;
|
|
3250
3388
|
} else {
|
|
@@ -3271,7 +3409,7 @@ function peg$parse(input, options) {
|
|
|
3271
3409
|
}
|
|
3272
3410
|
|
|
3273
3411
|
function peg$parseidentifierStart() {
|
|
3274
|
-
|
|
3412
|
+
let s0, s1, s2;
|
|
3275
3413
|
|
|
3276
3414
|
peg$silentFails++;
|
|
3277
3415
|
s0 = peg$currPos;
|
|
@@ -3284,7 +3422,7 @@ function peg$parse(input, options) {
|
|
|
3284
3422
|
}
|
|
3285
3423
|
if (s1 !== peg$FAILED) {
|
|
3286
3424
|
peg$savedPos = peg$currPos;
|
|
3287
|
-
s2 = peg$
|
|
3425
|
+
s2 = peg$f51(s1);
|
|
3288
3426
|
if (s2) {
|
|
3289
3427
|
s2 = undefined;
|
|
3290
3428
|
} else {
|
|
@@ -3311,7 +3449,7 @@ function peg$parse(input, options) {
|
|
|
3311
3449
|
}
|
|
3312
3450
|
|
|
3313
3451
|
function peg$parseimplicitParenthesesCallExpression() {
|
|
3314
|
-
|
|
3452
|
+
let s0, s1, s2, s3, s4;
|
|
3315
3453
|
|
|
3316
3454
|
peg$silentFails++;
|
|
3317
3455
|
s0 = peg$currPos;
|
|
@@ -3344,7 +3482,7 @@ function peg$parse(input, options) {
|
|
|
3344
3482
|
s2 = null;
|
|
3345
3483
|
}
|
|
3346
3484
|
peg$savedPos = s0;
|
|
3347
|
-
s0 = peg$
|
|
3485
|
+
s0 = peg$f52(s1, s2);
|
|
3348
3486
|
} else {
|
|
3349
3487
|
peg$currPos = s0;
|
|
3350
3488
|
s0 = peg$FAILED;
|
|
@@ -3359,7 +3497,7 @@ function peg$parse(input, options) {
|
|
|
3359
3497
|
}
|
|
3360
3498
|
|
|
3361
3499
|
function peg$parseimplicitParensthesesArguments() {
|
|
3362
|
-
|
|
3500
|
+
let s0, s1, s2, s3, s4, s5;
|
|
3363
3501
|
|
|
3364
3502
|
s0 = peg$currPos;
|
|
3365
3503
|
s1 = peg$parseshellMode();
|
|
@@ -3395,7 +3533,7 @@ function peg$parse(input, options) {
|
|
|
3395
3533
|
s3 = null;
|
|
3396
3534
|
}
|
|
3397
3535
|
peg$savedPos = s0;
|
|
3398
|
-
s0 = peg$
|
|
3536
|
+
s0 = peg$f53(s2);
|
|
3399
3537
|
} else {
|
|
3400
3538
|
peg$currPos = s0;
|
|
3401
3539
|
s0 = peg$FAILED;
|
|
@@ -3409,7 +3547,7 @@ function peg$parse(input, options) {
|
|
|
3409
3547
|
}
|
|
3410
3548
|
|
|
3411
3549
|
function peg$parseinlineSpace() {
|
|
3412
|
-
|
|
3550
|
+
let s0;
|
|
3413
3551
|
|
|
3414
3552
|
s0 = input.charAt(peg$currPos);
|
|
3415
3553
|
if (peg$r2.test(s0)) {
|
|
@@ -3423,14 +3561,14 @@ function peg$parse(input, options) {
|
|
|
3423
3561
|
}
|
|
3424
3562
|
|
|
3425
3563
|
function peg$parseintegerLiteral() {
|
|
3426
|
-
|
|
3564
|
+
let s0, s1;
|
|
3427
3565
|
|
|
3428
3566
|
peg$silentFails++;
|
|
3429
3567
|
s0 = peg$currPos;
|
|
3430
3568
|
s1 = peg$parsedigits();
|
|
3431
3569
|
if (s1 !== peg$FAILED) {
|
|
3432
3570
|
peg$savedPos = s0;
|
|
3433
|
-
s1 = peg$
|
|
3571
|
+
s1 = peg$f54();
|
|
3434
3572
|
}
|
|
3435
3573
|
s0 = s1;
|
|
3436
3574
|
peg$silentFails--;
|
|
@@ -3443,7 +3581,7 @@ function peg$parse(input, options) {
|
|
|
3443
3581
|
}
|
|
3444
3582
|
|
|
3445
3583
|
function peg$parsekey() {
|
|
3446
|
-
|
|
3584
|
+
let s0, s1, s2, s3;
|
|
3447
3585
|
|
|
3448
3586
|
s0 = peg$currPos;
|
|
3449
3587
|
s1 = peg$parsekeyCharStart();
|
|
@@ -3455,7 +3593,7 @@ function peg$parse(input, options) {
|
|
|
3455
3593
|
s3 = peg$parsekeyChar();
|
|
3456
3594
|
}
|
|
3457
3595
|
peg$savedPos = s0;
|
|
3458
|
-
s0 = peg$
|
|
3596
|
+
s0 = peg$f55();
|
|
3459
3597
|
} else {
|
|
3460
3598
|
peg$currPos = s0;
|
|
3461
3599
|
s0 = peg$FAILED;
|
|
@@ -3465,7 +3603,7 @@ function peg$parse(input, options) {
|
|
|
3465
3603
|
}
|
|
3466
3604
|
|
|
3467
3605
|
function peg$parsekeyChar() {
|
|
3468
|
-
|
|
3606
|
+
let s0;
|
|
3469
3607
|
|
|
3470
3608
|
s0 = peg$parsekeyCharStart();
|
|
3471
3609
|
if (s0 === peg$FAILED) {
|
|
@@ -3494,7 +3632,7 @@ function peg$parse(input, options) {
|
|
|
3494
3632
|
}
|
|
3495
3633
|
|
|
3496
3634
|
function peg$parsekeyCharStart() {
|
|
3497
|
-
|
|
3635
|
+
let s0, s1, s2;
|
|
3498
3636
|
|
|
3499
3637
|
s0 = peg$currPos;
|
|
3500
3638
|
if (input.length > peg$currPos) {
|
|
@@ -3506,7 +3644,7 @@ function peg$parse(input, options) {
|
|
|
3506
3644
|
}
|
|
3507
3645
|
if (s1 !== peg$FAILED) {
|
|
3508
3646
|
peg$savedPos = peg$currPos;
|
|
3509
|
-
s2 = peg$
|
|
3647
|
+
s2 = peg$f56(s1);
|
|
3510
3648
|
if (s2) {
|
|
3511
3649
|
s2 = undefined;
|
|
3512
3650
|
} else {
|
|
@@ -3537,7 +3675,7 @@ function peg$parse(input, options) {
|
|
|
3537
3675
|
}
|
|
3538
3676
|
|
|
3539
3677
|
function peg$parselist() {
|
|
3540
|
-
|
|
3678
|
+
let s0, s1, s2, s3, s4;
|
|
3541
3679
|
|
|
3542
3680
|
peg$silentFails++;
|
|
3543
3681
|
s0 = peg$currPos;
|
|
@@ -3572,7 +3710,7 @@ function peg$parse(input, options) {
|
|
|
3572
3710
|
s2 = null;
|
|
3573
3711
|
}
|
|
3574
3712
|
peg$savedPos = s0;
|
|
3575
|
-
s0 = peg$
|
|
3713
|
+
s0 = peg$f57(s1);
|
|
3576
3714
|
} else {
|
|
3577
3715
|
peg$currPos = s0;
|
|
3578
3716
|
s0 = peg$FAILED;
|
|
@@ -3587,7 +3725,7 @@ function peg$parse(input, options) {
|
|
|
3587
3725
|
}
|
|
3588
3726
|
|
|
3589
3727
|
function peg$parselogicalAndExpression() {
|
|
3590
|
-
|
|
3728
|
+
let s0, s1, s2, s3, s4, s5, s6, s7;
|
|
3591
3729
|
|
|
3592
3730
|
s0 = peg$currPos;
|
|
3593
3731
|
s1 = peg$parsebitwiseOrExpression();
|
|
@@ -3641,7 +3779,7 @@ function peg$parse(input, options) {
|
|
|
3641
3779
|
}
|
|
3642
3780
|
}
|
|
3643
3781
|
peg$savedPos = s0;
|
|
3644
|
-
s0 = peg$
|
|
3782
|
+
s0 = peg$f58(s1, s2);
|
|
3645
3783
|
} else {
|
|
3646
3784
|
peg$currPos = s0;
|
|
3647
3785
|
s0 = peg$FAILED;
|
|
@@ -3651,7 +3789,7 @@ function peg$parse(input, options) {
|
|
|
3651
3789
|
}
|
|
3652
3790
|
|
|
3653
3791
|
function peg$parselogicalOrExpression() {
|
|
3654
|
-
|
|
3792
|
+
let s0, s1, s2, s3, s4, s5, s6, s7;
|
|
3655
3793
|
|
|
3656
3794
|
s0 = peg$currPos;
|
|
3657
3795
|
s1 = peg$parsenullishCoalescingExpression();
|
|
@@ -3705,7 +3843,7 @@ function peg$parse(input, options) {
|
|
|
3705
3843
|
}
|
|
3706
3844
|
}
|
|
3707
3845
|
peg$savedPos = s0;
|
|
3708
|
-
s0 = peg$
|
|
3846
|
+
s0 = peg$f59(s1, s2);
|
|
3709
3847
|
} else {
|
|
3710
3848
|
peg$currPos = s0;
|
|
3711
3849
|
s0 = peg$FAILED;
|
|
@@ -3715,7 +3853,7 @@ function peg$parse(input, options) {
|
|
|
3715
3853
|
}
|
|
3716
3854
|
|
|
3717
3855
|
function peg$parseminus() {
|
|
3718
|
-
|
|
3856
|
+
let s0, s1, s2, s3, s4;
|
|
3719
3857
|
|
|
3720
3858
|
s0 = peg$currPos;
|
|
3721
3859
|
if (input.charCodeAt(peg$currPos) === 45) {
|
|
@@ -3778,7 +3916,7 @@ function peg$parse(input, options) {
|
|
|
3778
3916
|
}
|
|
3779
3917
|
|
|
3780
3918
|
function peg$parsemultiLineComment() {
|
|
3781
|
-
|
|
3919
|
+
let s0, s1, s2, s3, s4, s5;
|
|
3782
3920
|
|
|
3783
3921
|
s0 = peg$currPos;
|
|
3784
3922
|
if (input.substr(peg$currPos, 2) === peg$c45) {
|
|
@@ -3874,7 +4012,7 @@ function peg$parse(input, options) {
|
|
|
3874
4012
|
}
|
|
3875
4013
|
if (s3 !== peg$FAILED) {
|
|
3876
4014
|
peg$savedPos = s0;
|
|
3877
|
-
s0 = peg$
|
|
4015
|
+
s0 = peg$f60();
|
|
3878
4016
|
} else {
|
|
3879
4017
|
peg$currPos = s0;
|
|
3880
4018
|
s0 = peg$FAILED;
|
|
@@ -3888,7 +4026,7 @@ function peg$parse(input, options) {
|
|
|
3888
4026
|
}
|
|
3889
4027
|
|
|
3890
4028
|
function peg$parsemultiplicativeExpression() {
|
|
3891
|
-
|
|
4029
|
+
let s0, s1, s2, s3, s4, s5, s6, s7;
|
|
3892
4030
|
|
|
3893
4031
|
s0 = peg$currPos;
|
|
3894
4032
|
s1 = peg$parseexponentiationExpression();
|
|
@@ -3950,7 +4088,7 @@ function peg$parse(input, options) {
|
|
|
3950
4088
|
}
|
|
3951
4089
|
}
|
|
3952
4090
|
peg$savedPos = s0;
|
|
3953
|
-
s0 = peg$
|
|
4091
|
+
s0 = peg$f61(s1, s2);
|
|
3954
4092
|
} else {
|
|
3955
4093
|
peg$currPos = s0;
|
|
3956
4094
|
s0 = peg$FAILED;
|
|
@@ -3960,7 +4098,7 @@ function peg$parse(input, options) {
|
|
|
3960
4098
|
}
|
|
3961
4099
|
|
|
3962
4100
|
function peg$parsemultiplicativeOperator() {
|
|
3963
|
-
|
|
4101
|
+
let s0;
|
|
3964
4102
|
|
|
3965
4103
|
s0 = input.charAt(peg$currPos);
|
|
3966
4104
|
if (peg$r6.test(s0)) {
|
|
@@ -3974,7 +4112,7 @@ function peg$parse(input, options) {
|
|
|
3974
4112
|
}
|
|
3975
4113
|
|
|
3976
4114
|
function peg$parsenewExpression() {
|
|
3977
|
-
|
|
4115
|
+
let s0, s1, s2, s3, s4;
|
|
3978
4116
|
|
|
3979
4117
|
s0 = peg$currPos;
|
|
3980
4118
|
if (input.substr(peg$currPos, 3) === peg$c47) {
|
|
@@ -3993,7 +4131,7 @@ function peg$parse(input, options) {
|
|
|
3993
4131
|
s4 = null;
|
|
3994
4132
|
}
|
|
3995
4133
|
peg$savedPos = s0;
|
|
3996
|
-
s0 = peg$
|
|
4134
|
+
s0 = peg$f62(s3, s4);
|
|
3997
4135
|
} else {
|
|
3998
4136
|
peg$currPos = s0;
|
|
3999
4137
|
s0 = peg$FAILED;
|
|
@@ -4017,7 +4155,7 @@ function peg$parse(input, options) {
|
|
|
4017
4155
|
s3 = peg$parseparenthesesArguments();
|
|
4018
4156
|
if (s3 !== peg$FAILED) {
|
|
4019
4157
|
peg$savedPos = s0;
|
|
4020
|
-
s0 = peg$
|
|
4158
|
+
s0 = peg$f63(s2, s3);
|
|
4021
4159
|
} else {
|
|
4022
4160
|
peg$currPos = s0;
|
|
4023
4161
|
s0 = peg$FAILED;
|
|
@@ -4036,7 +4174,7 @@ function peg$parse(input, options) {
|
|
|
4036
4174
|
}
|
|
4037
4175
|
|
|
4038
4176
|
function peg$parsenewLine() {
|
|
4039
|
-
|
|
4177
|
+
let s0;
|
|
4040
4178
|
|
|
4041
4179
|
if (input.charCodeAt(peg$currPos) === 10) {
|
|
4042
4180
|
s0 = peg$c49;
|
|
@@ -4068,7 +4206,7 @@ function peg$parse(input, options) {
|
|
|
4068
4206
|
}
|
|
4069
4207
|
|
|
4070
4208
|
function peg$parsenumericLiteral() {
|
|
4071
|
-
|
|
4209
|
+
let s0, s1;
|
|
4072
4210
|
|
|
4073
4211
|
peg$silentFails++;
|
|
4074
4212
|
s0 = peg$parsefloatLiteral();
|
|
@@ -4085,7 +4223,7 @@ function peg$parse(input, options) {
|
|
|
4085
4223
|
}
|
|
4086
4224
|
|
|
4087
4225
|
function peg$parsenullishCoalescingExpression() {
|
|
4088
|
-
|
|
4226
|
+
let s0, s1, s2, s3, s4, s5, s6, s7;
|
|
4089
4227
|
|
|
4090
4228
|
s0 = peg$currPos;
|
|
4091
4229
|
s1 = peg$parselogicalAndExpression();
|
|
@@ -4139,7 +4277,7 @@ function peg$parse(input, options) {
|
|
|
4139
4277
|
}
|
|
4140
4278
|
}
|
|
4141
4279
|
peg$savedPos = s0;
|
|
4142
|
-
s0 = peg$
|
|
4280
|
+
s0 = peg$f64(s1, s2);
|
|
4143
4281
|
} else {
|
|
4144
4282
|
peg$currPos = s0;
|
|
4145
4283
|
s0 = peg$FAILED;
|
|
@@ -4149,7 +4287,7 @@ function peg$parse(input, options) {
|
|
|
4149
4287
|
}
|
|
4150
4288
|
|
|
4151
4289
|
function peg$parseobjectLiteral() {
|
|
4152
|
-
|
|
4290
|
+
let s0, s1, s2, s3, s4, s5;
|
|
4153
4291
|
|
|
4154
4292
|
peg$silentFails++;
|
|
4155
4293
|
s0 = peg$currPos;
|
|
@@ -4170,7 +4308,7 @@ function peg$parse(input, options) {
|
|
|
4170
4308
|
s5 = peg$parseexpectClosingBrace();
|
|
4171
4309
|
if (s5 !== peg$FAILED) {
|
|
4172
4310
|
peg$savedPos = s0;
|
|
4173
|
-
s0 = peg$
|
|
4311
|
+
s0 = peg$f65(s3);
|
|
4174
4312
|
} else {
|
|
4175
4313
|
peg$currPos = s0;
|
|
4176
4314
|
s0 = peg$FAILED;
|
|
@@ -4189,7 +4327,7 @@ function peg$parse(input, options) {
|
|
|
4189
4327
|
}
|
|
4190
4328
|
|
|
4191
4329
|
function peg$parseobjectEntries() {
|
|
4192
|
-
|
|
4330
|
+
let s0, s1, s2, s3, s4;
|
|
4193
4331
|
|
|
4194
4332
|
s0 = peg$currPos;
|
|
4195
4333
|
s1 = peg$currPos;
|
|
@@ -4223,7 +4361,7 @@ function peg$parse(input, options) {
|
|
|
4223
4361
|
s2 = null;
|
|
4224
4362
|
}
|
|
4225
4363
|
peg$savedPos = s0;
|
|
4226
|
-
s0 = peg$
|
|
4364
|
+
s0 = peg$f66(s1);
|
|
4227
4365
|
} else {
|
|
4228
4366
|
peg$currPos = s0;
|
|
4229
4367
|
s0 = peg$FAILED;
|
|
@@ -4233,7 +4371,7 @@ function peg$parse(input, options) {
|
|
|
4233
4371
|
}
|
|
4234
4372
|
|
|
4235
4373
|
function peg$parseobjectEntry() {
|
|
4236
|
-
|
|
4374
|
+
let s0;
|
|
4237
4375
|
|
|
4238
4376
|
s0 = peg$parsespreadElement();
|
|
4239
4377
|
if (s0 === peg$FAILED) {
|
|
@@ -4250,7 +4388,7 @@ function peg$parse(input, options) {
|
|
|
4250
4388
|
}
|
|
4251
4389
|
|
|
4252
4390
|
function peg$parseobjectGetter() {
|
|
4253
|
-
|
|
4391
|
+
let s0, s1, s2, s3, s4, s5;
|
|
4254
4392
|
|
|
4255
4393
|
peg$silentFails++;
|
|
4256
4394
|
s0 = peg$currPos;
|
|
@@ -4269,7 +4407,7 @@ function peg$parse(input, options) {
|
|
|
4269
4407
|
s5 = peg$parseexpectPipelineExpression();
|
|
4270
4408
|
if (s5 !== peg$FAILED) {
|
|
4271
4409
|
peg$savedPos = s0;
|
|
4272
|
-
s0 = peg$
|
|
4410
|
+
s0 = peg$f67(s1, s5);
|
|
4273
4411
|
} else {
|
|
4274
4412
|
peg$currPos = s0;
|
|
4275
4413
|
s0 = peg$FAILED;
|
|
@@ -4292,7 +4430,7 @@ function peg$parse(input, options) {
|
|
|
4292
4430
|
}
|
|
4293
4431
|
|
|
4294
4432
|
function peg$parseobjectHiddenKey() {
|
|
4295
|
-
|
|
4433
|
+
let s0, s1, s2, s3, s4;
|
|
4296
4434
|
|
|
4297
4435
|
s0 = peg$currPos;
|
|
4298
4436
|
s1 = peg$currPos;
|
|
@@ -4330,7 +4468,7 @@ function peg$parse(input, options) {
|
|
|
4330
4468
|
}
|
|
4331
4469
|
if (s1 !== peg$FAILED) {
|
|
4332
4470
|
peg$savedPos = s0;
|
|
4333
|
-
s1 = peg$
|
|
4471
|
+
s1 = peg$f68(s1);
|
|
4334
4472
|
}
|
|
4335
4473
|
s0 = s1;
|
|
4336
4474
|
|
|
@@ -4338,7 +4476,7 @@ function peg$parse(input, options) {
|
|
|
4338
4476
|
}
|
|
4339
4477
|
|
|
4340
4478
|
function peg$parseobjectKey() {
|
|
4341
|
-
|
|
4479
|
+
let s0, s1;
|
|
4342
4480
|
|
|
4343
4481
|
peg$silentFails++;
|
|
4344
4482
|
s0 = peg$parseobjectHiddenKey();
|
|
@@ -4355,7 +4493,7 @@ function peg$parse(input, options) {
|
|
|
4355
4493
|
}
|
|
4356
4494
|
|
|
4357
4495
|
function peg$parseobjectProperty() {
|
|
4358
|
-
|
|
4496
|
+
let s0, s1, s2, s3, s4, s5;
|
|
4359
4497
|
|
|
4360
4498
|
peg$silentFails++;
|
|
4361
4499
|
s0 = peg$currPos;
|
|
@@ -4374,7 +4512,7 @@ function peg$parse(input, options) {
|
|
|
4374
4512
|
s5 = peg$parseexpectPipelineExpression();
|
|
4375
4513
|
if (s5 !== peg$FAILED) {
|
|
4376
4514
|
peg$savedPos = s0;
|
|
4377
|
-
s0 = peg$
|
|
4515
|
+
s0 = peg$f69(s1, s5);
|
|
4378
4516
|
} else {
|
|
4379
4517
|
peg$currPos = s0;
|
|
4380
4518
|
s0 = peg$FAILED;
|
|
@@ -4397,14 +4535,14 @@ function peg$parse(input, options) {
|
|
|
4397
4535
|
}
|
|
4398
4536
|
|
|
4399
4537
|
function peg$parseobjectShorthandProperty() {
|
|
4400
|
-
|
|
4538
|
+
let s0, s1;
|
|
4401
4539
|
|
|
4402
4540
|
peg$silentFails++;
|
|
4403
4541
|
s0 = peg$currPos;
|
|
4404
4542
|
s1 = peg$parseobjectPublicKey();
|
|
4405
4543
|
if (s1 !== peg$FAILED) {
|
|
4406
4544
|
peg$savedPos = s0;
|
|
4407
|
-
s1 = peg$
|
|
4545
|
+
s1 = peg$f70(s1);
|
|
4408
4546
|
}
|
|
4409
4547
|
s0 = s1;
|
|
4410
4548
|
if (s0 === peg$FAILED) {
|
|
@@ -4412,7 +4550,7 @@ function peg$parse(input, options) {
|
|
|
4412
4550
|
s1 = peg$parseangleBracketLiteral();
|
|
4413
4551
|
if (s1 !== peg$FAILED) {
|
|
4414
4552
|
peg$savedPos = s0;
|
|
4415
|
-
s1 = peg$
|
|
4553
|
+
s1 = peg$f71(s1);
|
|
4416
4554
|
}
|
|
4417
4555
|
s0 = s1;
|
|
4418
4556
|
}
|
|
@@ -4426,7 +4564,7 @@ function peg$parse(input, options) {
|
|
|
4426
4564
|
}
|
|
4427
4565
|
|
|
4428
4566
|
function peg$parseobjectPublicKey() {
|
|
4429
|
-
|
|
4567
|
+
let s0, s1, s2;
|
|
4430
4568
|
|
|
4431
4569
|
s0 = peg$currPos;
|
|
4432
4570
|
s1 = peg$parsekey();
|
|
@@ -4442,7 +4580,7 @@ function peg$parse(input, options) {
|
|
|
4442
4580
|
s2 = null;
|
|
4443
4581
|
}
|
|
4444
4582
|
peg$savedPos = s0;
|
|
4445
|
-
s0 = peg$
|
|
4583
|
+
s0 = peg$f72(s1, s2);
|
|
4446
4584
|
} else {
|
|
4447
4585
|
peg$currPos = s0;
|
|
4448
4586
|
s0 = peg$FAILED;
|
|
@@ -4452,7 +4590,7 @@ function peg$parse(input, options) {
|
|
|
4452
4590
|
s1 = peg$parsestringLiteral();
|
|
4453
4591
|
if (s1 !== peg$FAILED) {
|
|
4454
4592
|
peg$savedPos = s0;
|
|
4455
|
-
s1 = peg$
|
|
4593
|
+
s1 = peg$f73(s1);
|
|
4456
4594
|
}
|
|
4457
4595
|
s0 = s1;
|
|
4458
4596
|
}
|
|
@@ -4461,7 +4599,7 @@ function peg$parse(input, options) {
|
|
|
4461
4599
|
}
|
|
4462
4600
|
|
|
4463
4601
|
function peg$parseoptionalChaining() {
|
|
4464
|
-
|
|
4602
|
+
let s0, s1, s2, s3, s4;
|
|
4465
4603
|
|
|
4466
4604
|
s0 = peg$currPos;
|
|
4467
4605
|
s1 = peg$parse__();
|
|
@@ -4477,7 +4615,7 @@ function peg$parse(input, options) {
|
|
|
4477
4615
|
s4 = peg$parseidentifier();
|
|
4478
4616
|
if (s4 !== peg$FAILED) {
|
|
4479
4617
|
peg$savedPos = s0;
|
|
4480
|
-
s0 = peg$
|
|
4618
|
+
s0 = peg$f74(s4);
|
|
4481
4619
|
} else {
|
|
4482
4620
|
peg$currPos = s0;
|
|
4483
4621
|
s0 = peg$FAILED;
|
|
@@ -4491,13 +4629,13 @@ function peg$parse(input, options) {
|
|
|
4491
4629
|
}
|
|
4492
4630
|
|
|
4493
4631
|
function peg$parseparameter() {
|
|
4494
|
-
|
|
4632
|
+
let s0, s1;
|
|
4495
4633
|
|
|
4496
4634
|
s0 = peg$currPos;
|
|
4497
4635
|
s1 = peg$parsekey();
|
|
4498
4636
|
if (s1 !== peg$FAILED) {
|
|
4499
4637
|
peg$savedPos = s0;
|
|
4500
|
-
s1 = peg$
|
|
4638
|
+
s1 = peg$f75(s1);
|
|
4501
4639
|
}
|
|
4502
4640
|
s0 = s1;
|
|
4503
4641
|
|
|
@@ -4505,7 +4643,7 @@ function peg$parse(input, options) {
|
|
|
4505
4643
|
}
|
|
4506
4644
|
|
|
4507
4645
|
function peg$parseparameterList() {
|
|
4508
|
-
|
|
4646
|
+
let s0, s1, s2, s3, s4;
|
|
4509
4647
|
|
|
4510
4648
|
s0 = peg$currPos;
|
|
4511
4649
|
s1 = peg$currPos;
|
|
@@ -4539,7 +4677,7 @@ function peg$parse(input, options) {
|
|
|
4539
4677
|
s2 = null;
|
|
4540
4678
|
}
|
|
4541
4679
|
peg$savedPos = s0;
|
|
4542
|
-
s0 = peg$
|
|
4680
|
+
s0 = peg$f76(s1);
|
|
4543
4681
|
} else {
|
|
4544
4682
|
peg$currPos = s0;
|
|
4545
4683
|
s0 = peg$FAILED;
|
|
@@ -4549,13 +4687,13 @@ function peg$parse(input, options) {
|
|
|
4549
4687
|
}
|
|
4550
4688
|
|
|
4551
4689
|
function peg$parseparameterSingleton() {
|
|
4552
|
-
|
|
4690
|
+
let s0, s1;
|
|
4553
4691
|
|
|
4554
4692
|
s0 = peg$currPos;
|
|
4555
4693
|
s1 = peg$parseparameter();
|
|
4556
4694
|
if (s1 !== peg$FAILED) {
|
|
4557
4695
|
peg$savedPos = s0;
|
|
4558
|
-
s1 = peg$
|
|
4696
|
+
s1 = peg$f77(s1);
|
|
4559
4697
|
}
|
|
4560
4698
|
s0 = s1;
|
|
4561
4699
|
|
|
@@ -4563,7 +4701,7 @@ function peg$parse(input, options) {
|
|
|
4563
4701
|
}
|
|
4564
4702
|
|
|
4565
4703
|
function peg$parseparenthesesArguments() {
|
|
4566
|
-
|
|
4704
|
+
let s0, s1, s2, s3, s4, s5;
|
|
4567
4705
|
|
|
4568
4706
|
peg$silentFails++;
|
|
4569
4707
|
s0 = peg$currPos;
|
|
@@ -4584,7 +4722,7 @@ function peg$parse(input, options) {
|
|
|
4584
4722
|
s5 = peg$parseexpectClosingParenthesis();
|
|
4585
4723
|
if (s5 !== peg$FAILED) {
|
|
4586
4724
|
peg$savedPos = s0;
|
|
4587
|
-
s0 = peg$
|
|
4725
|
+
s0 = peg$f78(s3);
|
|
4588
4726
|
} else {
|
|
4589
4727
|
peg$currPos = s0;
|
|
4590
4728
|
s0 = peg$FAILED;
|
|
@@ -4603,7 +4741,7 @@ function peg$parse(input, options) {
|
|
|
4603
4741
|
}
|
|
4604
4742
|
|
|
4605
4743
|
function peg$parsepathArguments() {
|
|
4606
|
-
|
|
4744
|
+
let s0, s1, s2;
|
|
4607
4745
|
|
|
4608
4746
|
s0 = peg$currPos;
|
|
4609
4747
|
if (input.charCodeAt(peg$currPos) === 47) {
|
|
@@ -4619,7 +4757,7 @@ function peg$parse(input, options) {
|
|
|
4619
4757
|
s2 = null;
|
|
4620
4758
|
}
|
|
4621
4759
|
peg$savedPos = s0;
|
|
4622
|
-
s0 = peg$
|
|
4760
|
+
s0 = peg$f79(s2);
|
|
4623
4761
|
} else {
|
|
4624
4762
|
peg$currPos = s0;
|
|
4625
4763
|
s0 = peg$FAILED;
|
|
@@ -4629,7 +4767,7 @@ function peg$parse(input, options) {
|
|
|
4629
4767
|
}
|
|
4630
4768
|
|
|
4631
4769
|
function peg$parsepathKeys() {
|
|
4632
|
-
|
|
4770
|
+
let s0, s1, s2;
|
|
4633
4771
|
|
|
4634
4772
|
s0 = peg$currPos;
|
|
4635
4773
|
s1 = [];
|
|
@@ -4649,13 +4787,13 @@ function peg$parse(input, options) {
|
|
|
4649
4787
|
}
|
|
4650
4788
|
|
|
4651
4789
|
function peg$parsepathLiteral() {
|
|
4652
|
-
|
|
4790
|
+
let s0, s1;
|
|
4653
4791
|
|
|
4654
4792
|
s0 = peg$currPos;
|
|
4655
4793
|
s1 = peg$parsepathKeys();
|
|
4656
4794
|
if (s1 !== peg$FAILED) {
|
|
4657
4795
|
peg$savedPos = s0;
|
|
4658
|
-
s1 = peg$
|
|
4796
|
+
s1 = peg$f80(s1);
|
|
4659
4797
|
}
|
|
4660
4798
|
s0 = s1;
|
|
4661
4799
|
|
|
@@ -4663,7 +4801,7 @@ function peg$parse(input, options) {
|
|
|
4663
4801
|
}
|
|
4664
4802
|
|
|
4665
4803
|
function peg$parsepathSegment() {
|
|
4666
|
-
|
|
4804
|
+
let s0, s1, s2;
|
|
4667
4805
|
|
|
4668
4806
|
s0 = peg$currPos;
|
|
4669
4807
|
s1 = peg$parsekey();
|
|
@@ -4679,7 +4817,7 @@ function peg$parse(input, options) {
|
|
|
4679
4817
|
s2 = null;
|
|
4680
4818
|
}
|
|
4681
4819
|
peg$savedPos = s0;
|
|
4682
|
-
s0 = peg$
|
|
4820
|
+
s0 = peg$f81(s1);
|
|
4683
4821
|
} else {
|
|
4684
4822
|
peg$currPos = s0;
|
|
4685
4823
|
s0 = peg$FAILED;
|
|
@@ -4695,7 +4833,7 @@ function peg$parse(input, options) {
|
|
|
4695
4833
|
}
|
|
4696
4834
|
if (s1 !== peg$FAILED) {
|
|
4697
4835
|
peg$savedPos = s0;
|
|
4698
|
-
s1 = peg$
|
|
4836
|
+
s1 = peg$f82();
|
|
4699
4837
|
}
|
|
4700
4838
|
s0 = s1;
|
|
4701
4839
|
}
|
|
@@ -4704,7 +4842,7 @@ function peg$parse(input, options) {
|
|
|
4704
4842
|
}
|
|
4705
4843
|
|
|
4706
4844
|
function peg$parsepipelineExpression() {
|
|
4707
|
-
|
|
4845
|
+
let s0, s1, s2, s3, s4, s5, s6, s7;
|
|
4708
4846
|
|
|
4709
4847
|
s0 = peg$currPos;
|
|
4710
4848
|
s1 = peg$parseshorthandFunction();
|
|
@@ -4746,7 +4884,7 @@ function peg$parse(input, options) {
|
|
|
4746
4884
|
}
|
|
4747
4885
|
}
|
|
4748
4886
|
peg$savedPos = s0;
|
|
4749
|
-
s0 = peg$
|
|
4887
|
+
s0 = peg$f83(s1, s2);
|
|
4750
4888
|
} else {
|
|
4751
4889
|
peg$currPos = s0;
|
|
4752
4890
|
s0 = peg$FAILED;
|
|
@@ -4756,7 +4894,7 @@ function peg$parse(input, options) {
|
|
|
4756
4894
|
}
|
|
4757
4895
|
|
|
4758
4896
|
function peg$parseprimary() {
|
|
4759
|
-
|
|
4897
|
+
let s0, s1, s2, s3;
|
|
4760
4898
|
|
|
4761
4899
|
s0 = peg$parsestringLiteral();
|
|
4762
4900
|
if (s0 === peg$FAILED) {
|
|
@@ -4810,7 +4948,7 @@ function peg$parse(input, options) {
|
|
|
4810
4948
|
}
|
|
4811
4949
|
|
|
4812
4950
|
function peg$parseprogram() {
|
|
4813
|
-
|
|
4951
|
+
let s0, s1, s2;
|
|
4814
4952
|
|
|
4815
4953
|
peg$silentFails++;
|
|
4816
4954
|
s0 = peg$currPos;
|
|
@@ -4835,10 +4973,10 @@ function peg$parse(input, options) {
|
|
|
4835
4973
|
}
|
|
4836
4974
|
|
|
4837
4975
|
function peg$parseprogramMode() {
|
|
4838
|
-
|
|
4976
|
+
let s0;
|
|
4839
4977
|
|
|
4840
4978
|
peg$savedPos = peg$currPos;
|
|
4841
|
-
s0 = peg$
|
|
4979
|
+
s0 = peg$f84();
|
|
4842
4980
|
if (s0) {
|
|
4843
4981
|
s0 = undefined;
|
|
4844
4982
|
} else {
|
|
@@ -4849,23 +4987,33 @@ function peg$parse(input, options) {
|
|
|
4849
4987
|
}
|
|
4850
4988
|
|
|
4851
4989
|
function peg$parsepropertyAccess() {
|
|
4852
|
-
|
|
4990
|
+
let s0, s1, s2, s3, s4;
|
|
4853
4991
|
|
|
4854
4992
|
s0 = peg$currPos;
|
|
4855
|
-
s1 = peg$
|
|
4856
|
-
if (
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4993
|
+
s1 = peg$parsewhitespaceOptionalForProgram();
|
|
4994
|
+
if (s1 !== peg$FAILED) {
|
|
4995
|
+
if (input.charCodeAt(peg$currPos) === 46) {
|
|
4996
|
+
s2 = peg$c38;
|
|
4997
|
+
peg$currPos++;
|
|
4998
|
+
} else {
|
|
4999
|
+
s2 = peg$FAILED;
|
|
5000
|
+
if (peg$silentFails === 0) { peg$fail(peg$e48); }
|
|
5001
|
+
}
|
|
5002
|
+
if (s2 !== peg$FAILED) {
|
|
5003
|
+
s3 = peg$parsewhitespaceOptionalForProgram();
|
|
5004
|
+
if (s3 !== peg$FAILED) {
|
|
5005
|
+
s4 = peg$parseidentifierLiteral();
|
|
5006
|
+
if (s4 !== peg$FAILED) {
|
|
5007
|
+
peg$savedPos = s0;
|
|
5008
|
+
s0 = peg$f85(s4);
|
|
5009
|
+
} else {
|
|
5010
|
+
peg$currPos = s0;
|
|
5011
|
+
s0 = peg$FAILED;
|
|
5012
|
+
}
|
|
5013
|
+
} else {
|
|
5014
|
+
peg$currPos = s0;
|
|
5015
|
+
s0 = peg$FAILED;
|
|
5016
|
+
}
|
|
4869
5017
|
} else {
|
|
4870
5018
|
peg$currPos = s0;
|
|
4871
5019
|
s0 = peg$FAILED;
|
|
@@ -4879,7 +5027,7 @@ function peg$parse(input, options) {
|
|
|
4879
5027
|
}
|
|
4880
5028
|
|
|
4881
5029
|
function peg$parseregexFlags() {
|
|
4882
|
-
|
|
5030
|
+
let s0, s1, s2;
|
|
4883
5031
|
|
|
4884
5032
|
s0 = peg$currPos;
|
|
4885
5033
|
s1 = [];
|
|
@@ -4901,14 +5049,14 @@ function peg$parse(input, options) {
|
|
|
4901
5049
|
}
|
|
4902
5050
|
}
|
|
4903
5051
|
peg$savedPos = s0;
|
|
4904
|
-
s1 = peg$
|
|
5052
|
+
s1 = peg$f86(s1);
|
|
4905
5053
|
s0 = s1;
|
|
4906
5054
|
|
|
4907
5055
|
return s0;
|
|
4908
5056
|
}
|
|
4909
5057
|
|
|
4910
5058
|
function peg$parseregexLiteral() {
|
|
4911
|
-
|
|
5059
|
+
let s0, s1, s2, s3, s4;
|
|
4912
5060
|
|
|
4913
5061
|
s0 = peg$currPos;
|
|
4914
5062
|
if (input.charCodeAt(peg$currPos) === 47) {
|
|
@@ -4935,7 +5083,7 @@ function peg$parse(input, options) {
|
|
|
4935
5083
|
if (s3 !== peg$FAILED) {
|
|
4936
5084
|
s4 = peg$parseregexFlags();
|
|
4937
5085
|
peg$savedPos = s0;
|
|
4938
|
-
s0 = peg$
|
|
5086
|
+
s0 = peg$f87(s2, s4);
|
|
4939
5087
|
} else {
|
|
4940
5088
|
peg$currPos = s0;
|
|
4941
5089
|
s0 = peg$FAILED;
|
|
@@ -4949,7 +5097,7 @@ function peg$parse(input, options) {
|
|
|
4949
5097
|
}
|
|
4950
5098
|
|
|
4951
5099
|
function peg$parseregexLiteralChar() {
|
|
4952
|
-
|
|
5100
|
+
let s0;
|
|
4953
5101
|
|
|
4954
5102
|
s0 = input.charAt(peg$currPos);
|
|
4955
5103
|
if (peg$r8.test(s0)) {
|
|
@@ -4966,7 +5114,7 @@ function peg$parse(input, options) {
|
|
|
4966
5114
|
}
|
|
4967
5115
|
|
|
4968
5116
|
function peg$parserelationalExpression() {
|
|
4969
|
-
|
|
5117
|
+
let s0, s1, s2, s3, s4, s5, s6, s7;
|
|
4970
5118
|
|
|
4971
5119
|
s0 = peg$currPos;
|
|
4972
5120
|
s1 = peg$parseshiftExpression();
|
|
@@ -5018,7 +5166,7 @@ function peg$parse(input, options) {
|
|
|
5018
5166
|
}
|
|
5019
5167
|
}
|
|
5020
5168
|
peg$savedPos = s0;
|
|
5021
|
-
s0 = peg$
|
|
5169
|
+
s0 = peg$f88(s1, s2);
|
|
5022
5170
|
} else {
|
|
5023
5171
|
peg$currPos = s0;
|
|
5024
5172
|
s0 = peg$FAILED;
|
|
@@ -5028,7 +5176,7 @@ function peg$parse(input, options) {
|
|
|
5028
5176
|
}
|
|
5029
5177
|
|
|
5030
5178
|
function peg$parserelationalOperator() {
|
|
5031
|
-
|
|
5179
|
+
let s0;
|
|
5032
5180
|
|
|
5033
5181
|
if (input.substr(peg$currPos, 2) === peg$c56) {
|
|
5034
5182
|
s0 = peg$c56;
|
|
@@ -5069,7 +5217,7 @@ function peg$parse(input, options) {
|
|
|
5069
5217
|
}
|
|
5070
5218
|
|
|
5071
5219
|
function peg$parseseparator() {
|
|
5072
|
-
|
|
5220
|
+
let s0, s1, s2, s3;
|
|
5073
5221
|
|
|
5074
5222
|
s0 = peg$currPos;
|
|
5075
5223
|
s1 = peg$parse__();
|
|
@@ -5103,7 +5251,7 @@ function peg$parse(input, options) {
|
|
|
5103
5251
|
}
|
|
5104
5252
|
|
|
5105
5253
|
function peg$parseshebang() {
|
|
5106
|
-
|
|
5254
|
+
let s0, s1, s2, s3;
|
|
5107
5255
|
|
|
5108
5256
|
s0 = peg$currPos;
|
|
5109
5257
|
if (input.substr(peg$currPos, 2) === peg$c58) {
|
|
@@ -5133,7 +5281,7 @@ function peg$parse(input, options) {
|
|
|
5133
5281
|
}
|
|
5134
5282
|
}
|
|
5135
5283
|
peg$savedPos = s0;
|
|
5136
|
-
s0 = peg$
|
|
5284
|
+
s0 = peg$f89();
|
|
5137
5285
|
} else {
|
|
5138
5286
|
peg$currPos = s0;
|
|
5139
5287
|
s0 = peg$FAILED;
|
|
@@ -5143,10 +5291,10 @@ function peg$parse(input, options) {
|
|
|
5143
5291
|
}
|
|
5144
5292
|
|
|
5145
5293
|
function peg$parseshellMode() {
|
|
5146
|
-
|
|
5294
|
+
let s0;
|
|
5147
5295
|
|
|
5148
5296
|
peg$savedPos = peg$currPos;
|
|
5149
|
-
s0 = peg$
|
|
5297
|
+
s0 = peg$f90();
|
|
5150
5298
|
if (s0) {
|
|
5151
5299
|
s0 = undefined;
|
|
5152
5300
|
} else {
|
|
@@ -5157,7 +5305,7 @@ function peg$parse(input, options) {
|
|
|
5157
5305
|
}
|
|
5158
5306
|
|
|
5159
5307
|
function peg$parseshiftExpression() {
|
|
5160
|
-
|
|
5308
|
+
let s0, s1, s2, s3, s4, s5, s6, s7;
|
|
5161
5309
|
|
|
5162
5310
|
s0 = peg$currPos;
|
|
5163
5311
|
s1 = peg$parseadditiveExpression();
|
|
@@ -5199,7 +5347,7 @@ function peg$parse(input, options) {
|
|
|
5199
5347
|
}
|
|
5200
5348
|
}
|
|
5201
5349
|
peg$savedPos = s0;
|
|
5202
|
-
s0 = peg$
|
|
5350
|
+
s0 = peg$f91(s1, s2);
|
|
5203
5351
|
} else {
|
|
5204
5352
|
peg$currPos = s0;
|
|
5205
5353
|
s0 = peg$FAILED;
|
|
@@ -5209,7 +5357,7 @@ function peg$parse(input, options) {
|
|
|
5209
5357
|
}
|
|
5210
5358
|
|
|
5211
5359
|
function peg$parseshiftOperator() {
|
|
5212
|
-
|
|
5360
|
+
let s0;
|
|
5213
5361
|
|
|
5214
5362
|
if (input.substr(peg$currPos, 2) === peg$c59) {
|
|
5215
5363
|
s0 = peg$c59;
|
|
@@ -5241,7 +5389,7 @@ function peg$parse(input, options) {
|
|
|
5241
5389
|
}
|
|
5242
5390
|
|
|
5243
5391
|
function peg$parseshorthandFunction() {
|
|
5244
|
-
|
|
5392
|
+
let s0, s1, s2, s3, s4, s5;
|
|
5245
5393
|
|
|
5246
5394
|
peg$silentFails++;
|
|
5247
5395
|
s0 = peg$currPos;
|
|
@@ -5279,7 +5427,7 @@ function peg$parse(input, options) {
|
|
|
5279
5427
|
s5 = peg$parseimplicitParenthesesCallExpression();
|
|
5280
5428
|
if (s5 !== peg$FAILED) {
|
|
5281
5429
|
peg$savedPos = s0;
|
|
5282
|
-
s0 = peg$
|
|
5430
|
+
s0 = peg$f92(s5);
|
|
5283
5431
|
} else {
|
|
5284
5432
|
peg$currPos = s0;
|
|
5285
5433
|
s0 = peg$FAILED;
|
|
@@ -5309,7 +5457,7 @@ function peg$parse(input, options) {
|
|
|
5309
5457
|
}
|
|
5310
5458
|
|
|
5311
5459
|
function peg$parsesingleArrow() {
|
|
5312
|
-
|
|
5460
|
+
let s0;
|
|
5313
5461
|
|
|
5314
5462
|
if (input.charCodeAt(peg$currPos) === 8594) {
|
|
5315
5463
|
s0 = peg$c62;
|
|
@@ -5332,7 +5480,7 @@ function peg$parse(input, options) {
|
|
|
5332
5480
|
}
|
|
5333
5481
|
|
|
5334
5482
|
function peg$parsesingleLineComment() {
|
|
5335
|
-
|
|
5483
|
+
let s0, s1, s2, s3;
|
|
5336
5484
|
|
|
5337
5485
|
s0 = peg$currPos;
|
|
5338
5486
|
if (input.substr(peg$currPos, 2) === peg$c2) {
|
|
@@ -5362,7 +5510,7 @@ function peg$parse(input, options) {
|
|
|
5362
5510
|
}
|
|
5363
5511
|
}
|
|
5364
5512
|
peg$savedPos = s0;
|
|
5365
|
-
s0 = peg$
|
|
5513
|
+
s0 = peg$f93();
|
|
5366
5514
|
} else {
|
|
5367
5515
|
peg$currPos = s0;
|
|
5368
5516
|
s0 = peg$FAILED;
|
|
@@ -5372,7 +5520,7 @@ function peg$parse(input, options) {
|
|
|
5372
5520
|
}
|
|
5373
5521
|
|
|
5374
5522
|
function peg$parsesingleQuoteString() {
|
|
5375
|
-
|
|
5523
|
+
let s0, s1, s2, s3;
|
|
5376
5524
|
|
|
5377
5525
|
peg$silentFails++;
|
|
5378
5526
|
s0 = peg$currPos;
|
|
@@ -5393,7 +5541,7 @@ function peg$parse(input, options) {
|
|
|
5393
5541
|
s3 = peg$parseexpectSingleQuote();
|
|
5394
5542
|
if (s3 !== peg$FAILED) {
|
|
5395
5543
|
peg$savedPos = s0;
|
|
5396
|
-
s0 = peg$
|
|
5544
|
+
s0 = peg$f94(s2);
|
|
5397
5545
|
} else {
|
|
5398
5546
|
peg$currPos = s0;
|
|
5399
5547
|
s0 = peg$FAILED;
|
|
@@ -5412,7 +5560,7 @@ function peg$parse(input, options) {
|
|
|
5412
5560
|
}
|
|
5413
5561
|
|
|
5414
5562
|
function peg$parsesingleQuoteStringChar() {
|
|
5415
|
-
|
|
5563
|
+
let s0, s1, s2;
|
|
5416
5564
|
|
|
5417
5565
|
s0 = peg$currPos;
|
|
5418
5566
|
s1 = peg$currPos;
|
|
@@ -5451,13 +5599,13 @@ function peg$parse(input, options) {
|
|
|
5451
5599
|
}
|
|
5452
5600
|
|
|
5453
5601
|
function peg$parseslash() {
|
|
5454
|
-
|
|
5602
|
+
let s0, s1;
|
|
5455
5603
|
|
|
5456
5604
|
s0 = peg$currPos;
|
|
5457
5605
|
s1 = peg$parseslashFollows();
|
|
5458
5606
|
if (s1 !== peg$FAILED) {
|
|
5459
5607
|
peg$savedPos = s0;
|
|
5460
|
-
s1 = peg$
|
|
5608
|
+
s1 = peg$f95();
|
|
5461
5609
|
}
|
|
5462
5610
|
s0 = s1;
|
|
5463
5611
|
|
|
@@ -5465,7 +5613,7 @@ function peg$parse(input, options) {
|
|
|
5465
5613
|
}
|
|
5466
5614
|
|
|
5467
5615
|
function peg$parseslashes() {
|
|
5468
|
-
|
|
5616
|
+
let s0, s1, s2;
|
|
5469
5617
|
|
|
5470
5618
|
s0 = peg$currPos;
|
|
5471
5619
|
s1 = [];
|
|
@@ -5492,7 +5640,7 @@ function peg$parse(input, options) {
|
|
|
5492
5640
|
}
|
|
5493
5641
|
if (s1 !== peg$FAILED) {
|
|
5494
5642
|
peg$savedPos = s0;
|
|
5495
|
-
s1 = peg$
|
|
5643
|
+
s1 = peg$f96();
|
|
5496
5644
|
}
|
|
5497
5645
|
s0 = s1;
|
|
5498
5646
|
|
|
@@ -5500,7 +5648,7 @@ function peg$parse(input, options) {
|
|
|
5500
5648
|
}
|
|
5501
5649
|
|
|
5502
5650
|
function peg$parseslashFollows() {
|
|
5503
|
-
|
|
5651
|
+
let s0, s1, s2;
|
|
5504
5652
|
|
|
5505
5653
|
s0 = peg$currPos;
|
|
5506
5654
|
s1 = peg$currPos;
|
|
@@ -5521,7 +5669,7 @@ function peg$parse(input, options) {
|
|
|
5521
5669
|
}
|
|
5522
5670
|
if (s1 !== peg$FAILED) {
|
|
5523
5671
|
peg$savedPos = s0;
|
|
5524
|
-
s1 = peg$
|
|
5672
|
+
s1 = peg$f97();
|
|
5525
5673
|
}
|
|
5526
5674
|
s0 = s1;
|
|
5527
5675
|
|
|
@@ -5529,7 +5677,7 @@ function peg$parse(input, options) {
|
|
|
5529
5677
|
}
|
|
5530
5678
|
|
|
5531
5679
|
function peg$parsespreadElement() {
|
|
5532
|
-
|
|
5680
|
+
let s0, s1, s2, s3;
|
|
5533
5681
|
|
|
5534
5682
|
s0 = peg$currPos;
|
|
5535
5683
|
s1 = peg$parseellipsis();
|
|
@@ -5538,7 +5686,7 @@ function peg$parse(input, options) {
|
|
|
5538
5686
|
s3 = peg$parseexpectPipelineExpression();
|
|
5539
5687
|
if (s3 !== peg$FAILED) {
|
|
5540
5688
|
peg$savedPos = s0;
|
|
5541
|
-
s0 = peg$
|
|
5689
|
+
s0 = peg$f98(s3);
|
|
5542
5690
|
} else {
|
|
5543
5691
|
peg$currPos = s0;
|
|
5544
5692
|
s0 = peg$FAILED;
|
|
@@ -5552,7 +5700,7 @@ function peg$parse(input, options) {
|
|
|
5552
5700
|
}
|
|
5553
5701
|
|
|
5554
5702
|
function peg$parsestringLiteral() {
|
|
5555
|
-
|
|
5703
|
+
let s0, s1, s2;
|
|
5556
5704
|
|
|
5557
5705
|
peg$silentFails++;
|
|
5558
5706
|
s0 = peg$parsedoubleQuoteString();
|
|
@@ -5585,7 +5733,7 @@ function peg$parse(input, options) {
|
|
|
5585
5733
|
}
|
|
5586
5734
|
|
|
5587
5735
|
function peg$parsetemplateBody() {
|
|
5588
|
-
|
|
5736
|
+
let s0, s1, s2, s3, s4, s5;
|
|
5589
5737
|
|
|
5590
5738
|
peg$silentFails++;
|
|
5591
5739
|
s0 = peg$currPos;
|
|
@@ -5615,16 +5763,14 @@ function peg$parse(input, options) {
|
|
|
5615
5763
|
}
|
|
5616
5764
|
}
|
|
5617
5765
|
peg$savedPos = s0;
|
|
5618
|
-
s0 = peg$
|
|
5766
|
+
s0 = peg$f99(s1, s2);
|
|
5619
5767
|
peg$silentFails--;
|
|
5620
|
-
s1 = peg$FAILED;
|
|
5621
|
-
if (peg$silentFails === 0) { peg$fail(peg$e102); }
|
|
5622
5768
|
|
|
5623
5769
|
return s0;
|
|
5624
5770
|
}
|
|
5625
5771
|
|
|
5626
5772
|
function peg$parsetemplateBodyChar() {
|
|
5627
|
-
|
|
5773
|
+
let s0, s1, s2;
|
|
5628
5774
|
|
|
5629
5775
|
s0 = peg$currPos;
|
|
5630
5776
|
s1 = peg$currPos;
|
|
@@ -5634,7 +5780,7 @@ function peg$parse(input, options) {
|
|
|
5634
5780
|
peg$currPos += 2;
|
|
5635
5781
|
} else {
|
|
5636
5782
|
s2 = peg$FAILED;
|
|
5637
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
5783
|
+
if (peg$silentFails === 0) { peg$fail(peg$e102); }
|
|
5638
5784
|
}
|
|
5639
5785
|
peg$silentFails--;
|
|
5640
5786
|
if (s2 === peg$FAILED) {
|
|
@@ -5660,7 +5806,7 @@ function peg$parse(input, options) {
|
|
|
5660
5806
|
}
|
|
5661
5807
|
|
|
5662
5808
|
function peg$parsetemplateBodyText() {
|
|
5663
|
-
|
|
5809
|
+
let s0, s1, s2;
|
|
5664
5810
|
|
|
5665
5811
|
peg$silentFails++;
|
|
5666
5812
|
s0 = peg$currPos;
|
|
@@ -5671,17 +5817,15 @@ function peg$parse(input, options) {
|
|
|
5671
5817
|
s2 = peg$parsetemplateBodyChar();
|
|
5672
5818
|
}
|
|
5673
5819
|
peg$savedPos = s0;
|
|
5674
|
-
s1 = peg$
|
|
5820
|
+
s1 = peg$f100(s1);
|
|
5675
5821
|
s0 = s1;
|
|
5676
5822
|
peg$silentFails--;
|
|
5677
|
-
s1 = peg$FAILED;
|
|
5678
|
-
if (peg$silentFails === 0) { peg$fail(peg$e104); }
|
|
5679
5823
|
|
|
5680
5824
|
return s0;
|
|
5681
5825
|
}
|
|
5682
5826
|
|
|
5683
5827
|
function peg$parsetemplateDocument() {
|
|
5684
|
-
|
|
5828
|
+
let s0, s1, s2, s3;
|
|
5685
5829
|
|
|
5686
5830
|
peg$silentFails++;
|
|
5687
5831
|
s0 = peg$currPos;
|
|
@@ -5690,7 +5834,7 @@ function peg$parse(input, options) {
|
|
|
5690
5834
|
s2 = peg$parse__();
|
|
5691
5835
|
s3 = peg$parsetemplateBody();
|
|
5692
5836
|
peg$savedPos = s0;
|
|
5693
|
-
s0 = peg$
|
|
5837
|
+
s0 = peg$f101(s1, s3);
|
|
5694
5838
|
} else {
|
|
5695
5839
|
peg$currPos = s0;
|
|
5696
5840
|
s0 = peg$FAILED;
|
|
@@ -5701,7 +5845,7 @@ function peg$parse(input, options) {
|
|
|
5701
5845
|
if (s1 !== peg$FAILED) {
|
|
5702
5846
|
s2 = peg$parsetemplateBody();
|
|
5703
5847
|
peg$savedPos = s0;
|
|
5704
|
-
s0 = peg$
|
|
5848
|
+
s0 = peg$f102(s1, s2);
|
|
5705
5849
|
} else {
|
|
5706
5850
|
peg$currPos = s0;
|
|
5707
5851
|
s0 = peg$FAILED;
|
|
@@ -5710,21 +5854,21 @@ function peg$parse(input, options) {
|
|
|
5710
5854
|
s0 = peg$currPos;
|
|
5711
5855
|
s1 = peg$parsetemplateBody();
|
|
5712
5856
|
peg$savedPos = s0;
|
|
5713
|
-
s1 = peg$
|
|
5857
|
+
s1 = peg$f103(s1);
|
|
5714
5858
|
s0 = s1;
|
|
5715
5859
|
}
|
|
5716
5860
|
}
|
|
5717
5861
|
peg$silentFails--;
|
|
5718
5862
|
if (s0 === peg$FAILED) {
|
|
5719
5863
|
s1 = peg$FAILED;
|
|
5720
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
5864
|
+
if (peg$silentFails === 0) { peg$fail(peg$e103); }
|
|
5721
5865
|
}
|
|
5722
5866
|
|
|
5723
5867
|
return s0;
|
|
5724
5868
|
}
|
|
5725
5869
|
|
|
5726
5870
|
function peg$parsetemplateLiteral() {
|
|
5727
|
-
|
|
5871
|
+
let s0, s1, s2, s3, s4, s5, s6;
|
|
5728
5872
|
|
|
5729
5873
|
peg$silentFails++;
|
|
5730
5874
|
s0 = peg$currPos;
|
|
@@ -5764,7 +5908,7 @@ function peg$parse(input, options) {
|
|
|
5764
5908
|
s4 = peg$parseexpectBacktick();
|
|
5765
5909
|
if (s4 !== peg$FAILED) {
|
|
5766
5910
|
peg$savedPos = s0;
|
|
5767
|
-
s0 = peg$
|
|
5911
|
+
s0 = peg$f104(s2, s3);
|
|
5768
5912
|
} else {
|
|
5769
5913
|
peg$currPos = s0;
|
|
5770
5914
|
s0 = peg$FAILED;
|
|
@@ -5776,14 +5920,14 @@ function peg$parse(input, options) {
|
|
|
5776
5920
|
peg$silentFails--;
|
|
5777
5921
|
if (s0 === peg$FAILED) {
|
|
5778
5922
|
s1 = peg$FAILED;
|
|
5779
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
5923
|
+
if (peg$silentFails === 0) { peg$fail(peg$e104); }
|
|
5780
5924
|
}
|
|
5781
5925
|
|
|
5782
5926
|
return s0;
|
|
5783
5927
|
}
|
|
5784
5928
|
|
|
5785
5929
|
function peg$parsetemplateLiteralChar() {
|
|
5786
|
-
|
|
5930
|
+
let s0, s1, s2;
|
|
5787
5931
|
|
|
5788
5932
|
s0 = peg$currPos;
|
|
5789
5933
|
s1 = peg$currPos;
|
|
@@ -5801,7 +5945,7 @@ function peg$parse(input, options) {
|
|
|
5801
5945
|
peg$currPos += 2;
|
|
5802
5946
|
} else {
|
|
5803
5947
|
s2 = peg$FAILED;
|
|
5804
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
5948
|
+
if (peg$silentFails === 0) { peg$fail(peg$e102); }
|
|
5805
5949
|
}
|
|
5806
5950
|
}
|
|
5807
5951
|
peg$silentFails--;
|
|
@@ -5828,7 +5972,7 @@ function peg$parse(input, options) {
|
|
|
5828
5972
|
}
|
|
5829
5973
|
|
|
5830
5974
|
function peg$parsetemplateLiteralText() {
|
|
5831
|
-
|
|
5975
|
+
let s0, s1, s2;
|
|
5832
5976
|
|
|
5833
5977
|
s0 = peg$currPos;
|
|
5834
5978
|
s1 = [];
|
|
@@ -5838,14 +5982,14 @@ function peg$parse(input, options) {
|
|
|
5838
5982
|
s2 = peg$parsetemplateLiteralChar();
|
|
5839
5983
|
}
|
|
5840
5984
|
peg$savedPos = s0;
|
|
5841
|
-
s1 = peg$
|
|
5985
|
+
s1 = peg$f105(s1);
|
|
5842
5986
|
s0 = s1;
|
|
5843
5987
|
|
|
5844
5988
|
return s0;
|
|
5845
5989
|
}
|
|
5846
5990
|
|
|
5847
5991
|
function peg$parsetemplateSubstitution() {
|
|
5848
|
-
|
|
5992
|
+
let s0, s1, s2, s3;
|
|
5849
5993
|
|
|
5850
5994
|
peg$silentFails++;
|
|
5851
5995
|
s0 = peg$currPos;
|
|
@@ -5854,7 +5998,7 @@ function peg$parse(input, options) {
|
|
|
5854
5998
|
peg$currPos += 2;
|
|
5855
5999
|
} else {
|
|
5856
6000
|
s1 = peg$FAILED;
|
|
5857
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
6001
|
+
if (peg$silentFails === 0) { peg$fail(peg$e102); }
|
|
5858
6002
|
}
|
|
5859
6003
|
if (s1 !== peg$FAILED) {
|
|
5860
6004
|
s2 = peg$parseexpectExpression();
|
|
@@ -5868,7 +6012,7 @@ function peg$parse(input, options) {
|
|
|
5868
6012
|
}
|
|
5869
6013
|
if (s3 !== peg$FAILED) {
|
|
5870
6014
|
peg$savedPos = s0;
|
|
5871
|
-
s0 = peg$
|
|
6015
|
+
s0 = peg$f106(s2);
|
|
5872
6016
|
} else {
|
|
5873
6017
|
peg$currPos = s0;
|
|
5874
6018
|
s0 = peg$FAILED;
|
|
@@ -5884,14 +6028,14 @@ function peg$parse(input, options) {
|
|
|
5884
6028
|
peg$silentFails--;
|
|
5885
6029
|
if (s0 === peg$FAILED) {
|
|
5886
6030
|
s1 = peg$FAILED;
|
|
5887
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
6031
|
+
if (peg$silentFails === 0) { peg$fail(peg$e105); }
|
|
5888
6032
|
}
|
|
5889
6033
|
|
|
5890
6034
|
return s0;
|
|
5891
6035
|
}
|
|
5892
6036
|
|
|
5893
6037
|
function peg$parsetextChar() {
|
|
5894
|
-
|
|
6038
|
+
let s0;
|
|
5895
6039
|
|
|
5896
6040
|
s0 = peg$parseescapedChar();
|
|
5897
6041
|
if (s0 === peg$FAILED) {
|
|
@@ -5908,7 +6052,7 @@ function peg$parse(input, options) {
|
|
|
5908
6052
|
}
|
|
5909
6053
|
|
|
5910
6054
|
function peg$parseunaryExpression() {
|
|
5911
|
-
|
|
6055
|
+
let s0, s1, s2, s3;
|
|
5912
6056
|
|
|
5913
6057
|
s0 = peg$currPos;
|
|
5914
6058
|
s1 = peg$parseunaryOperator();
|
|
@@ -5917,7 +6061,7 @@ function peg$parse(input, options) {
|
|
|
5917
6061
|
s3 = peg$parseexpectUnaryExpression();
|
|
5918
6062
|
if (s3 !== peg$FAILED) {
|
|
5919
6063
|
peg$savedPos = s0;
|
|
5920
|
-
s0 = peg$
|
|
6064
|
+
s0 = peg$f107(s1, s3);
|
|
5921
6065
|
} else {
|
|
5922
6066
|
peg$currPos = s0;
|
|
5923
6067
|
s0 = peg$FAILED;
|
|
@@ -5934,7 +6078,7 @@ function peg$parse(input, options) {
|
|
|
5934
6078
|
}
|
|
5935
6079
|
|
|
5936
6080
|
function peg$parseuri() {
|
|
5937
|
-
|
|
6081
|
+
let s0, s1, s2, s3, s4, s5, s6;
|
|
5938
6082
|
|
|
5939
6083
|
s0 = peg$currPos;
|
|
5940
6084
|
s1 = peg$parseuriScheme();
|
|
@@ -5974,7 +6118,7 @@ function peg$parse(input, options) {
|
|
|
5974
6118
|
s4 = null;
|
|
5975
6119
|
}
|
|
5976
6120
|
peg$savedPos = s0;
|
|
5977
|
-
s0 = peg$
|
|
6121
|
+
s0 = peg$f108(s1, s3, s4);
|
|
5978
6122
|
} else {
|
|
5979
6123
|
peg$currPos = s0;
|
|
5980
6124
|
s0 = peg$FAILED;
|
|
@@ -5994,7 +6138,7 @@ function peg$parse(input, options) {
|
|
|
5994
6138
|
s2 = peg$parsepathKeys();
|
|
5995
6139
|
if (s2 !== peg$FAILED) {
|
|
5996
6140
|
peg$savedPos = s0;
|
|
5997
|
-
s0 = peg$
|
|
6141
|
+
s0 = peg$f109(s1, s2);
|
|
5998
6142
|
} else {
|
|
5999
6143
|
peg$currPos = s0;
|
|
6000
6144
|
s0 = peg$FAILED;
|
|
@@ -6009,7 +6153,7 @@ function peg$parse(input, options) {
|
|
|
6009
6153
|
}
|
|
6010
6154
|
|
|
6011
6155
|
function peg$parseuriExpression() {
|
|
6012
|
-
|
|
6156
|
+
let s0;
|
|
6013
6157
|
|
|
6014
6158
|
s0 = peg$parseuri();
|
|
6015
6159
|
if (s0 === peg$FAILED) {
|
|
@@ -6023,7 +6167,7 @@ function peg$parse(input, options) {
|
|
|
6023
6167
|
}
|
|
6024
6168
|
|
|
6025
6169
|
function peg$parseuriKey() {
|
|
6026
|
-
|
|
6170
|
+
let s0, s1, s2;
|
|
6027
6171
|
|
|
6028
6172
|
s0 = peg$currPos;
|
|
6029
6173
|
s1 = [];
|
|
@@ -6048,7 +6192,7 @@ function peg$parse(input, options) {
|
|
|
6048
6192
|
s2 = null;
|
|
6049
6193
|
}
|
|
6050
6194
|
peg$savedPos = s0;
|
|
6051
|
-
s0 = peg$
|
|
6195
|
+
s0 = peg$f110(s1);
|
|
6052
6196
|
} else {
|
|
6053
6197
|
peg$currPos = s0;
|
|
6054
6198
|
s0 = peg$FAILED;
|
|
@@ -6064,7 +6208,7 @@ function peg$parse(input, options) {
|
|
|
6064
6208
|
}
|
|
6065
6209
|
if (s1 !== peg$FAILED) {
|
|
6066
6210
|
peg$savedPos = s0;
|
|
6067
|
-
s1 = peg$
|
|
6211
|
+
s1 = peg$f111();
|
|
6068
6212
|
}
|
|
6069
6213
|
s0 = s1;
|
|
6070
6214
|
}
|
|
@@ -6073,7 +6217,7 @@ function peg$parse(input, options) {
|
|
|
6073
6217
|
}
|
|
6074
6218
|
|
|
6075
6219
|
function peg$parseuriKeyChar() {
|
|
6076
|
-
|
|
6220
|
+
let s0, s1, s2, s3;
|
|
6077
6221
|
|
|
6078
6222
|
s0 = peg$currPos;
|
|
6079
6223
|
s1 = input.charAt(peg$currPos);
|
|
@@ -6081,13 +6225,13 @@ function peg$parse(input, options) {
|
|
|
6081
6225
|
peg$currPos++;
|
|
6082
6226
|
} else {
|
|
6083
6227
|
s1 = peg$FAILED;
|
|
6084
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
6228
|
+
if (peg$silentFails === 0) { peg$fail(peg$e106); }
|
|
6085
6229
|
}
|
|
6086
6230
|
if (s1 !== peg$FAILED) {
|
|
6087
6231
|
s2 = peg$currPos;
|
|
6088
6232
|
peg$silentFails++;
|
|
6089
6233
|
peg$savedPos = peg$currPos;
|
|
6090
|
-
s3 = peg$
|
|
6234
|
+
s3 = peg$f112(s1);
|
|
6091
6235
|
if (s3) {
|
|
6092
6236
|
s3 = undefined;
|
|
6093
6237
|
} else {
|
|
@@ -6102,7 +6246,7 @@ function peg$parse(input, options) {
|
|
|
6102
6246
|
}
|
|
6103
6247
|
if (s2 !== peg$FAILED) {
|
|
6104
6248
|
peg$savedPos = s0;
|
|
6105
|
-
s0 = peg$
|
|
6249
|
+
s0 = peg$f113(s1);
|
|
6106
6250
|
} else {
|
|
6107
6251
|
peg$currPos = s0;
|
|
6108
6252
|
s0 = peg$FAILED;
|
|
@@ -6119,7 +6263,7 @@ function peg$parse(input, options) {
|
|
|
6119
6263
|
}
|
|
6120
6264
|
|
|
6121
6265
|
function peg$parseuriPath() {
|
|
6122
|
-
|
|
6266
|
+
let s0, s1, s2, s3;
|
|
6123
6267
|
|
|
6124
6268
|
peg$silentFails++;
|
|
6125
6269
|
s0 = peg$currPos;
|
|
@@ -6138,20 +6282,20 @@ function peg$parse(input, options) {
|
|
|
6138
6282
|
}
|
|
6139
6283
|
if (s1 !== peg$FAILED) {
|
|
6140
6284
|
peg$savedPos = s0;
|
|
6141
|
-
s1 = peg$
|
|
6285
|
+
s1 = peg$f114(s1);
|
|
6142
6286
|
}
|
|
6143
6287
|
s0 = s1;
|
|
6144
6288
|
peg$silentFails--;
|
|
6145
6289
|
if (s0 === peg$FAILED) {
|
|
6146
6290
|
s1 = peg$FAILED;
|
|
6147
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
6291
|
+
if (peg$silentFails === 0) { peg$fail(peg$e107); }
|
|
6148
6292
|
}
|
|
6149
6293
|
|
|
6150
6294
|
return s0;
|
|
6151
6295
|
}
|
|
6152
6296
|
|
|
6153
6297
|
function peg$parseuriScheme() {
|
|
6154
|
-
|
|
6298
|
+
let s0, s1, s2, s3;
|
|
6155
6299
|
|
|
6156
6300
|
s0 = peg$currPos;
|
|
6157
6301
|
s1 = input.charAt(peg$currPos);
|
|
@@ -6159,7 +6303,7 @@ function peg$parse(input, options) {
|
|
|
6159
6303
|
peg$currPos++;
|
|
6160
6304
|
} else {
|
|
6161
6305
|
s1 = peg$FAILED;
|
|
6162
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
6306
|
+
if (peg$silentFails === 0) { peg$fail(peg$e108); }
|
|
6163
6307
|
}
|
|
6164
6308
|
if (s1 !== peg$FAILED) {
|
|
6165
6309
|
s2 = [];
|
|
@@ -6168,7 +6312,7 @@ function peg$parse(input, options) {
|
|
|
6168
6312
|
peg$currPos++;
|
|
6169
6313
|
} else {
|
|
6170
6314
|
s3 = peg$FAILED;
|
|
6171
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
6315
|
+
if (peg$silentFails === 0) { peg$fail(peg$e109); }
|
|
6172
6316
|
}
|
|
6173
6317
|
while (s3 !== peg$FAILED) {
|
|
6174
6318
|
s2.push(s3);
|
|
@@ -6177,7 +6321,7 @@ function peg$parse(input, options) {
|
|
|
6177
6321
|
peg$currPos++;
|
|
6178
6322
|
} else {
|
|
6179
6323
|
s3 = peg$FAILED;
|
|
6180
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
6324
|
+
if (peg$silentFails === 0) { peg$fail(peg$e109); }
|
|
6181
6325
|
}
|
|
6182
6326
|
}
|
|
6183
6327
|
s3 = input.charAt(peg$currPos);
|
|
@@ -6185,11 +6329,11 @@ function peg$parse(input, options) {
|
|
|
6185
6329
|
peg$currPos++;
|
|
6186
6330
|
} else {
|
|
6187
6331
|
s3 = peg$FAILED;
|
|
6188
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
6332
|
+
if (peg$silentFails === 0) { peg$fail(peg$e110); }
|
|
6189
6333
|
}
|
|
6190
6334
|
if (s3 !== peg$FAILED) {
|
|
6191
6335
|
peg$savedPos = s0;
|
|
6192
|
-
s0 = peg$
|
|
6336
|
+
s0 = peg$f115();
|
|
6193
6337
|
} else {
|
|
6194
6338
|
peg$currPos = s0;
|
|
6195
6339
|
s0 = peg$FAILED;
|
|
@@ -6203,7 +6347,7 @@ function peg$parse(input, options) {
|
|
|
6203
6347
|
}
|
|
6204
6348
|
|
|
6205
6349
|
function peg$parseunaryOperator() {
|
|
6206
|
-
|
|
6350
|
+
let s0, s1, s2, s3;
|
|
6207
6351
|
|
|
6208
6352
|
s0 = input.charAt(peg$currPos);
|
|
6209
6353
|
if (peg$r3.test(s0)) {
|
|
@@ -6219,7 +6363,7 @@ function peg$parse(input, options) {
|
|
|
6219
6363
|
peg$currPos++;
|
|
6220
6364
|
} else {
|
|
6221
6365
|
s1 = peg$FAILED;
|
|
6222
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
6366
|
+
if (peg$silentFails === 0) { peg$fail(peg$e111); }
|
|
6223
6367
|
}
|
|
6224
6368
|
if (s1 !== peg$FAILED) {
|
|
6225
6369
|
s2 = peg$currPos;
|
|
@@ -6229,7 +6373,7 @@ function peg$parse(input, options) {
|
|
|
6229
6373
|
peg$currPos++;
|
|
6230
6374
|
} else {
|
|
6231
6375
|
s3 = peg$FAILED;
|
|
6232
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
6376
|
+
if (peg$silentFails === 0) { peg$fail(peg$e112); }
|
|
6233
6377
|
}
|
|
6234
6378
|
peg$silentFails--;
|
|
6235
6379
|
if (s3 === peg$FAILED) {
|
|
@@ -6257,7 +6401,7 @@ function peg$parse(input, options) {
|
|
|
6257
6401
|
}
|
|
6258
6402
|
|
|
6259
6403
|
function peg$parsewhitespace() {
|
|
6260
|
-
|
|
6404
|
+
let s0, s1;
|
|
6261
6405
|
|
|
6262
6406
|
s0 = [];
|
|
6263
6407
|
s1 = peg$parsewhitespaceChar();
|
|
@@ -6280,7 +6424,7 @@ function peg$parse(input, options) {
|
|
|
6280
6424
|
}
|
|
6281
6425
|
|
|
6282
6426
|
function peg$parsewhitespaceChar() {
|
|
6283
|
-
|
|
6427
|
+
let s0, s1, s2;
|
|
6284
6428
|
|
|
6285
6429
|
s0 = peg$currPos;
|
|
6286
6430
|
if (input.length > peg$currPos) {
|
|
@@ -6292,7 +6436,7 @@ function peg$parse(input, options) {
|
|
|
6292
6436
|
}
|
|
6293
6437
|
if (s1 !== peg$FAILED) {
|
|
6294
6438
|
peg$savedPos = peg$currPos;
|
|
6295
|
-
s2 = peg$
|
|
6439
|
+
s2 = peg$f116(s1);
|
|
6296
6440
|
if (s2) {
|
|
6297
6441
|
s2 = undefined;
|
|
6298
6442
|
} else {
|
|
@@ -6300,7 +6444,7 @@ function peg$parse(input, options) {
|
|
|
6300
6444
|
}
|
|
6301
6445
|
if (s2 !== peg$FAILED) {
|
|
6302
6446
|
peg$savedPos = s0;
|
|
6303
|
-
s0 = peg$
|
|
6447
|
+
s0 = peg$f117(s1);
|
|
6304
6448
|
} else {
|
|
6305
6449
|
peg$currPos = s0;
|
|
6306
6450
|
s0 = peg$FAILED;
|
|
@@ -6313,8 +6457,28 @@ function peg$parse(input, options) {
|
|
|
6313
6457
|
return s0;
|
|
6314
6458
|
}
|
|
6315
6459
|
|
|
6460
|
+
function peg$parsewhitespaceOptionalForProgram() {
|
|
6461
|
+
let s0, s1, s2;
|
|
6462
|
+
|
|
6463
|
+
s0 = peg$currPos;
|
|
6464
|
+
s1 = peg$parseprogramMode();
|
|
6465
|
+
if (s1 !== peg$FAILED) {
|
|
6466
|
+
s2 = peg$parse__();
|
|
6467
|
+
s1 = [s1, s2];
|
|
6468
|
+
s0 = s1;
|
|
6469
|
+
} else {
|
|
6470
|
+
peg$currPos = s0;
|
|
6471
|
+
s0 = peg$FAILED;
|
|
6472
|
+
}
|
|
6473
|
+
if (s0 === peg$FAILED) {
|
|
6474
|
+
s0 = peg$parseshellMode();
|
|
6475
|
+
}
|
|
6476
|
+
|
|
6477
|
+
return s0;
|
|
6478
|
+
}
|
|
6479
|
+
|
|
6316
6480
|
function peg$parsewhitespaceWithNewLine() {
|
|
6317
|
-
|
|
6481
|
+
let s0, s1, s2, s3, s4;
|
|
6318
6482
|
|
|
6319
6483
|
s0 = peg$currPos;
|
|
6320
6484
|
s1 = [];
|
|
@@ -6342,30 +6506,36 @@ function peg$parse(input, options) {
|
|
|
6342
6506
|
|
|
6343
6507
|
peg$result = peg$startRuleFunction();
|
|
6344
6508
|
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
peg$result,
|
|
6348
|
-
peg$currPos,
|
|
6349
|
-
peg$FAILED,
|
|
6350
|
-
peg$maxFailExpected,
|
|
6351
|
-
peg$maxFailPos
|
|
6352
|
-
});
|
|
6353
|
-
}
|
|
6354
|
-
if (peg$result !== peg$FAILED && peg$currPos === input.length) {
|
|
6355
|
-
return peg$result;
|
|
6356
|
-
} else {
|
|
6509
|
+
const peg$success = (peg$result !== peg$FAILED && peg$currPos === input.length);
|
|
6510
|
+
function peg$throw() {
|
|
6357
6511
|
if (peg$result !== peg$FAILED && peg$currPos < input.length) {
|
|
6358
6512
|
peg$fail(peg$endExpectation());
|
|
6359
6513
|
}
|
|
6360
6514
|
|
|
6361
6515
|
throw peg$buildStructuredError(
|
|
6362
6516
|
peg$maxFailExpected,
|
|
6363
|
-
peg$maxFailPos < input.length ?
|
|
6517
|
+
peg$maxFailPos < input.length ? peg$getUnicode(peg$maxFailPos) : null,
|
|
6364
6518
|
peg$maxFailPos < input.length
|
|
6365
6519
|
? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)
|
|
6366
6520
|
: peg$computeLocation(peg$maxFailPos, peg$maxFailPos)
|
|
6367
6521
|
);
|
|
6368
6522
|
}
|
|
6523
|
+
if (options.peg$library) {
|
|
6524
|
+
return /** @type {any} */ ({
|
|
6525
|
+
peg$result,
|
|
6526
|
+
peg$currPos,
|
|
6527
|
+
peg$FAILED,
|
|
6528
|
+
peg$maxFailExpected,
|
|
6529
|
+
peg$maxFailPos,
|
|
6530
|
+
peg$success,
|
|
6531
|
+
peg$throw: peg$success ? undefined : peg$throw,
|
|
6532
|
+
});
|
|
6533
|
+
}
|
|
6534
|
+
if (peg$success) {
|
|
6535
|
+
return peg$result;
|
|
6536
|
+
} else {
|
|
6537
|
+
peg$throw();
|
|
6538
|
+
}
|
|
6369
6539
|
}
|
|
6370
6540
|
|
|
6371
6541
|
const peg$allowedStartRules = [
|
|
@@ -6508,6 +6678,7 @@ const peg$allowedStartRules = [
|
|
|
6508
6678
|
"unaryOperator",
|
|
6509
6679
|
"whitespace",
|
|
6510
6680
|
"whitespaceChar",
|
|
6681
|
+
"whitespaceOptionalForProgram",
|
|
6511
6682
|
"whitespaceWithNewLine"
|
|
6512
6683
|
];
|
|
6513
6684
|
|