simplex-lang 0.0.7 → 0.1.0
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/build/parser/index.js +765 -192
- package/build/parser/index.js.map +1 -1
- package/build/src/compiler.js +120 -19
- package/build/src/compiler.js.map +1 -1
- package/build/src/errors.d.ts +5 -0
- package/build/src/errors.js +9 -0
- package/build/src/errors.js.map +1 -1
- package/build/src/simplex-tree.d.ts +24 -2
- package/build/src/version.js +1 -1
- package/package.json +1 -1
- package/parser/index.js +726 -192
- package/parser/index.js.map +1 -1
- package/src/compiler.ts +153 -20
- package/src/errors.ts +11 -0
- package/src/simplex-tree.ts +29 -1
- package/src/simplex.peggy +78 -2
package/parser/index.js
CHANGED
|
@@ -261,25 +261,31 @@ function peg$parse(input, options) {
|
|
|
261
261
|
var peg$c29 = "true";
|
|
262
262
|
var peg$c30 = "typeof";
|
|
263
263
|
var peg$c31 = "mod";
|
|
264
|
-
var peg$c32 = "
|
|
265
|
-
var peg$c33 = "
|
|
266
|
-
var peg$c34 = "
|
|
267
|
-
var peg$c35 = "
|
|
268
|
-
var peg$c36 = "
|
|
269
|
-
var peg$c37 = "
|
|
270
|
-
var peg$c38 = "
|
|
271
|
-
var peg$c39 = "
|
|
272
|
-
var peg$c40 = "
|
|
273
|
-
var peg$c41 = "
|
|
274
|
-
var peg$c42 = "
|
|
275
|
-
var peg$c43 = "
|
|
276
|
-
var peg$c44 = "
|
|
277
|
-
var peg$c45 = "
|
|
278
|
-
var peg$c46 = "
|
|
279
|
-
var peg$c47 = "
|
|
280
|
-
var peg$c48 = "
|
|
281
|
-
var peg$c49 = "
|
|
282
|
-
var peg$c50 = "
|
|
264
|
+
var peg$c32 = "let";
|
|
265
|
+
var peg$c33 = ";";
|
|
266
|
+
var peg$c34 = "}";
|
|
267
|
+
var peg$c35 = "(";
|
|
268
|
+
var peg$c36 = ")";
|
|
269
|
+
var peg$c37 = "[";
|
|
270
|
+
var peg$c38 = "]";
|
|
271
|
+
var peg$c39 = ",";
|
|
272
|
+
var peg$c40 = "{";
|
|
273
|
+
var peg$c41 = ":";
|
|
274
|
+
var peg$c42 = "::";
|
|
275
|
+
var peg$c43 = "%";
|
|
276
|
+
var peg$c44 = "^";
|
|
277
|
+
var peg$c45 = "&";
|
|
278
|
+
var peg$c46 = "<=";
|
|
279
|
+
var peg$c47 = ">=";
|
|
280
|
+
var peg$c48 = "==";
|
|
281
|
+
var peg$c49 = "!=";
|
|
282
|
+
var peg$c50 = "&&";
|
|
283
|
+
var peg$c51 = "||";
|
|
284
|
+
var peg$c52 = "??";
|
|
285
|
+
var peg$c53 = "|?";
|
|
286
|
+
var peg$c54 = "|";
|
|
287
|
+
var peg$c55 = "=>";
|
|
288
|
+
var peg$c56 = "=";
|
|
283
289
|
|
|
284
290
|
var peg$r0 = /^[\t\v-\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]/;
|
|
285
291
|
var peg$r1 = /^[\n\r\u2028\u2029]/;
|
|
@@ -375,27 +381,33 @@ function peg$parse(input, options) {
|
|
|
375
381
|
var peg$e62 = peg$literalExpectation("true", false);
|
|
376
382
|
var peg$e63 = peg$literalExpectation("typeof", false);
|
|
377
383
|
var peg$e64 = peg$literalExpectation("mod", false);
|
|
378
|
-
var peg$e65 = peg$literalExpectation("
|
|
379
|
-
var peg$e66 = peg$literalExpectation("
|
|
380
|
-
var peg$e67 = peg$literalExpectation("
|
|
381
|
-
var peg$e68 = peg$literalExpectation("
|
|
382
|
-
var peg$e69 = peg$literalExpectation("
|
|
383
|
-
var peg$e70 = peg$literalExpectation("
|
|
384
|
-
var peg$e71 = peg$literalExpectation("
|
|
385
|
-
var peg$e72 = peg$literalExpectation("
|
|
386
|
-
var peg$e73 = peg$literalExpectation("
|
|
387
|
-
var peg$e74 = peg$literalExpectation("
|
|
388
|
-
var peg$e75 = peg$literalExpectation("
|
|
389
|
-
var peg$e76 = peg$
|
|
390
|
-
var peg$e77 = peg$literalExpectation("
|
|
391
|
-
var peg$e78 = peg$
|
|
392
|
-
var peg$e79 = peg$literalExpectation("
|
|
393
|
-
var peg$e80 = peg$
|
|
394
|
-
var peg$e81 = peg$literalExpectation("
|
|
395
|
-
var peg$e82 = peg$
|
|
396
|
-
var peg$e83 = peg$literalExpectation("
|
|
397
|
-
var peg$e84 = peg$literalExpectation("
|
|
398
|
-
var peg$e85 = peg$literalExpectation("
|
|
384
|
+
var peg$e65 = peg$literalExpectation("let", false);
|
|
385
|
+
var peg$e66 = peg$literalExpectation(";", false);
|
|
386
|
+
var peg$e67 = peg$literalExpectation("}", false);
|
|
387
|
+
var peg$e68 = peg$literalExpectation("(", false);
|
|
388
|
+
var peg$e69 = peg$literalExpectation(")", false);
|
|
389
|
+
var peg$e70 = peg$literalExpectation("[", false);
|
|
390
|
+
var peg$e71 = peg$literalExpectation("]", false);
|
|
391
|
+
var peg$e72 = peg$literalExpectation(",", false);
|
|
392
|
+
var peg$e73 = peg$literalExpectation("{", false);
|
|
393
|
+
var peg$e74 = peg$literalExpectation(":", false);
|
|
394
|
+
var peg$e75 = peg$literalExpectation("::", false);
|
|
395
|
+
var peg$e76 = peg$literalExpectation("%", false);
|
|
396
|
+
var peg$e77 = peg$literalExpectation("^", false);
|
|
397
|
+
var peg$e78 = peg$classExpectation(["*", "/"], false, false);
|
|
398
|
+
var peg$e79 = peg$literalExpectation("&", false);
|
|
399
|
+
var peg$e80 = peg$literalExpectation("<=", false);
|
|
400
|
+
var peg$e81 = peg$literalExpectation(">=", false);
|
|
401
|
+
var peg$e82 = peg$classExpectation(["<", ">"], false, false);
|
|
402
|
+
var peg$e83 = peg$literalExpectation("==", false);
|
|
403
|
+
var peg$e84 = peg$literalExpectation("!=", false);
|
|
404
|
+
var peg$e85 = peg$literalExpectation("&&", false);
|
|
405
|
+
var peg$e86 = peg$literalExpectation("||", false);
|
|
406
|
+
var peg$e87 = peg$literalExpectation("??", false);
|
|
407
|
+
var peg$e88 = peg$literalExpectation("|?", false);
|
|
408
|
+
var peg$e89 = peg$literalExpectation("|", false);
|
|
409
|
+
var peg$e90 = peg$literalExpectation("=>", false);
|
|
410
|
+
var peg$e91 = peg$literalExpectation("=", false);
|
|
399
411
|
|
|
400
412
|
var peg$f0 = function(statement) { return statement; };
|
|
401
413
|
var peg$f1 = function(name) { return name; };
|
|
@@ -629,8 +641,14 @@ function peg$parse(input, options) {
|
|
|
629
641
|
var peg$f53 = function(head, tail) {
|
|
630
642
|
return buildList(head, tail, 3);
|
|
631
643
|
};
|
|
632
|
-
var peg$f54 = function(
|
|
633
|
-
|
|
644
|
+
var peg$f54 = function() {
|
|
645
|
+
return {
|
|
646
|
+
type: 'CurryPlaceholder',
|
|
647
|
+
location: getLocation(location())
|
|
648
|
+
}
|
|
649
|
+
};
|
|
650
|
+
var peg$f55 = function(head, tail) { return buildBinaryExpression(head, tail, location()); };
|
|
651
|
+
var peg$f56 = function(operator, argument) {
|
|
634
652
|
return {
|
|
635
653
|
type: "UnaryExpression",
|
|
636
654
|
operator: operator,
|
|
@@ -639,14 +657,14 @@ function peg$parse(input, options) {
|
|
|
639
657
|
location: getLocation(location())
|
|
640
658
|
};
|
|
641
659
|
};
|
|
642
|
-
var peg$f56 = function(head, tail) { return buildBinaryExpression(head, tail, location()); };
|
|
643
660
|
var peg$f57 = function(head, tail) { return buildBinaryExpression(head, tail, location()); };
|
|
644
661
|
var peg$f58 = function(head, tail) { return buildBinaryExpression(head, tail, location()); };
|
|
645
662
|
var peg$f59 = function(head, tail) { return buildBinaryExpression(head, tail, location()); };
|
|
646
663
|
var peg$f60 = function(head, tail) { return buildBinaryExpression(head, tail, location()); };
|
|
647
|
-
var peg$f61 = function(head, tail) { return
|
|
664
|
+
var peg$f61 = function(head, tail) { return buildBinaryExpression(head, tail, location()); };
|
|
648
665
|
var peg$f62 = function(head, tail) { return buildLogicalExpression(head, tail, location()); };
|
|
649
|
-
var peg$f63 = function(
|
|
666
|
+
var peg$f63 = function(head, tail) { return buildLogicalExpression(head, tail, location()); };
|
|
667
|
+
var peg$f64 = function(test, consequent, alternate) {
|
|
650
668
|
return {
|
|
651
669
|
type: "ConditionalExpression",
|
|
652
670
|
test: test,
|
|
@@ -655,7 +673,7 @@ function peg$parse(input, options) {
|
|
|
655
673
|
location: getLocation(location())
|
|
656
674
|
};
|
|
657
675
|
};
|
|
658
|
-
var peg$
|
|
676
|
+
var peg$f65 = function(test, consequent) {
|
|
659
677
|
return {
|
|
660
678
|
type: "ConditionalExpression",
|
|
661
679
|
test: test,
|
|
@@ -664,19 +682,58 @@ function peg$parse(input, options) {
|
|
|
664
682
|
location: getLocation(location())
|
|
665
683
|
};
|
|
666
684
|
};
|
|
667
|
-
var peg$
|
|
685
|
+
var peg$f66 = function(head, tail) {
|
|
668
686
|
return buildExpression(
|
|
669
687
|
"NullishCoalescingExpression",
|
|
670
688
|
head, tail, getLocation(location())
|
|
671
689
|
);
|
|
672
690
|
};
|
|
673
|
-
var peg$
|
|
674
|
-
var peg$
|
|
691
|
+
var peg$f67 = function(head, operator, expression) { return { operator, expression } };
|
|
692
|
+
var peg$f68 = function(head, tail) {
|
|
675
693
|
return tail.length > 0
|
|
676
694
|
? { type: "PipeSequence", head, tail, location: getLocation(location()) }
|
|
677
695
|
: head
|
|
678
696
|
};
|
|
679
|
-
var peg$
|
|
697
|
+
var peg$f69 = function(params, body) {
|
|
698
|
+
return {
|
|
699
|
+
type: "LambdaExpression",
|
|
700
|
+
params: optionalList(extractOptional(params, 0)),
|
|
701
|
+
expression: body,
|
|
702
|
+
location: getLocation(location())
|
|
703
|
+
};
|
|
704
|
+
};
|
|
705
|
+
var peg$f70 = function(param, body) {
|
|
706
|
+
return {
|
|
707
|
+
type: "LambdaExpression",
|
|
708
|
+
params: [param],
|
|
709
|
+
expression: body,
|
|
710
|
+
location: getLocation(location())
|
|
711
|
+
}
|
|
712
|
+
};
|
|
713
|
+
var peg$f71 = function(head, tail) {
|
|
714
|
+
return buildList(head, tail, 3);
|
|
715
|
+
};
|
|
716
|
+
var peg$f72 = function(declarations, body) {
|
|
717
|
+
return {
|
|
718
|
+
type: "LetExpression",
|
|
719
|
+
declarations,
|
|
720
|
+
expression: body,
|
|
721
|
+
location: getLocation(location())
|
|
722
|
+
}
|
|
723
|
+
};
|
|
724
|
+
var peg$f73 = function(head, tail) {
|
|
725
|
+
return buildList(head, tail, 3);
|
|
726
|
+
};
|
|
727
|
+
var peg$f74 = function(id, init) {
|
|
728
|
+
return {
|
|
729
|
+
type: "VariableDeclarator",
|
|
730
|
+
id: id,
|
|
731
|
+
init: extractOptional(init, 1),
|
|
732
|
+
location: getLocation(location())
|
|
733
|
+
};
|
|
734
|
+
};
|
|
735
|
+
var peg$f75 = function(expression) { return expression; };
|
|
736
|
+
var peg$f76 = function(expression) {
|
|
680
737
|
return {
|
|
681
738
|
type: "ExpressionStatement",
|
|
682
739
|
expression: expression
|
|
@@ -1416,6 +1473,9 @@ function peg$parse(input, options) {
|
|
|
1416
1473
|
s0 = peg$parseThenToken();
|
|
1417
1474
|
if (s0 === peg$FAILED) {
|
|
1418
1475
|
s0 = peg$parseTypeofToken();
|
|
1476
|
+
if (s0 === peg$FAILED) {
|
|
1477
|
+
s0 = peg$parseLetToken();
|
|
1478
|
+
}
|
|
1419
1479
|
}
|
|
1420
1480
|
}
|
|
1421
1481
|
}
|
|
@@ -2980,6 +3040,43 @@ function peg$parse(input, options) {
|
|
|
2980
3040
|
return s0;
|
|
2981
3041
|
}
|
|
2982
3042
|
|
|
3043
|
+
function peg$parseLetToken() {
|
|
3044
|
+
var s0, s1, s2, s3;
|
|
3045
|
+
|
|
3046
|
+
s0 = peg$currPos;
|
|
3047
|
+
if (input.substr(peg$currPos, 3) === peg$c32) {
|
|
3048
|
+
s1 = peg$c32;
|
|
3049
|
+
peg$currPos += 3;
|
|
3050
|
+
} else {
|
|
3051
|
+
s1 = peg$FAILED;
|
|
3052
|
+
if (peg$silentFails === 0) { peg$fail(peg$e65); }
|
|
3053
|
+
}
|
|
3054
|
+
if (s1 !== peg$FAILED) {
|
|
3055
|
+
s2 = peg$currPos;
|
|
3056
|
+
peg$silentFails++;
|
|
3057
|
+
s3 = peg$parseIdentifierPart();
|
|
3058
|
+
peg$silentFails--;
|
|
3059
|
+
if (s3 === peg$FAILED) {
|
|
3060
|
+
s2 = undefined;
|
|
3061
|
+
} else {
|
|
3062
|
+
peg$currPos = s2;
|
|
3063
|
+
s2 = peg$FAILED;
|
|
3064
|
+
}
|
|
3065
|
+
if (s2 !== peg$FAILED) {
|
|
3066
|
+
s1 = [s1, s2];
|
|
3067
|
+
s0 = s1;
|
|
3068
|
+
} else {
|
|
3069
|
+
peg$currPos = s0;
|
|
3070
|
+
s0 = peg$FAILED;
|
|
3071
|
+
}
|
|
3072
|
+
} else {
|
|
3073
|
+
peg$currPos = s0;
|
|
3074
|
+
s0 = peg$FAILED;
|
|
3075
|
+
}
|
|
3076
|
+
|
|
3077
|
+
return s0;
|
|
3078
|
+
}
|
|
3079
|
+
|
|
2983
3080
|
function peg$parse__() {
|
|
2984
3081
|
var s0, s1;
|
|
2985
3082
|
|
|
@@ -3030,11 +3127,11 @@ function peg$parse(input, options) {
|
|
|
3030
3127
|
s0 = peg$currPos;
|
|
3031
3128
|
s1 = peg$parse__();
|
|
3032
3129
|
if (input.charCodeAt(peg$currPos) === 59) {
|
|
3033
|
-
s2 = peg$
|
|
3130
|
+
s2 = peg$c33;
|
|
3034
3131
|
peg$currPos++;
|
|
3035
3132
|
} else {
|
|
3036
3133
|
s2 = peg$FAILED;
|
|
3037
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3134
|
+
if (peg$silentFails === 0) { peg$fail(peg$e66); }
|
|
3038
3135
|
}
|
|
3039
3136
|
if (s2 !== peg$FAILED) {
|
|
3040
3137
|
s1 = [s1, s2];
|
|
@@ -3064,11 +3161,11 @@ function peg$parse(input, options) {
|
|
|
3064
3161
|
s2 = peg$currPos;
|
|
3065
3162
|
peg$silentFails++;
|
|
3066
3163
|
if (input.charCodeAt(peg$currPos) === 125) {
|
|
3067
|
-
s3 = peg$
|
|
3164
|
+
s3 = peg$c34;
|
|
3068
3165
|
peg$currPos++;
|
|
3069
3166
|
} else {
|
|
3070
3167
|
s3 = peg$FAILED;
|
|
3071
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3168
|
+
if (peg$silentFails === 0) { peg$fail(peg$e67); }
|
|
3072
3169
|
}
|
|
3073
3170
|
peg$silentFails--;
|
|
3074
3171
|
if (s3 !== peg$FAILED) {
|
|
@@ -3138,23 +3235,23 @@ function peg$parse(input, options) {
|
|
|
3138
3235
|
if (s0 === peg$FAILED) {
|
|
3139
3236
|
s0 = peg$currPos;
|
|
3140
3237
|
if (input.charCodeAt(peg$currPos) === 40) {
|
|
3141
|
-
s1 = peg$
|
|
3238
|
+
s1 = peg$c35;
|
|
3142
3239
|
peg$currPos++;
|
|
3143
3240
|
} else {
|
|
3144
3241
|
s1 = peg$FAILED;
|
|
3145
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3242
|
+
if (peg$silentFails === 0) { peg$fail(peg$e68); }
|
|
3146
3243
|
}
|
|
3147
3244
|
if (s1 !== peg$FAILED) {
|
|
3148
3245
|
s2 = peg$parse__();
|
|
3149
|
-
s3 = peg$
|
|
3246
|
+
s3 = peg$parseExpression();
|
|
3150
3247
|
if (s3 !== peg$FAILED) {
|
|
3151
3248
|
s4 = peg$parse__();
|
|
3152
3249
|
if (input.charCodeAt(peg$currPos) === 41) {
|
|
3153
|
-
s5 = peg$
|
|
3250
|
+
s5 = peg$c36;
|
|
3154
3251
|
peg$currPos++;
|
|
3155
3252
|
} else {
|
|
3156
3253
|
s5 = peg$FAILED;
|
|
3157
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3254
|
+
if (peg$silentFails === 0) { peg$fail(peg$e69); }
|
|
3158
3255
|
}
|
|
3159
3256
|
if (s5 !== peg$FAILED) {
|
|
3160
3257
|
peg$savedPos = s0;
|
|
@@ -3184,11 +3281,11 @@ function peg$parse(input, options) {
|
|
|
3184
3281
|
|
|
3185
3282
|
s0 = peg$currPos;
|
|
3186
3283
|
if (input.charCodeAt(peg$currPos) === 91) {
|
|
3187
|
-
s1 = peg$
|
|
3284
|
+
s1 = peg$c37;
|
|
3188
3285
|
peg$currPos++;
|
|
3189
3286
|
} else {
|
|
3190
3287
|
s1 = peg$FAILED;
|
|
3191
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3288
|
+
if (peg$silentFails === 0) { peg$fail(peg$e70); }
|
|
3192
3289
|
}
|
|
3193
3290
|
if (s1 !== peg$FAILED) {
|
|
3194
3291
|
s2 = peg$parse__();
|
|
@@ -3206,11 +3303,11 @@ function peg$parse(input, options) {
|
|
|
3206
3303
|
s3 = null;
|
|
3207
3304
|
}
|
|
3208
3305
|
if (input.charCodeAt(peg$currPos) === 93) {
|
|
3209
|
-
s4 = peg$
|
|
3306
|
+
s4 = peg$c38;
|
|
3210
3307
|
peg$currPos++;
|
|
3211
3308
|
} else {
|
|
3212
3309
|
s4 = peg$FAILED;
|
|
3213
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3310
|
+
if (peg$silentFails === 0) { peg$fail(peg$e71); }
|
|
3214
3311
|
}
|
|
3215
3312
|
if (s4 !== peg$FAILED) {
|
|
3216
3313
|
peg$savedPos = s0;
|
|
@@ -3226,11 +3323,11 @@ function peg$parse(input, options) {
|
|
|
3226
3323
|
if (s0 === peg$FAILED) {
|
|
3227
3324
|
s0 = peg$currPos;
|
|
3228
3325
|
if (input.charCodeAt(peg$currPos) === 91) {
|
|
3229
|
-
s1 = peg$
|
|
3326
|
+
s1 = peg$c37;
|
|
3230
3327
|
peg$currPos++;
|
|
3231
3328
|
} else {
|
|
3232
3329
|
s1 = peg$FAILED;
|
|
3233
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3330
|
+
if (peg$silentFails === 0) { peg$fail(peg$e70); }
|
|
3234
3331
|
}
|
|
3235
3332
|
if (s1 !== peg$FAILED) {
|
|
3236
3333
|
s2 = peg$parse__();
|
|
@@ -3238,11 +3335,11 @@ function peg$parse(input, options) {
|
|
|
3238
3335
|
if (s3 !== peg$FAILED) {
|
|
3239
3336
|
s4 = peg$parse__();
|
|
3240
3337
|
if (input.charCodeAt(peg$currPos) === 93) {
|
|
3241
|
-
s5 = peg$
|
|
3338
|
+
s5 = peg$c38;
|
|
3242
3339
|
peg$currPos++;
|
|
3243
3340
|
} else {
|
|
3244
3341
|
s5 = peg$FAILED;
|
|
3245
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3342
|
+
if (peg$silentFails === 0) { peg$fail(peg$e71); }
|
|
3246
3343
|
}
|
|
3247
3344
|
if (s5 !== peg$FAILED) {
|
|
3248
3345
|
peg$savedPos = s0;
|
|
@@ -3262,11 +3359,11 @@ function peg$parse(input, options) {
|
|
|
3262
3359
|
if (s0 === peg$FAILED) {
|
|
3263
3360
|
s0 = peg$currPos;
|
|
3264
3361
|
if (input.charCodeAt(peg$currPos) === 91) {
|
|
3265
|
-
s1 = peg$
|
|
3362
|
+
s1 = peg$c37;
|
|
3266
3363
|
peg$currPos++;
|
|
3267
3364
|
} else {
|
|
3268
3365
|
s1 = peg$FAILED;
|
|
3269
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3366
|
+
if (peg$silentFails === 0) { peg$fail(peg$e70); }
|
|
3270
3367
|
}
|
|
3271
3368
|
if (s1 !== peg$FAILED) {
|
|
3272
3369
|
s2 = peg$parse__();
|
|
@@ -3274,11 +3371,11 @@ function peg$parse(input, options) {
|
|
|
3274
3371
|
if (s3 !== peg$FAILED) {
|
|
3275
3372
|
s4 = peg$parse__();
|
|
3276
3373
|
if (input.charCodeAt(peg$currPos) === 44) {
|
|
3277
|
-
s5 = peg$
|
|
3374
|
+
s5 = peg$c39;
|
|
3278
3375
|
peg$currPos++;
|
|
3279
3376
|
} else {
|
|
3280
3377
|
s5 = peg$FAILED;
|
|
3281
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3378
|
+
if (peg$silentFails === 0) { peg$fail(peg$e72); }
|
|
3282
3379
|
}
|
|
3283
3380
|
if (s5 !== peg$FAILED) {
|
|
3284
3381
|
s6 = peg$parse__();
|
|
@@ -3296,11 +3393,11 @@ function peg$parse(input, options) {
|
|
|
3296
3393
|
s7 = null;
|
|
3297
3394
|
}
|
|
3298
3395
|
if (input.charCodeAt(peg$currPos) === 93) {
|
|
3299
|
-
s8 = peg$
|
|
3396
|
+
s8 = peg$c38;
|
|
3300
3397
|
peg$currPos++;
|
|
3301
3398
|
} else {
|
|
3302
3399
|
s8 = peg$FAILED;
|
|
3303
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3400
|
+
if (peg$silentFails === 0) { peg$fail(peg$e71); }
|
|
3304
3401
|
}
|
|
3305
3402
|
if (s8 !== peg$FAILED) {
|
|
3306
3403
|
peg$savedPos = s0;
|
|
@@ -3345,7 +3442,7 @@ function peg$parse(input, options) {
|
|
|
3345
3442
|
if (s2 === peg$FAILED) {
|
|
3346
3443
|
s2 = null;
|
|
3347
3444
|
}
|
|
3348
|
-
s3 = peg$
|
|
3445
|
+
s3 = peg$parseExpression();
|
|
3349
3446
|
if (s3 !== peg$FAILED) {
|
|
3350
3447
|
peg$savedPos = s1;
|
|
3351
3448
|
s1 = peg$f34(s2, s3);
|
|
@@ -3358,11 +3455,11 @@ function peg$parse(input, options) {
|
|
|
3358
3455
|
s3 = peg$currPos;
|
|
3359
3456
|
s4 = peg$parse__();
|
|
3360
3457
|
if (input.charCodeAt(peg$currPos) === 44) {
|
|
3361
|
-
s5 = peg$
|
|
3458
|
+
s5 = peg$c39;
|
|
3362
3459
|
peg$currPos++;
|
|
3363
3460
|
} else {
|
|
3364
3461
|
s5 = peg$FAILED;
|
|
3365
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3462
|
+
if (peg$silentFails === 0) { peg$fail(peg$e72); }
|
|
3366
3463
|
}
|
|
3367
3464
|
if (s5 !== peg$FAILED) {
|
|
3368
3465
|
s6 = peg$parse__();
|
|
@@ -3379,7 +3476,7 @@ function peg$parse(input, options) {
|
|
|
3379
3476
|
if (s7 === peg$FAILED) {
|
|
3380
3477
|
s7 = null;
|
|
3381
3478
|
}
|
|
3382
|
-
s8 = peg$
|
|
3479
|
+
s8 = peg$parseExpression();
|
|
3383
3480
|
if (s8 !== peg$FAILED) {
|
|
3384
3481
|
peg$savedPos = s3;
|
|
3385
3482
|
s3 = peg$f35(s1, s7, s8);
|
|
@@ -3396,11 +3493,11 @@ function peg$parse(input, options) {
|
|
|
3396
3493
|
s3 = peg$currPos;
|
|
3397
3494
|
s4 = peg$parse__();
|
|
3398
3495
|
if (input.charCodeAt(peg$currPos) === 44) {
|
|
3399
|
-
s5 = peg$
|
|
3496
|
+
s5 = peg$c39;
|
|
3400
3497
|
peg$currPos++;
|
|
3401
3498
|
} else {
|
|
3402
3499
|
s5 = peg$FAILED;
|
|
3403
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3500
|
+
if (peg$silentFails === 0) { peg$fail(peg$e72); }
|
|
3404
3501
|
}
|
|
3405
3502
|
if (s5 !== peg$FAILED) {
|
|
3406
3503
|
s6 = peg$parse__();
|
|
@@ -3417,7 +3514,7 @@ function peg$parse(input, options) {
|
|
|
3417
3514
|
if (s7 === peg$FAILED) {
|
|
3418
3515
|
s7 = null;
|
|
3419
3516
|
}
|
|
3420
|
-
s8 = peg$
|
|
3517
|
+
s8 = peg$parseExpression();
|
|
3421
3518
|
if (s8 !== peg$FAILED) {
|
|
3422
3519
|
peg$savedPos = s3;
|
|
3423
3520
|
s3 = peg$f35(s1, s7, s8);
|
|
@@ -3445,22 +3542,22 @@ function peg$parse(input, options) {
|
|
|
3445
3542
|
|
|
3446
3543
|
s0 = peg$currPos;
|
|
3447
3544
|
if (input.charCodeAt(peg$currPos) === 44) {
|
|
3448
|
-
s1 = peg$
|
|
3545
|
+
s1 = peg$c39;
|
|
3449
3546
|
peg$currPos++;
|
|
3450
3547
|
} else {
|
|
3451
3548
|
s1 = peg$FAILED;
|
|
3452
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3549
|
+
if (peg$silentFails === 0) { peg$fail(peg$e72); }
|
|
3453
3550
|
}
|
|
3454
3551
|
if (s1 !== peg$FAILED) {
|
|
3455
3552
|
s2 = [];
|
|
3456
3553
|
s3 = peg$currPos;
|
|
3457
3554
|
s4 = peg$parse__();
|
|
3458
3555
|
if (input.charCodeAt(peg$currPos) === 44) {
|
|
3459
|
-
s5 = peg$
|
|
3556
|
+
s5 = peg$c39;
|
|
3460
3557
|
peg$currPos++;
|
|
3461
3558
|
} else {
|
|
3462
3559
|
s5 = peg$FAILED;
|
|
3463
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3560
|
+
if (peg$silentFails === 0) { peg$fail(peg$e72); }
|
|
3464
3561
|
}
|
|
3465
3562
|
if (s5 !== peg$FAILED) {
|
|
3466
3563
|
s4 = [s4, s5];
|
|
@@ -3474,11 +3571,11 @@ function peg$parse(input, options) {
|
|
|
3474
3571
|
s3 = peg$currPos;
|
|
3475
3572
|
s4 = peg$parse__();
|
|
3476
3573
|
if (input.charCodeAt(peg$currPos) === 44) {
|
|
3477
|
-
s5 = peg$
|
|
3574
|
+
s5 = peg$c39;
|
|
3478
3575
|
peg$currPos++;
|
|
3479
3576
|
} else {
|
|
3480
3577
|
s5 = peg$FAILED;
|
|
3481
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3578
|
+
if (peg$silentFails === 0) { peg$fail(peg$e72); }
|
|
3482
3579
|
}
|
|
3483
3580
|
if (s5 !== peg$FAILED) {
|
|
3484
3581
|
s4 = [s4, s5];
|
|
@@ -3503,20 +3600,20 @@ function peg$parse(input, options) {
|
|
|
3503
3600
|
|
|
3504
3601
|
s0 = peg$currPos;
|
|
3505
3602
|
if (input.charCodeAt(peg$currPos) === 123) {
|
|
3506
|
-
s1 = peg$
|
|
3603
|
+
s1 = peg$c40;
|
|
3507
3604
|
peg$currPos++;
|
|
3508
3605
|
} else {
|
|
3509
3606
|
s1 = peg$FAILED;
|
|
3510
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3607
|
+
if (peg$silentFails === 0) { peg$fail(peg$e73); }
|
|
3511
3608
|
}
|
|
3512
3609
|
if (s1 !== peg$FAILED) {
|
|
3513
3610
|
s2 = peg$parse__();
|
|
3514
3611
|
if (input.charCodeAt(peg$currPos) === 125) {
|
|
3515
|
-
s3 = peg$
|
|
3612
|
+
s3 = peg$c34;
|
|
3516
3613
|
peg$currPos++;
|
|
3517
3614
|
} else {
|
|
3518
3615
|
s3 = peg$FAILED;
|
|
3519
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3616
|
+
if (peg$silentFails === 0) { peg$fail(peg$e67); }
|
|
3520
3617
|
}
|
|
3521
3618
|
if (s3 !== peg$FAILED) {
|
|
3522
3619
|
peg$savedPos = s0;
|
|
@@ -3532,11 +3629,11 @@ function peg$parse(input, options) {
|
|
|
3532
3629
|
if (s0 === peg$FAILED) {
|
|
3533
3630
|
s0 = peg$currPos;
|
|
3534
3631
|
if (input.charCodeAt(peg$currPos) === 123) {
|
|
3535
|
-
s1 = peg$
|
|
3632
|
+
s1 = peg$c40;
|
|
3536
3633
|
peg$currPos++;
|
|
3537
3634
|
} else {
|
|
3538
3635
|
s1 = peg$FAILED;
|
|
3539
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3636
|
+
if (peg$silentFails === 0) { peg$fail(peg$e73); }
|
|
3540
3637
|
}
|
|
3541
3638
|
if (s1 !== peg$FAILED) {
|
|
3542
3639
|
s2 = peg$parse__();
|
|
@@ -3544,11 +3641,11 @@ function peg$parse(input, options) {
|
|
|
3544
3641
|
if (s3 !== peg$FAILED) {
|
|
3545
3642
|
s4 = peg$parse__();
|
|
3546
3643
|
if (input.charCodeAt(peg$currPos) === 125) {
|
|
3547
|
-
s5 = peg$
|
|
3644
|
+
s5 = peg$c34;
|
|
3548
3645
|
peg$currPos++;
|
|
3549
3646
|
} else {
|
|
3550
3647
|
s5 = peg$FAILED;
|
|
3551
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3648
|
+
if (peg$silentFails === 0) { peg$fail(peg$e67); }
|
|
3552
3649
|
}
|
|
3553
3650
|
if (s5 !== peg$FAILED) {
|
|
3554
3651
|
peg$savedPos = s0;
|
|
@@ -3568,11 +3665,11 @@ function peg$parse(input, options) {
|
|
|
3568
3665
|
if (s0 === peg$FAILED) {
|
|
3569
3666
|
s0 = peg$currPos;
|
|
3570
3667
|
if (input.charCodeAt(peg$currPos) === 123) {
|
|
3571
|
-
s1 = peg$
|
|
3668
|
+
s1 = peg$c40;
|
|
3572
3669
|
peg$currPos++;
|
|
3573
3670
|
} else {
|
|
3574
3671
|
s1 = peg$FAILED;
|
|
3575
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3672
|
+
if (peg$silentFails === 0) { peg$fail(peg$e73); }
|
|
3576
3673
|
}
|
|
3577
3674
|
if (s1 !== peg$FAILED) {
|
|
3578
3675
|
s2 = peg$parse__();
|
|
@@ -3580,20 +3677,20 @@ function peg$parse(input, options) {
|
|
|
3580
3677
|
if (s3 !== peg$FAILED) {
|
|
3581
3678
|
s4 = peg$parse__();
|
|
3582
3679
|
if (input.charCodeAt(peg$currPos) === 44) {
|
|
3583
|
-
s5 = peg$
|
|
3680
|
+
s5 = peg$c39;
|
|
3584
3681
|
peg$currPos++;
|
|
3585
3682
|
} else {
|
|
3586
3683
|
s5 = peg$FAILED;
|
|
3587
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3684
|
+
if (peg$silentFails === 0) { peg$fail(peg$e72); }
|
|
3588
3685
|
}
|
|
3589
3686
|
if (s5 !== peg$FAILED) {
|
|
3590
3687
|
s6 = peg$parse__();
|
|
3591
3688
|
if (input.charCodeAt(peg$currPos) === 125) {
|
|
3592
|
-
s7 = peg$
|
|
3689
|
+
s7 = peg$c34;
|
|
3593
3690
|
peg$currPos++;
|
|
3594
3691
|
} else {
|
|
3595
3692
|
s7 = peg$FAILED;
|
|
3596
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3693
|
+
if (peg$silentFails === 0) { peg$fail(peg$e67); }
|
|
3597
3694
|
}
|
|
3598
3695
|
if (s7 !== peg$FAILED) {
|
|
3599
3696
|
peg$savedPos = s0;
|
|
@@ -3630,11 +3727,11 @@ function peg$parse(input, options) {
|
|
|
3630
3727
|
s3 = peg$currPos;
|
|
3631
3728
|
s4 = peg$parse__();
|
|
3632
3729
|
if (input.charCodeAt(peg$currPos) === 44) {
|
|
3633
|
-
s5 = peg$
|
|
3730
|
+
s5 = peg$c39;
|
|
3634
3731
|
peg$currPos++;
|
|
3635
3732
|
} else {
|
|
3636
3733
|
s5 = peg$FAILED;
|
|
3637
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3734
|
+
if (peg$silentFails === 0) { peg$fail(peg$e72); }
|
|
3638
3735
|
}
|
|
3639
3736
|
if (s5 !== peg$FAILED) {
|
|
3640
3737
|
s6 = peg$parse__();
|
|
@@ -3655,11 +3752,11 @@ function peg$parse(input, options) {
|
|
|
3655
3752
|
s3 = peg$currPos;
|
|
3656
3753
|
s4 = peg$parse__();
|
|
3657
3754
|
if (input.charCodeAt(peg$currPos) === 44) {
|
|
3658
|
-
s5 = peg$
|
|
3755
|
+
s5 = peg$c39;
|
|
3659
3756
|
peg$currPos++;
|
|
3660
3757
|
} else {
|
|
3661
3758
|
s5 = peg$FAILED;
|
|
3662
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3759
|
+
if (peg$silentFails === 0) { peg$fail(peg$e72); }
|
|
3663
3760
|
}
|
|
3664
3761
|
if (s5 !== peg$FAILED) {
|
|
3665
3762
|
s6 = peg$parse__();
|
|
@@ -3694,15 +3791,15 @@ function peg$parse(input, options) {
|
|
|
3694
3791
|
if (s1 !== peg$FAILED) {
|
|
3695
3792
|
s2 = peg$parse__();
|
|
3696
3793
|
if (input.charCodeAt(peg$currPos) === 58) {
|
|
3697
|
-
s3 = peg$
|
|
3794
|
+
s3 = peg$c41;
|
|
3698
3795
|
peg$currPos++;
|
|
3699
3796
|
} else {
|
|
3700
3797
|
s3 = peg$FAILED;
|
|
3701
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3798
|
+
if (peg$silentFails === 0) { peg$fail(peg$e74); }
|
|
3702
3799
|
}
|
|
3703
3800
|
if (s3 !== peg$FAILED) {
|
|
3704
3801
|
s4 = peg$parse__();
|
|
3705
|
-
s5 = peg$
|
|
3802
|
+
s5 = peg$parseExpression();
|
|
3706
3803
|
if (s5 !== peg$FAILED) {
|
|
3707
3804
|
peg$savedPos = s0;
|
|
3708
3805
|
s0 = peg$f42(s1, s5);
|
|
@@ -3746,23 +3843,23 @@ function peg$parse(input, options) {
|
|
|
3746
3843
|
s3 = peg$currPos;
|
|
3747
3844
|
s4 = peg$parse__();
|
|
3748
3845
|
if (input.charCodeAt(peg$currPos) === 91) {
|
|
3749
|
-
s5 = peg$
|
|
3846
|
+
s5 = peg$c37;
|
|
3750
3847
|
peg$currPos++;
|
|
3751
3848
|
} else {
|
|
3752
3849
|
s5 = peg$FAILED;
|
|
3753
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3850
|
+
if (peg$silentFails === 0) { peg$fail(peg$e70); }
|
|
3754
3851
|
}
|
|
3755
3852
|
if (s5 !== peg$FAILED) {
|
|
3756
3853
|
s6 = peg$parse__();
|
|
3757
|
-
s7 = peg$
|
|
3854
|
+
s7 = peg$parseExpression();
|
|
3758
3855
|
if (s7 !== peg$FAILED) {
|
|
3759
3856
|
s8 = peg$parse__();
|
|
3760
3857
|
if (input.charCodeAt(peg$currPos) === 93) {
|
|
3761
|
-
s9 = peg$
|
|
3858
|
+
s9 = peg$c38;
|
|
3762
3859
|
peg$currPos++;
|
|
3763
3860
|
} else {
|
|
3764
3861
|
s9 = peg$FAILED;
|
|
3765
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3862
|
+
if (peg$silentFails === 0) { peg$fail(peg$e71); }
|
|
3766
3863
|
}
|
|
3767
3864
|
if (s9 !== peg$FAILED) {
|
|
3768
3865
|
peg$savedPos = s3;
|
|
@@ -3806,12 +3903,12 @@ function peg$parse(input, options) {
|
|
|
3806
3903
|
if (s3 === peg$FAILED) {
|
|
3807
3904
|
s3 = peg$currPos;
|
|
3808
3905
|
s4 = peg$parse__();
|
|
3809
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
3810
|
-
s5 = peg$
|
|
3906
|
+
if (input.substr(peg$currPos, 2) === peg$c42) {
|
|
3907
|
+
s5 = peg$c42;
|
|
3811
3908
|
peg$currPos += 2;
|
|
3812
3909
|
} else {
|
|
3813
3910
|
s5 = peg$FAILED;
|
|
3814
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3911
|
+
if (peg$silentFails === 0) { peg$fail(peg$e75); }
|
|
3815
3912
|
}
|
|
3816
3913
|
if (s5 !== peg$FAILED) {
|
|
3817
3914
|
s6 = peg$parse__();
|
|
@@ -3834,23 +3931,23 @@ function peg$parse(input, options) {
|
|
|
3834
3931
|
s3 = peg$currPos;
|
|
3835
3932
|
s4 = peg$parse__();
|
|
3836
3933
|
if (input.charCodeAt(peg$currPos) === 91) {
|
|
3837
|
-
s5 = peg$
|
|
3934
|
+
s5 = peg$c37;
|
|
3838
3935
|
peg$currPos++;
|
|
3839
3936
|
} else {
|
|
3840
3937
|
s5 = peg$FAILED;
|
|
3841
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3938
|
+
if (peg$silentFails === 0) { peg$fail(peg$e70); }
|
|
3842
3939
|
}
|
|
3843
3940
|
if (s5 !== peg$FAILED) {
|
|
3844
3941
|
s6 = peg$parse__();
|
|
3845
|
-
s7 = peg$
|
|
3942
|
+
s7 = peg$parseExpression();
|
|
3846
3943
|
if (s7 !== peg$FAILED) {
|
|
3847
3944
|
s8 = peg$parse__();
|
|
3848
3945
|
if (input.charCodeAt(peg$currPos) === 93) {
|
|
3849
|
-
s9 = peg$
|
|
3946
|
+
s9 = peg$c38;
|
|
3850
3947
|
peg$currPos++;
|
|
3851
3948
|
} else {
|
|
3852
3949
|
s9 = peg$FAILED;
|
|
3853
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3950
|
+
if (peg$silentFails === 0) { peg$fail(peg$e71); }
|
|
3854
3951
|
}
|
|
3855
3952
|
if (s9 !== peg$FAILED) {
|
|
3856
3953
|
peg$savedPos = s3;
|
|
@@ -3894,12 +3991,12 @@ function peg$parse(input, options) {
|
|
|
3894
3991
|
if (s3 === peg$FAILED) {
|
|
3895
3992
|
s3 = peg$currPos;
|
|
3896
3993
|
s4 = peg$parse__();
|
|
3897
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
3898
|
-
s5 = peg$
|
|
3994
|
+
if (input.substr(peg$currPos, 2) === peg$c42) {
|
|
3995
|
+
s5 = peg$c42;
|
|
3899
3996
|
peg$currPos += 2;
|
|
3900
3997
|
} else {
|
|
3901
3998
|
s5 = peg$FAILED;
|
|
3902
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3999
|
+
if (peg$silentFails === 0) { peg$fail(peg$e75); }
|
|
3903
4000
|
}
|
|
3904
4001
|
if (s5 !== peg$FAILED) {
|
|
3905
4002
|
s6 = peg$parse__();
|
|
@@ -3964,23 +4061,23 @@ function peg$parse(input, options) {
|
|
|
3964
4061
|
s3 = peg$currPos;
|
|
3965
4062
|
s4 = peg$parse__();
|
|
3966
4063
|
if (input.charCodeAt(peg$currPos) === 91) {
|
|
3967
|
-
s5 = peg$
|
|
4064
|
+
s5 = peg$c37;
|
|
3968
4065
|
peg$currPos++;
|
|
3969
4066
|
} else {
|
|
3970
4067
|
s5 = peg$FAILED;
|
|
3971
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
4068
|
+
if (peg$silentFails === 0) { peg$fail(peg$e70); }
|
|
3972
4069
|
}
|
|
3973
4070
|
if (s5 !== peg$FAILED) {
|
|
3974
4071
|
s6 = peg$parse__();
|
|
3975
|
-
s7 = peg$
|
|
4072
|
+
s7 = peg$parseExpression();
|
|
3976
4073
|
if (s7 !== peg$FAILED) {
|
|
3977
4074
|
s8 = peg$parse__();
|
|
3978
4075
|
if (input.charCodeAt(peg$currPos) === 93) {
|
|
3979
|
-
s9 = peg$
|
|
4076
|
+
s9 = peg$c38;
|
|
3980
4077
|
peg$currPos++;
|
|
3981
4078
|
} else {
|
|
3982
4079
|
s9 = peg$FAILED;
|
|
3983
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
4080
|
+
if (peg$silentFails === 0) { peg$fail(peg$e71); }
|
|
3984
4081
|
}
|
|
3985
4082
|
if (s9 !== peg$FAILED) {
|
|
3986
4083
|
peg$savedPos = s3;
|
|
@@ -4039,23 +4136,23 @@ function peg$parse(input, options) {
|
|
|
4039
4136
|
s3 = peg$currPos;
|
|
4040
4137
|
s4 = peg$parse__();
|
|
4041
4138
|
if (input.charCodeAt(peg$currPos) === 91) {
|
|
4042
|
-
s5 = peg$
|
|
4139
|
+
s5 = peg$c37;
|
|
4043
4140
|
peg$currPos++;
|
|
4044
4141
|
} else {
|
|
4045
4142
|
s5 = peg$FAILED;
|
|
4046
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
4143
|
+
if (peg$silentFails === 0) { peg$fail(peg$e70); }
|
|
4047
4144
|
}
|
|
4048
4145
|
if (s5 !== peg$FAILED) {
|
|
4049
4146
|
s6 = peg$parse__();
|
|
4050
|
-
s7 = peg$
|
|
4147
|
+
s7 = peg$parseExpression();
|
|
4051
4148
|
if (s7 !== peg$FAILED) {
|
|
4052
4149
|
s8 = peg$parse__();
|
|
4053
4150
|
if (input.charCodeAt(peg$currPos) === 93) {
|
|
4054
|
-
s9 = peg$
|
|
4151
|
+
s9 = peg$c38;
|
|
4055
4152
|
peg$currPos++;
|
|
4056
4153
|
} else {
|
|
4057
4154
|
s9 = peg$FAILED;
|
|
4058
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
4155
|
+
if (peg$silentFails === 0) { peg$fail(peg$e71); }
|
|
4059
4156
|
}
|
|
4060
4157
|
if (s9 !== peg$FAILED) {
|
|
4061
4158
|
peg$savedPos = s3;
|
|
@@ -4114,11 +4211,11 @@ function peg$parse(input, options) {
|
|
|
4114
4211
|
|
|
4115
4212
|
s0 = peg$currPos;
|
|
4116
4213
|
if (input.charCodeAt(peg$currPos) === 40) {
|
|
4117
|
-
s1 = peg$
|
|
4214
|
+
s1 = peg$c35;
|
|
4118
4215
|
peg$currPos++;
|
|
4119
4216
|
} else {
|
|
4120
4217
|
s1 = peg$FAILED;
|
|
4121
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
4218
|
+
if (peg$silentFails === 0) { peg$fail(peg$e68); }
|
|
4122
4219
|
}
|
|
4123
4220
|
if (s1 !== peg$FAILED) {
|
|
4124
4221
|
s2 = peg$parse__();
|
|
@@ -4136,11 +4233,11 @@ function peg$parse(input, options) {
|
|
|
4136
4233
|
s3 = null;
|
|
4137
4234
|
}
|
|
4138
4235
|
if (input.charCodeAt(peg$currPos) === 41) {
|
|
4139
|
-
s4 = peg$
|
|
4236
|
+
s4 = peg$c36;
|
|
4140
4237
|
peg$currPos++;
|
|
4141
4238
|
} else {
|
|
4142
4239
|
s4 = peg$FAILED;
|
|
4143
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
4240
|
+
if (peg$silentFails === 0) { peg$fail(peg$e69); }
|
|
4144
4241
|
}
|
|
4145
4242
|
if (s4 !== peg$FAILED) {
|
|
4146
4243
|
peg$savedPos = s0;
|
|
@@ -4161,21 +4258,21 @@ function peg$parse(input, options) {
|
|
|
4161
4258
|
var s0, s1, s2, s3, s4, s5, s6, s7;
|
|
4162
4259
|
|
|
4163
4260
|
s0 = peg$currPos;
|
|
4164
|
-
s1 = peg$
|
|
4261
|
+
s1 = peg$parseCallArgument();
|
|
4165
4262
|
if (s1 !== peg$FAILED) {
|
|
4166
4263
|
s2 = [];
|
|
4167
4264
|
s3 = peg$currPos;
|
|
4168
4265
|
s4 = peg$parse__();
|
|
4169
4266
|
if (input.charCodeAt(peg$currPos) === 44) {
|
|
4170
|
-
s5 = peg$
|
|
4267
|
+
s5 = peg$c39;
|
|
4171
4268
|
peg$currPos++;
|
|
4172
4269
|
} else {
|
|
4173
4270
|
s5 = peg$FAILED;
|
|
4174
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
4271
|
+
if (peg$silentFails === 0) { peg$fail(peg$e72); }
|
|
4175
4272
|
}
|
|
4176
4273
|
if (s5 !== peg$FAILED) {
|
|
4177
4274
|
s6 = peg$parse__();
|
|
4178
|
-
s7 = peg$
|
|
4275
|
+
s7 = peg$parseCallArgument();
|
|
4179
4276
|
if (s7 !== peg$FAILED) {
|
|
4180
4277
|
s4 = [s4, s5, s6, s7];
|
|
4181
4278
|
s3 = s4;
|
|
@@ -4192,15 +4289,15 @@ function peg$parse(input, options) {
|
|
|
4192
4289
|
s3 = peg$currPos;
|
|
4193
4290
|
s4 = peg$parse__();
|
|
4194
4291
|
if (input.charCodeAt(peg$currPos) === 44) {
|
|
4195
|
-
s5 = peg$
|
|
4292
|
+
s5 = peg$c39;
|
|
4196
4293
|
peg$currPos++;
|
|
4197
4294
|
} else {
|
|
4198
4295
|
s5 = peg$FAILED;
|
|
4199
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
4296
|
+
if (peg$silentFails === 0) { peg$fail(peg$e72); }
|
|
4200
4297
|
}
|
|
4201
4298
|
if (s5 !== peg$FAILED) {
|
|
4202
4299
|
s6 = peg$parse__();
|
|
4203
|
-
s7 = peg$
|
|
4300
|
+
s7 = peg$parseCallArgument();
|
|
4204
4301
|
if (s7 !== peg$FAILED) {
|
|
4205
4302
|
s4 = [s4, s5, s6, s7];
|
|
4206
4303
|
s3 = s4;
|
|
@@ -4223,6 +4320,37 @@ function peg$parse(input, options) {
|
|
|
4223
4320
|
return s0;
|
|
4224
4321
|
}
|
|
4225
4322
|
|
|
4323
|
+
function peg$parseCallArgument() {
|
|
4324
|
+
var s0;
|
|
4325
|
+
|
|
4326
|
+
s0 = peg$parseExpression();
|
|
4327
|
+
if (s0 === peg$FAILED) {
|
|
4328
|
+
s0 = peg$parseCurryPlaceholder();
|
|
4329
|
+
}
|
|
4330
|
+
|
|
4331
|
+
return s0;
|
|
4332
|
+
}
|
|
4333
|
+
|
|
4334
|
+
function peg$parseCurryPlaceholder() {
|
|
4335
|
+
var s0, s1;
|
|
4336
|
+
|
|
4337
|
+
s0 = peg$currPos;
|
|
4338
|
+
if (input.charCodeAt(peg$currPos) === 37) {
|
|
4339
|
+
s1 = peg$c43;
|
|
4340
|
+
peg$currPos++;
|
|
4341
|
+
} else {
|
|
4342
|
+
s1 = peg$FAILED;
|
|
4343
|
+
if (peg$silentFails === 0) { peg$fail(peg$e76); }
|
|
4344
|
+
}
|
|
4345
|
+
if (s1 !== peg$FAILED) {
|
|
4346
|
+
peg$savedPos = s0;
|
|
4347
|
+
s1 = peg$f54();
|
|
4348
|
+
}
|
|
4349
|
+
s0 = s1;
|
|
4350
|
+
|
|
4351
|
+
return s0;
|
|
4352
|
+
}
|
|
4353
|
+
|
|
4226
4354
|
function peg$parseLeftHandSideExpression() {
|
|
4227
4355
|
var s0;
|
|
4228
4356
|
|
|
@@ -4279,7 +4407,7 @@ function peg$parse(input, options) {
|
|
|
4279
4407
|
}
|
|
4280
4408
|
}
|
|
4281
4409
|
peg$savedPos = s0;
|
|
4282
|
-
s0 = peg$
|
|
4410
|
+
s0 = peg$f55(s1, s2);
|
|
4283
4411
|
} else {
|
|
4284
4412
|
peg$currPos = s0;
|
|
4285
4413
|
s0 = peg$FAILED;
|
|
@@ -4292,11 +4420,11 @@ function peg$parse(input, options) {
|
|
|
4292
4420
|
var s0;
|
|
4293
4421
|
|
|
4294
4422
|
if (input.charCodeAt(peg$currPos) === 94) {
|
|
4295
|
-
s0 = peg$
|
|
4423
|
+
s0 = peg$c44;
|
|
4296
4424
|
peg$currPos++;
|
|
4297
4425
|
} else {
|
|
4298
4426
|
s0 = peg$FAILED;
|
|
4299
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
4427
|
+
if (peg$silentFails === 0) { peg$fail(peg$e77); }
|
|
4300
4428
|
}
|
|
4301
4429
|
|
|
4302
4430
|
return s0;
|
|
@@ -4314,7 +4442,7 @@ function peg$parse(input, options) {
|
|
|
4314
4442
|
s3 = peg$parseUnaryExpression();
|
|
4315
4443
|
if (s3 !== peg$FAILED) {
|
|
4316
4444
|
peg$savedPos = s0;
|
|
4317
|
-
s0 = peg$
|
|
4445
|
+
s0 = peg$f56(s1, s3);
|
|
4318
4446
|
} else {
|
|
4319
4447
|
peg$currPos = s0;
|
|
4320
4448
|
s0 = peg$FAILED;
|
|
@@ -4405,7 +4533,7 @@ function peg$parse(input, options) {
|
|
|
4405
4533
|
}
|
|
4406
4534
|
}
|
|
4407
4535
|
peg$savedPos = s0;
|
|
4408
|
-
s0 = peg$
|
|
4536
|
+
s0 = peg$f57(s1, s2);
|
|
4409
4537
|
} else {
|
|
4410
4538
|
peg$currPos = s0;
|
|
4411
4539
|
s0 = peg$FAILED;
|
|
@@ -4422,7 +4550,7 @@ function peg$parse(input, options) {
|
|
|
4422
4550
|
peg$currPos++;
|
|
4423
4551
|
} else {
|
|
4424
4552
|
s0 = peg$FAILED;
|
|
4425
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
4553
|
+
if (peg$silentFails === 0) { peg$fail(peg$e78); }
|
|
4426
4554
|
}
|
|
4427
4555
|
if (s0 === peg$FAILED) {
|
|
4428
4556
|
s0 = peg$currPos;
|
|
@@ -4482,7 +4610,7 @@ function peg$parse(input, options) {
|
|
|
4482
4610
|
}
|
|
4483
4611
|
}
|
|
4484
4612
|
peg$savedPos = s0;
|
|
4485
|
-
s0 = peg$
|
|
4613
|
+
s0 = peg$f58(s1, s2);
|
|
4486
4614
|
} else {
|
|
4487
4615
|
peg$currPos = s0;
|
|
4488
4616
|
s0 = peg$FAILED;
|
|
@@ -4550,7 +4678,7 @@ function peg$parse(input, options) {
|
|
|
4550
4678
|
}
|
|
4551
4679
|
}
|
|
4552
4680
|
peg$savedPos = s0;
|
|
4553
|
-
s0 = peg$
|
|
4681
|
+
s0 = peg$f59(s1, s2);
|
|
4554
4682
|
} else {
|
|
4555
4683
|
peg$currPos = s0;
|
|
4556
4684
|
s0 = peg$FAILED;
|
|
@@ -4563,11 +4691,11 @@ function peg$parse(input, options) {
|
|
|
4563
4691
|
var s0;
|
|
4564
4692
|
|
|
4565
4693
|
if (input.charCodeAt(peg$currPos) === 38) {
|
|
4566
|
-
s0 = peg$
|
|
4694
|
+
s0 = peg$c45;
|
|
4567
4695
|
peg$currPos++;
|
|
4568
4696
|
} else {
|
|
4569
4697
|
s0 = peg$FAILED;
|
|
4570
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
4698
|
+
if (peg$silentFails === 0) { peg$fail(peg$e79); }
|
|
4571
4699
|
}
|
|
4572
4700
|
|
|
4573
4701
|
return s0;
|
|
@@ -4618,7 +4746,7 @@ function peg$parse(input, options) {
|
|
|
4618
4746
|
}
|
|
4619
4747
|
}
|
|
4620
4748
|
peg$savedPos = s0;
|
|
4621
|
-
s0 = peg$
|
|
4749
|
+
s0 = peg$f60(s1, s2);
|
|
4622
4750
|
} else {
|
|
4623
4751
|
peg$currPos = s0;
|
|
4624
4752
|
s0 = peg$FAILED;
|
|
@@ -4630,20 +4758,20 @@ function peg$parse(input, options) {
|
|
|
4630
4758
|
function peg$parseRelationalOperator() {
|
|
4631
4759
|
var s0, s1;
|
|
4632
4760
|
|
|
4633
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
4634
|
-
s0 = peg$
|
|
4761
|
+
if (input.substr(peg$currPos, 2) === peg$c46) {
|
|
4762
|
+
s0 = peg$c46;
|
|
4635
4763
|
peg$currPos += 2;
|
|
4636
4764
|
} else {
|
|
4637
4765
|
s0 = peg$FAILED;
|
|
4638
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
4766
|
+
if (peg$silentFails === 0) { peg$fail(peg$e80); }
|
|
4639
4767
|
}
|
|
4640
4768
|
if (s0 === peg$FAILED) {
|
|
4641
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
4642
|
-
s0 = peg$
|
|
4769
|
+
if (input.substr(peg$currPos, 2) === peg$c47) {
|
|
4770
|
+
s0 = peg$c47;
|
|
4643
4771
|
peg$currPos += 2;
|
|
4644
4772
|
} else {
|
|
4645
4773
|
s0 = peg$FAILED;
|
|
4646
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
4774
|
+
if (peg$silentFails === 0) { peg$fail(peg$e81); }
|
|
4647
4775
|
}
|
|
4648
4776
|
if (s0 === peg$FAILED) {
|
|
4649
4777
|
s0 = input.charAt(peg$currPos);
|
|
@@ -4651,7 +4779,7 @@ function peg$parse(input, options) {
|
|
|
4651
4779
|
peg$currPos++;
|
|
4652
4780
|
} else {
|
|
4653
4781
|
s0 = peg$FAILED;
|
|
4654
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
4782
|
+
if (peg$silentFails === 0) { peg$fail(peg$e82); }
|
|
4655
4783
|
}
|
|
4656
4784
|
if (s0 === peg$FAILED) {
|
|
4657
4785
|
s0 = peg$currPos;
|
|
@@ -4713,7 +4841,7 @@ function peg$parse(input, options) {
|
|
|
4713
4841
|
}
|
|
4714
4842
|
}
|
|
4715
4843
|
peg$savedPos = s0;
|
|
4716
|
-
s0 = peg$
|
|
4844
|
+
s0 = peg$f61(s1, s2);
|
|
4717
4845
|
} else {
|
|
4718
4846
|
peg$currPos = s0;
|
|
4719
4847
|
s0 = peg$FAILED;
|
|
@@ -4725,20 +4853,20 @@ function peg$parse(input, options) {
|
|
|
4725
4853
|
function peg$parseEqualityOperator() {
|
|
4726
4854
|
var s0;
|
|
4727
4855
|
|
|
4728
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
4729
|
-
s0 = peg$
|
|
4856
|
+
if (input.substr(peg$currPos, 2) === peg$c48) {
|
|
4857
|
+
s0 = peg$c48;
|
|
4730
4858
|
peg$currPos += 2;
|
|
4731
4859
|
} else {
|
|
4732
4860
|
s0 = peg$FAILED;
|
|
4733
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
4861
|
+
if (peg$silentFails === 0) { peg$fail(peg$e83); }
|
|
4734
4862
|
}
|
|
4735
4863
|
if (s0 === peg$FAILED) {
|
|
4736
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
4737
|
-
s0 = peg$
|
|
4864
|
+
if (input.substr(peg$currPos, 2) === peg$c49) {
|
|
4865
|
+
s0 = peg$c49;
|
|
4738
4866
|
peg$currPos += 2;
|
|
4739
4867
|
} else {
|
|
4740
4868
|
s0 = peg$FAILED;
|
|
4741
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
4869
|
+
if (peg$silentFails === 0) { peg$fail(peg$e84); }
|
|
4742
4870
|
}
|
|
4743
4871
|
}
|
|
4744
4872
|
|
|
@@ -4790,7 +4918,7 @@ function peg$parse(input, options) {
|
|
|
4790
4918
|
}
|
|
4791
4919
|
}
|
|
4792
4920
|
peg$savedPos = s0;
|
|
4793
|
-
s0 = peg$
|
|
4921
|
+
s0 = peg$f62(s1, s2);
|
|
4794
4922
|
} else {
|
|
4795
4923
|
peg$currPos = s0;
|
|
4796
4924
|
s0 = peg$FAILED;
|
|
@@ -4809,6 +4937,15 @@ function peg$parse(input, options) {
|
|
|
4809
4937
|
} else {
|
|
4810
4938
|
s0 = s1;
|
|
4811
4939
|
}
|
|
4940
|
+
if (s0 === peg$FAILED) {
|
|
4941
|
+
if (input.substr(peg$currPos, 2) === peg$c50) {
|
|
4942
|
+
s0 = peg$c50;
|
|
4943
|
+
peg$currPos += 2;
|
|
4944
|
+
} else {
|
|
4945
|
+
s0 = peg$FAILED;
|
|
4946
|
+
if (peg$silentFails === 0) { peg$fail(peg$e85); }
|
|
4947
|
+
}
|
|
4948
|
+
}
|
|
4812
4949
|
|
|
4813
4950
|
return s0;
|
|
4814
4951
|
}
|
|
@@ -4858,7 +4995,7 @@ function peg$parse(input, options) {
|
|
|
4858
4995
|
}
|
|
4859
4996
|
}
|
|
4860
4997
|
peg$savedPos = s0;
|
|
4861
|
-
s0 = peg$
|
|
4998
|
+
s0 = peg$f63(s1, s2);
|
|
4862
4999
|
} else {
|
|
4863
5000
|
peg$currPos = s0;
|
|
4864
5001
|
s0 = peg$FAILED;
|
|
@@ -4877,6 +5014,15 @@ function peg$parse(input, options) {
|
|
|
4877
5014
|
} else {
|
|
4878
5015
|
s0 = s1;
|
|
4879
5016
|
}
|
|
5017
|
+
if (s0 === peg$FAILED) {
|
|
5018
|
+
if (input.substr(peg$currPos, 2) === peg$c51) {
|
|
5019
|
+
s0 = peg$c51;
|
|
5020
|
+
peg$currPos += 2;
|
|
5021
|
+
} else {
|
|
5022
|
+
s0 = peg$FAILED;
|
|
5023
|
+
if (peg$silentFails === 0) { peg$fail(peg$e86); }
|
|
5024
|
+
}
|
|
5025
|
+
}
|
|
4880
5026
|
|
|
4881
5027
|
return s0;
|
|
4882
5028
|
}
|
|
@@ -4888,22 +5034,22 @@ function peg$parse(input, options) {
|
|
|
4888
5034
|
s1 = peg$parseIfToken();
|
|
4889
5035
|
if (s1 !== peg$FAILED) {
|
|
4890
5036
|
s2 = peg$parse__();
|
|
4891
|
-
s3 = peg$
|
|
5037
|
+
s3 = peg$parseExpression();
|
|
4892
5038
|
if (s3 !== peg$FAILED) {
|
|
4893
5039
|
s4 = peg$parse__();
|
|
4894
5040
|
s5 = peg$parseThenToken();
|
|
4895
5041
|
if (s5 !== peg$FAILED) {
|
|
4896
5042
|
s6 = peg$parse__();
|
|
4897
|
-
s7 = peg$
|
|
5043
|
+
s7 = peg$parseExpression();
|
|
4898
5044
|
if (s7 !== peg$FAILED) {
|
|
4899
5045
|
s8 = peg$parse__();
|
|
4900
5046
|
s9 = peg$parseElseToken();
|
|
4901
5047
|
if (s9 !== peg$FAILED) {
|
|
4902
5048
|
s10 = peg$parse__();
|
|
4903
|
-
s11 = peg$
|
|
5049
|
+
s11 = peg$parseExpression();
|
|
4904
5050
|
if (s11 !== peg$FAILED) {
|
|
4905
5051
|
peg$savedPos = s0;
|
|
4906
|
-
s0 = peg$
|
|
5052
|
+
s0 = peg$f64(s3, s7, s11);
|
|
4907
5053
|
} else {
|
|
4908
5054
|
peg$currPos = s0;
|
|
4909
5055
|
s0 = peg$FAILED;
|
|
@@ -4933,16 +5079,16 @@ function peg$parse(input, options) {
|
|
|
4933
5079
|
s1 = peg$parseIfToken();
|
|
4934
5080
|
if (s1 !== peg$FAILED) {
|
|
4935
5081
|
s2 = peg$parse__();
|
|
4936
|
-
s3 = peg$
|
|
5082
|
+
s3 = peg$parseExpression();
|
|
4937
5083
|
if (s3 !== peg$FAILED) {
|
|
4938
5084
|
s4 = peg$parse__();
|
|
4939
5085
|
s5 = peg$parseThenToken();
|
|
4940
5086
|
if (s5 !== peg$FAILED) {
|
|
4941
5087
|
s6 = peg$parse__();
|
|
4942
|
-
s7 = peg$
|
|
5088
|
+
s7 = peg$parseExpression();
|
|
4943
5089
|
if (s7 !== peg$FAILED) {
|
|
4944
5090
|
peg$savedPos = s0;
|
|
4945
|
-
s0 = peg$
|
|
5091
|
+
s0 = peg$f65(s3, s7);
|
|
4946
5092
|
} else {
|
|
4947
5093
|
peg$currPos = s0;
|
|
4948
5094
|
s0 = peg$FAILED;
|
|
@@ -5012,7 +5158,7 @@ function peg$parse(input, options) {
|
|
|
5012
5158
|
}
|
|
5013
5159
|
}
|
|
5014
5160
|
peg$savedPos = s0;
|
|
5015
|
-
s0 = peg$
|
|
5161
|
+
s0 = peg$f66(s1, s2);
|
|
5016
5162
|
} else {
|
|
5017
5163
|
peg$currPos = s0;
|
|
5018
5164
|
s0 = peg$FAILED;
|
|
@@ -5024,12 +5170,12 @@ function peg$parse(input, options) {
|
|
|
5024
5170
|
function peg$parseNullishCoalescingOperator() {
|
|
5025
5171
|
var s0;
|
|
5026
5172
|
|
|
5027
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
5028
|
-
s0 = peg$
|
|
5173
|
+
if (input.substr(peg$currPos, 2) === peg$c52) {
|
|
5174
|
+
s0 = peg$c52;
|
|
5029
5175
|
peg$currPos += 2;
|
|
5030
5176
|
} else {
|
|
5031
5177
|
s0 = peg$FAILED;
|
|
5032
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
5178
|
+
if (peg$silentFails === 0) { peg$fail(peg$e87); }
|
|
5033
5179
|
}
|
|
5034
5180
|
|
|
5035
5181
|
return s0;
|
|
@@ -5050,7 +5196,7 @@ function peg$parse(input, options) {
|
|
|
5050
5196
|
s7 = peg$parseNullishCoalescingExpression();
|
|
5051
5197
|
if (s7 !== peg$FAILED) {
|
|
5052
5198
|
peg$savedPos = s3;
|
|
5053
|
-
s3 = peg$
|
|
5199
|
+
s3 = peg$f67(s1, s5, s7);
|
|
5054
5200
|
} else {
|
|
5055
5201
|
peg$currPos = s3;
|
|
5056
5202
|
s3 = peg$FAILED;
|
|
@@ -5069,7 +5215,7 @@ function peg$parse(input, options) {
|
|
|
5069
5215
|
s7 = peg$parseNullishCoalescingExpression();
|
|
5070
5216
|
if (s7 !== peg$FAILED) {
|
|
5071
5217
|
peg$savedPos = s3;
|
|
5072
|
-
s3 = peg$
|
|
5218
|
+
s3 = peg$f67(s1, s5, s7);
|
|
5073
5219
|
} else {
|
|
5074
5220
|
peg$currPos = s3;
|
|
5075
5221
|
s3 = peg$FAILED;
|
|
@@ -5080,7 +5226,7 @@ function peg$parse(input, options) {
|
|
|
5080
5226
|
}
|
|
5081
5227
|
}
|
|
5082
5228
|
peg$savedPos = s0;
|
|
5083
|
-
s0 = peg$
|
|
5229
|
+
s0 = peg$f68(s1, s2);
|
|
5084
5230
|
} else {
|
|
5085
5231
|
peg$currPos = s0;
|
|
5086
5232
|
s0 = peg$FAILED;
|
|
@@ -5092,20 +5238,408 @@ function peg$parse(input, options) {
|
|
|
5092
5238
|
function peg$parsePipeOperator() {
|
|
5093
5239
|
var s0;
|
|
5094
5240
|
|
|
5095
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
5096
|
-
s0 = peg$
|
|
5241
|
+
if (input.substr(peg$currPos, 2) === peg$c53) {
|
|
5242
|
+
s0 = peg$c53;
|
|
5097
5243
|
peg$currPos += 2;
|
|
5098
5244
|
} else {
|
|
5099
5245
|
s0 = peg$FAILED;
|
|
5100
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
5246
|
+
if (peg$silentFails === 0) { peg$fail(peg$e88); }
|
|
5101
5247
|
}
|
|
5102
5248
|
if (s0 === peg$FAILED) {
|
|
5103
5249
|
if (input.charCodeAt(peg$currPos) === 124) {
|
|
5104
|
-
s0 = peg$
|
|
5250
|
+
s0 = peg$c54;
|
|
5105
5251
|
peg$currPos++;
|
|
5106
5252
|
} else {
|
|
5107
5253
|
s0 = peg$FAILED;
|
|
5108
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
5254
|
+
if (peg$silentFails === 0) { peg$fail(peg$e89); }
|
|
5255
|
+
}
|
|
5256
|
+
}
|
|
5257
|
+
|
|
5258
|
+
return s0;
|
|
5259
|
+
}
|
|
5260
|
+
|
|
5261
|
+
function peg$parseLambdaExpression() {
|
|
5262
|
+
var s0, s1, s2, s3, s4, s5, s6, s7, s8;
|
|
5263
|
+
|
|
5264
|
+
s0 = peg$currPos;
|
|
5265
|
+
if (input.charCodeAt(peg$currPos) === 40) {
|
|
5266
|
+
s1 = peg$c35;
|
|
5267
|
+
peg$currPos++;
|
|
5268
|
+
} else {
|
|
5269
|
+
s1 = peg$FAILED;
|
|
5270
|
+
if (peg$silentFails === 0) { peg$fail(peg$e68); }
|
|
5271
|
+
}
|
|
5272
|
+
if (s1 !== peg$FAILED) {
|
|
5273
|
+
s2 = peg$parse__();
|
|
5274
|
+
s3 = peg$currPos;
|
|
5275
|
+
s4 = peg$parseFormalParameterList();
|
|
5276
|
+
if (s4 !== peg$FAILED) {
|
|
5277
|
+
s5 = peg$parse__();
|
|
5278
|
+
s4 = [s4, s5];
|
|
5279
|
+
s3 = s4;
|
|
5280
|
+
} else {
|
|
5281
|
+
peg$currPos = s3;
|
|
5282
|
+
s3 = peg$FAILED;
|
|
5283
|
+
}
|
|
5284
|
+
if (s3 === peg$FAILED) {
|
|
5285
|
+
s3 = null;
|
|
5286
|
+
}
|
|
5287
|
+
if (input.charCodeAt(peg$currPos) === 41) {
|
|
5288
|
+
s4 = peg$c36;
|
|
5289
|
+
peg$currPos++;
|
|
5290
|
+
} else {
|
|
5291
|
+
s4 = peg$FAILED;
|
|
5292
|
+
if (peg$silentFails === 0) { peg$fail(peg$e69); }
|
|
5293
|
+
}
|
|
5294
|
+
if (s4 !== peg$FAILED) {
|
|
5295
|
+
s5 = peg$parse__();
|
|
5296
|
+
s6 = peg$parseLambdaArrow();
|
|
5297
|
+
if (s6 !== peg$FAILED) {
|
|
5298
|
+
s7 = peg$parse__();
|
|
5299
|
+
s8 = peg$parseExpression();
|
|
5300
|
+
if (s8 !== peg$FAILED) {
|
|
5301
|
+
peg$savedPos = s0;
|
|
5302
|
+
s0 = peg$f69(s3, s8);
|
|
5303
|
+
} else {
|
|
5304
|
+
peg$currPos = s0;
|
|
5305
|
+
s0 = peg$FAILED;
|
|
5306
|
+
}
|
|
5307
|
+
} else {
|
|
5308
|
+
peg$currPos = s0;
|
|
5309
|
+
s0 = peg$FAILED;
|
|
5310
|
+
}
|
|
5311
|
+
} else {
|
|
5312
|
+
peg$currPos = s0;
|
|
5313
|
+
s0 = peg$FAILED;
|
|
5314
|
+
}
|
|
5315
|
+
} else {
|
|
5316
|
+
peg$currPos = s0;
|
|
5317
|
+
s0 = peg$FAILED;
|
|
5318
|
+
}
|
|
5319
|
+
if (s0 === peg$FAILED) {
|
|
5320
|
+
s0 = peg$currPos;
|
|
5321
|
+
s1 = peg$parse__();
|
|
5322
|
+
s2 = peg$parseIdentifier();
|
|
5323
|
+
if (s2 !== peg$FAILED) {
|
|
5324
|
+
s3 = peg$parse__();
|
|
5325
|
+
s4 = peg$parseLambdaArrow();
|
|
5326
|
+
if (s4 !== peg$FAILED) {
|
|
5327
|
+
s5 = peg$parse__();
|
|
5328
|
+
s6 = peg$parseExpression();
|
|
5329
|
+
if (s6 !== peg$FAILED) {
|
|
5330
|
+
peg$savedPos = s0;
|
|
5331
|
+
s0 = peg$f70(s2, s6);
|
|
5332
|
+
} else {
|
|
5333
|
+
peg$currPos = s0;
|
|
5334
|
+
s0 = peg$FAILED;
|
|
5335
|
+
}
|
|
5336
|
+
} else {
|
|
5337
|
+
peg$currPos = s0;
|
|
5338
|
+
s0 = peg$FAILED;
|
|
5339
|
+
}
|
|
5340
|
+
} else {
|
|
5341
|
+
peg$currPos = s0;
|
|
5342
|
+
s0 = peg$FAILED;
|
|
5343
|
+
}
|
|
5344
|
+
}
|
|
5345
|
+
|
|
5346
|
+
return s0;
|
|
5347
|
+
}
|
|
5348
|
+
|
|
5349
|
+
function peg$parseLambdaArrow() {
|
|
5350
|
+
var s0;
|
|
5351
|
+
|
|
5352
|
+
if (input.substr(peg$currPos, 2) === peg$c55) {
|
|
5353
|
+
s0 = peg$c55;
|
|
5354
|
+
peg$currPos += 2;
|
|
5355
|
+
} else {
|
|
5356
|
+
s0 = peg$FAILED;
|
|
5357
|
+
if (peg$silentFails === 0) { peg$fail(peg$e90); }
|
|
5358
|
+
}
|
|
5359
|
+
|
|
5360
|
+
return s0;
|
|
5361
|
+
}
|
|
5362
|
+
|
|
5363
|
+
function peg$parseFormalParameterList() {
|
|
5364
|
+
var s0, s1, s2, s3, s4, s5, s6, s7;
|
|
5365
|
+
|
|
5366
|
+
s0 = peg$currPos;
|
|
5367
|
+
s1 = peg$parseIdentifier();
|
|
5368
|
+
if (s1 !== peg$FAILED) {
|
|
5369
|
+
s2 = [];
|
|
5370
|
+
s3 = peg$currPos;
|
|
5371
|
+
s4 = peg$parse__();
|
|
5372
|
+
if (input.charCodeAt(peg$currPos) === 44) {
|
|
5373
|
+
s5 = peg$c39;
|
|
5374
|
+
peg$currPos++;
|
|
5375
|
+
} else {
|
|
5376
|
+
s5 = peg$FAILED;
|
|
5377
|
+
if (peg$silentFails === 0) { peg$fail(peg$e72); }
|
|
5378
|
+
}
|
|
5379
|
+
if (s5 !== peg$FAILED) {
|
|
5380
|
+
s6 = peg$parse__();
|
|
5381
|
+
s7 = peg$parseIdentifier();
|
|
5382
|
+
if (s7 !== peg$FAILED) {
|
|
5383
|
+
s4 = [s4, s5, s6, s7];
|
|
5384
|
+
s3 = s4;
|
|
5385
|
+
} else {
|
|
5386
|
+
peg$currPos = s3;
|
|
5387
|
+
s3 = peg$FAILED;
|
|
5388
|
+
}
|
|
5389
|
+
} else {
|
|
5390
|
+
peg$currPos = s3;
|
|
5391
|
+
s3 = peg$FAILED;
|
|
5392
|
+
}
|
|
5393
|
+
while (s3 !== peg$FAILED) {
|
|
5394
|
+
s2.push(s3);
|
|
5395
|
+
s3 = peg$currPos;
|
|
5396
|
+
s4 = peg$parse__();
|
|
5397
|
+
if (input.charCodeAt(peg$currPos) === 44) {
|
|
5398
|
+
s5 = peg$c39;
|
|
5399
|
+
peg$currPos++;
|
|
5400
|
+
} else {
|
|
5401
|
+
s5 = peg$FAILED;
|
|
5402
|
+
if (peg$silentFails === 0) { peg$fail(peg$e72); }
|
|
5403
|
+
}
|
|
5404
|
+
if (s5 !== peg$FAILED) {
|
|
5405
|
+
s6 = peg$parse__();
|
|
5406
|
+
s7 = peg$parseIdentifier();
|
|
5407
|
+
if (s7 !== peg$FAILED) {
|
|
5408
|
+
s4 = [s4, s5, s6, s7];
|
|
5409
|
+
s3 = s4;
|
|
5410
|
+
} else {
|
|
5411
|
+
peg$currPos = s3;
|
|
5412
|
+
s3 = peg$FAILED;
|
|
5413
|
+
}
|
|
5414
|
+
} else {
|
|
5415
|
+
peg$currPos = s3;
|
|
5416
|
+
s3 = peg$FAILED;
|
|
5417
|
+
}
|
|
5418
|
+
}
|
|
5419
|
+
peg$savedPos = s0;
|
|
5420
|
+
s0 = peg$f71(s1, s2);
|
|
5421
|
+
} else {
|
|
5422
|
+
peg$currPos = s0;
|
|
5423
|
+
s0 = peg$FAILED;
|
|
5424
|
+
}
|
|
5425
|
+
|
|
5426
|
+
return s0;
|
|
5427
|
+
}
|
|
5428
|
+
|
|
5429
|
+
function peg$parseLetExpression() {
|
|
5430
|
+
var s0, s1, s2, s3, s4, s5, s6, s7;
|
|
5431
|
+
|
|
5432
|
+
s0 = peg$currPos;
|
|
5433
|
+
s1 = peg$parseLetToken();
|
|
5434
|
+
if (s1 !== peg$FAILED) {
|
|
5435
|
+
s2 = peg$parse__();
|
|
5436
|
+
s3 = peg$parseVariableDeclarationList();
|
|
5437
|
+
if (s3 !== peg$FAILED) {
|
|
5438
|
+
s4 = peg$parse__();
|
|
5439
|
+
if (input.charCodeAt(peg$currPos) === 44) {
|
|
5440
|
+
s5 = peg$c39;
|
|
5441
|
+
peg$currPos++;
|
|
5442
|
+
} else {
|
|
5443
|
+
s5 = peg$FAILED;
|
|
5444
|
+
if (peg$silentFails === 0) { peg$fail(peg$e72); }
|
|
5445
|
+
}
|
|
5446
|
+
if (s5 !== peg$FAILED) {
|
|
5447
|
+
s6 = peg$parse__();
|
|
5448
|
+
s7 = peg$parseExpression();
|
|
5449
|
+
if (s7 !== peg$FAILED) {
|
|
5450
|
+
peg$savedPos = s0;
|
|
5451
|
+
s0 = peg$f72(s3, s7);
|
|
5452
|
+
} else {
|
|
5453
|
+
peg$currPos = s0;
|
|
5454
|
+
s0 = peg$FAILED;
|
|
5455
|
+
}
|
|
5456
|
+
} else {
|
|
5457
|
+
peg$currPos = s0;
|
|
5458
|
+
s0 = peg$FAILED;
|
|
5459
|
+
}
|
|
5460
|
+
} else {
|
|
5461
|
+
peg$currPos = s0;
|
|
5462
|
+
s0 = peg$FAILED;
|
|
5463
|
+
}
|
|
5464
|
+
} else {
|
|
5465
|
+
peg$currPos = s0;
|
|
5466
|
+
s0 = peg$FAILED;
|
|
5467
|
+
}
|
|
5468
|
+
|
|
5469
|
+
return s0;
|
|
5470
|
+
}
|
|
5471
|
+
|
|
5472
|
+
function peg$parseVariableDeclarationList() {
|
|
5473
|
+
var s0, s1, s2, s3, s4, s5, s6, s7;
|
|
5474
|
+
|
|
5475
|
+
s0 = peg$currPos;
|
|
5476
|
+
s1 = peg$parseVariableDeclaration();
|
|
5477
|
+
if (s1 !== peg$FAILED) {
|
|
5478
|
+
s2 = [];
|
|
5479
|
+
s3 = peg$currPos;
|
|
5480
|
+
s4 = peg$parse__();
|
|
5481
|
+
if (input.charCodeAt(peg$currPos) === 44) {
|
|
5482
|
+
s5 = peg$c39;
|
|
5483
|
+
peg$currPos++;
|
|
5484
|
+
} else {
|
|
5485
|
+
s5 = peg$FAILED;
|
|
5486
|
+
if (peg$silentFails === 0) { peg$fail(peg$e72); }
|
|
5487
|
+
}
|
|
5488
|
+
if (s5 !== peg$FAILED) {
|
|
5489
|
+
s6 = peg$parse__();
|
|
5490
|
+
s7 = peg$parseVariableDeclaration();
|
|
5491
|
+
if (s7 !== peg$FAILED) {
|
|
5492
|
+
s4 = [s4, s5, s6, s7];
|
|
5493
|
+
s3 = s4;
|
|
5494
|
+
} else {
|
|
5495
|
+
peg$currPos = s3;
|
|
5496
|
+
s3 = peg$FAILED;
|
|
5497
|
+
}
|
|
5498
|
+
} else {
|
|
5499
|
+
peg$currPos = s3;
|
|
5500
|
+
s3 = peg$FAILED;
|
|
5501
|
+
}
|
|
5502
|
+
while (s3 !== peg$FAILED) {
|
|
5503
|
+
s2.push(s3);
|
|
5504
|
+
s3 = peg$currPos;
|
|
5505
|
+
s4 = peg$parse__();
|
|
5506
|
+
if (input.charCodeAt(peg$currPos) === 44) {
|
|
5507
|
+
s5 = peg$c39;
|
|
5508
|
+
peg$currPos++;
|
|
5509
|
+
} else {
|
|
5510
|
+
s5 = peg$FAILED;
|
|
5511
|
+
if (peg$silentFails === 0) { peg$fail(peg$e72); }
|
|
5512
|
+
}
|
|
5513
|
+
if (s5 !== peg$FAILED) {
|
|
5514
|
+
s6 = peg$parse__();
|
|
5515
|
+
s7 = peg$parseVariableDeclaration();
|
|
5516
|
+
if (s7 !== peg$FAILED) {
|
|
5517
|
+
s4 = [s4, s5, s6, s7];
|
|
5518
|
+
s3 = s4;
|
|
5519
|
+
} else {
|
|
5520
|
+
peg$currPos = s3;
|
|
5521
|
+
s3 = peg$FAILED;
|
|
5522
|
+
}
|
|
5523
|
+
} else {
|
|
5524
|
+
peg$currPos = s3;
|
|
5525
|
+
s3 = peg$FAILED;
|
|
5526
|
+
}
|
|
5527
|
+
}
|
|
5528
|
+
peg$savedPos = s0;
|
|
5529
|
+
s0 = peg$f73(s1, s2);
|
|
5530
|
+
} else {
|
|
5531
|
+
peg$currPos = s0;
|
|
5532
|
+
s0 = peg$FAILED;
|
|
5533
|
+
}
|
|
5534
|
+
|
|
5535
|
+
return s0;
|
|
5536
|
+
}
|
|
5537
|
+
|
|
5538
|
+
function peg$parseVariableDeclaration() {
|
|
5539
|
+
var s0, s1, s2, s3, s4;
|
|
5540
|
+
|
|
5541
|
+
s0 = peg$currPos;
|
|
5542
|
+
s1 = peg$parseIdentifier();
|
|
5543
|
+
if (s1 !== peg$FAILED) {
|
|
5544
|
+
s2 = peg$currPos;
|
|
5545
|
+
s3 = peg$parse__();
|
|
5546
|
+
s4 = peg$parseInitialiser();
|
|
5547
|
+
if (s4 !== peg$FAILED) {
|
|
5548
|
+
s3 = [s3, s4];
|
|
5549
|
+
s2 = s3;
|
|
5550
|
+
} else {
|
|
5551
|
+
peg$currPos = s2;
|
|
5552
|
+
s2 = peg$FAILED;
|
|
5553
|
+
}
|
|
5554
|
+
if (s2 !== peg$FAILED) {
|
|
5555
|
+
peg$savedPos = s0;
|
|
5556
|
+
s0 = peg$f74(s1, s2);
|
|
5557
|
+
} else {
|
|
5558
|
+
peg$currPos = s0;
|
|
5559
|
+
s0 = peg$FAILED;
|
|
5560
|
+
}
|
|
5561
|
+
} else {
|
|
5562
|
+
peg$currPos = s0;
|
|
5563
|
+
s0 = peg$FAILED;
|
|
5564
|
+
}
|
|
5565
|
+
|
|
5566
|
+
return s0;
|
|
5567
|
+
}
|
|
5568
|
+
|
|
5569
|
+
function peg$parseInitialiser() {
|
|
5570
|
+
var s0, s1, s2, s3;
|
|
5571
|
+
|
|
5572
|
+
s0 = peg$currPos;
|
|
5573
|
+
s1 = peg$parseEqualOperator();
|
|
5574
|
+
if (s1 !== peg$FAILED) {
|
|
5575
|
+
s2 = peg$parse__();
|
|
5576
|
+
s3 = peg$parseExpression();
|
|
5577
|
+
if (s3 !== peg$FAILED) {
|
|
5578
|
+
peg$savedPos = s0;
|
|
5579
|
+
s0 = peg$f75(s3);
|
|
5580
|
+
} else {
|
|
5581
|
+
peg$currPos = s0;
|
|
5582
|
+
s0 = peg$FAILED;
|
|
5583
|
+
}
|
|
5584
|
+
} else {
|
|
5585
|
+
peg$currPos = s0;
|
|
5586
|
+
s0 = peg$FAILED;
|
|
5587
|
+
}
|
|
5588
|
+
|
|
5589
|
+
return s0;
|
|
5590
|
+
}
|
|
5591
|
+
|
|
5592
|
+
function peg$parseEqualOperator() {
|
|
5593
|
+
var s0, s1, s2, s3;
|
|
5594
|
+
|
|
5595
|
+
s0 = peg$currPos;
|
|
5596
|
+
if (input.charCodeAt(peg$currPos) === 61) {
|
|
5597
|
+
s1 = peg$c56;
|
|
5598
|
+
peg$currPos++;
|
|
5599
|
+
} else {
|
|
5600
|
+
s1 = peg$FAILED;
|
|
5601
|
+
if (peg$silentFails === 0) { peg$fail(peg$e91); }
|
|
5602
|
+
}
|
|
5603
|
+
if (s1 !== peg$FAILED) {
|
|
5604
|
+
s2 = peg$currPos;
|
|
5605
|
+
peg$silentFails++;
|
|
5606
|
+
if (input.charCodeAt(peg$currPos) === 61) {
|
|
5607
|
+
s3 = peg$c56;
|
|
5608
|
+
peg$currPos++;
|
|
5609
|
+
} else {
|
|
5610
|
+
s3 = peg$FAILED;
|
|
5611
|
+
if (peg$silentFails === 0) { peg$fail(peg$e91); }
|
|
5612
|
+
}
|
|
5613
|
+
peg$silentFails--;
|
|
5614
|
+
if (s3 === peg$FAILED) {
|
|
5615
|
+
s2 = undefined;
|
|
5616
|
+
} else {
|
|
5617
|
+
peg$currPos = s2;
|
|
5618
|
+
s2 = peg$FAILED;
|
|
5619
|
+
}
|
|
5620
|
+
if (s2 !== peg$FAILED) {
|
|
5621
|
+
s1 = [s1, s2];
|
|
5622
|
+
s0 = s1;
|
|
5623
|
+
} else {
|
|
5624
|
+
peg$currPos = s0;
|
|
5625
|
+
s0 = peg$FAILED;
|
|
5626
|
+
}
|
|
5627
|
+
} else {
|
|
5628
|
+
peg$currPos = s0;
|
|
5629
|
+
s0 = peg$FAILED;
|
|
5630
|
+
}
|
|
5631
|
+
|
|
5632
|
+
return s0;
|
|
5633
|
+
}
|
|
5634
|
+
|
|
5635
|
+
function peg$parseExpression() {
|
|
5636
|
+
var s0;
|
|
5637
|
+
|
|
5638
|
+
s0 = peg$parseLetExpression();
|
|
5639
|
+
if (s0 === peg$FAILED) {
|
|
5640
|
+
s0 = peg$parseLambdaExpression();
|
|
5641
|
+
if (s0 === peg$FAILED) {
|
|
5642
|
+
s0 = peg$parsePipeExpression();
|
|
5109
5643
|
}
|
|
5110
5644
|
}
|
|
5111
5645
|
|
|
@@ -5116,14 +5650,14 @@ function peg$parse(input, options) {
|
|
|
5116
5650
|
var s0, s1, s2;
|
|
5117
5651
|
|
|
5118
5652
|
s0 = peg$currPos;
|
|
5119
|
-
s1 = peg$
|
|
5653
|
+
s1 = peg$parseExpression();
|
|
5120
5654
|
if (s1 === peg$FAILED) {
|
|
5121
5655
|
s1 = null;
|
|
5122
5656
|
}
|
|
5123
5657
|
s2 = peg$parseEOS();
|
|
5124
5658
|
if (s2 !== peg$FAILED) {
|
|
5125
5659
|
peg$savedPos = s0;
|
|
5126
|
-
s0 = peg$
|
|
5660
|
+
s0 = peg$f76(s1);
|
|
5127
5661
|
} else {
|
|
5128
5662
|
peg$currPos = s0;
|
|
5129
5663
|
s0 = peg$FAILED;
|