unexpectedly 3.0.4 → 4.0.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/index.js +1 -0
- package/package.json +6 -5
- package/testFile.peg.js +111 -200
- package/version.js +2 -2
package/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {Runner, SKIPPED} from './runner.js';
|
|
2
2
|
import {hexlify, mapObj} from './utils.js';
|
|
3
3
|
import Mocha from 'mocha';
|
|
4
|
+
// eslint-disable-next-line n/prefer-import/assert-strict
|
|
4
5
|
import assert from 'node:assert';
|
|
5
6
|
import fs from 'node:fs/promises';
|
|
6
7
|
import {parse} from './testFile.peg.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unexpectedly",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Keep a bunch of test cases in a file, with their expected results",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -32,10 +32,11 @@
|
|
|
32
32
|
},
|
|
33
33
|
"license": "MPL-2.0",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@peggyjs/from-mem": "
|
|
36
|
-
"commander": "
|
|
37
|
-
"mocha": "^
|
|
35
|
+
"@peggyjs/from-mem": "4.0.0",
|
|
36
|
+
"commander": "^15.0.0",
|
|
37
|
+
"mocha": "^12.0.3"
|
|
38
38
|
},
|
|
39
|
+
"packageManager": "pnpm@12.14.0",
|
|
39
40
|
"pnpm": {
|
|
40
41
|
"overrides": {
|
|
41
42
|
"mocha@11.7.5>diff": "8.0.3",
|
|
@@ -43,6 +44,6 @@
|
|
|
43
44
|
}
|
|
44
45
|
},
|
|
45
46
|
"engines": {
|
|
46
|
-
"node": ">=
|
|
47
|
+
"node": ">=22"
|
|
47
48
|
}
|
|
48
49
|
}
|
package/testFile.peg.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @generated by Peggy 5.1.
|
|
1
|
+
// @generated by Peggy 5.1.1.
|
|
2
2
|
//
|
|
3
3
|
// https://peggyjs.org/
|
|
4
4
|
|
|
@@ -61,10 +61,9 @@ class peg$SyntaxError extends SyntaxError {
|
|
|
61
61
|
return s;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
function
|
|
64
|
+
function escape(s, special) {
|
|
65
65
|
return unicodeEscape(s
|
|
66
|
-
.replace(
|
|
67
|
-
.replace(/"/g, "\\\"")
|
|
66
|
+
.replace(special, "\\$&")
|
|
68
67
|
.replace(/\0/g, "\\0")
|
|
69
68
|
.replace(/\t/g, "\\t")
|
|
70
69
|
.replace(/\n/g, "\\n")
|
|
@@ -73,18 +72,12 @@ class peg$SyntaxError extends SyntaxError {
|
|
|
73
72
|
.replace(/[\x10-\x1F\x7F-\x9F]/g, ch => "\\x" + hex(ch)));
|
|
74
73
|
}
|
|
75
74
|
|
|
75
|
+
function literalEscape(s) {
|
|
76
|
+
return escape(s, /[\\"]/g);
|
|
77
|
+
}
|
|
78
|
+
|
|
76
79
|
function classEscape(s) {
|
|
77
|
-
return
|
|
78
|
-
.replace(/\\/g, "\\\\")
|
|
79
|
-
.replace(/\]/g, "\\]")
|
|
80
|
-
.replace(/\^/g, "\\^")
|
|
81
|
-
.replace(/-/g, "\\-")
|
|
82
|
-
.replace(/\0/g, "\\0")
|
|
83
|
-
.replace(/\t/g, "\\t")
|
|
84
|
-
.replace(/\n/g, "\\n")
|
|
85
|
-
.replace(/\r/g, "\\r")
|
|
86
|
-
.replace(/[\x00-\x0F]/g, ch => "\\x0" + hex(ch))
|
|
87
|
-
.replace(/[\x10-\x1F\x7F-\x9F]/g, ch => "\\x" + hex(ch)));
|
|
80
|
+
return escape(s, /[\\\]^-]/g);
|
|
88
81
|
}
|
|
89
82
|
|
|
90
83
|
const DESCRIBE_EXPECTATION_FNS = {
|
|
@@ -189,14 +182,6 @@ function peg$parse(input, options) {
|
|
|
189
182
|
const peg$c19 = "\r\n";
|
|
190
183
|
const peg$c20 = "\r";
|
|
191
184
|
|
|
192
|
-
const peg$r0 = /^[^\\"]/;
|
|
193
|
-
const peg$r1 = /^[^\\']/;
|
|
194
|
-
const peg$r2 = /^[^\\`]/;
|
|
195
|
-
const peg$r3 = /^[a-fA-F0-9]/;
|
|
196
|
-
const peg$r4 = /^[^ #:'"\t\r\n]/;
|
|
197
|
-
const peg$r5 = /^[^\r\n]/;
|
|
198
|
-
const peg$r6 = /^[ \t]/;
|
|
199
|
-
const peg$r7 = /^[ \t\r\n]/;
|
|
200
185
|
|
|
201
186
|
const peg$e0 = peg$literalExpectation("#!", false);
|
|
202
187
|
const peg$e1 = peg$literalExpectation("!", false);
|
|
@@ -289,6 +274,7 @@ function peg$parse(input, options) {
|
|
|
289
274
|
let peg$silentFails = options.peg$silentFails | 0;
|
|
290
275
|
|
|
291
276
|
let peg$result;
|
|
277
|
+
let peg$charCode;
|
|
292
278
|
|
|
293
279
|
if (options.startRule) {
|
|
294
280
|
if (!(options.startRule in peg$startRuleFunctions)) {
|
|
@@ -592,22 +578,7 @@ function peg$parse(input, options) {
|
|
|
592
578
|
s1 = peg$parseresults();
|
|
593
579
|
if (s1 !== peg$FAILED) {
|
|
594
580
|
s2 = [];
|
|
595
|
-
|
|
596
|
-
s4 = peg$parseLWS();
|
|
597
|
-
if (s4 !== peg$FAILED) {
|
|
598
|
-
s5 = peg$parsechunk();
|
|
599
|
-
if (s5 !== peg$FAILED) {
|
|
600
|
-
s3 = s5;
|
|
601
|
-
} else {
|
|
602
|
-
peg$currPos = s3;
|
|
603
|
-
s3 = peg$FAILED;
|
|
604
|
-
}
|
|
605
|
-
} else {
|
|
606
|
-
peg$currPos = s3;
|
|
607
|
-
s3 = peg$FAILED;
|
|
608
|
-
}
|
|
609
|
-
while (s3 !== peg$FAILED) {
|
|
610
|
-
s2.push(s3);
|
|
581
|
+
for (;;) {
|
|
611
582
|
s3 = peg$currPos;
|
|
612
583
|
s4 = peg$parseLWS();
|
|
613
584
|
if (s4 !== peg$FAILED) {
|
|
@@ -622,6 +593,8 @@ function peg$parse(input, options) {
|
|
|
622
593
|
peg$currPos = s3;
|
|
623
594
|
s3 = peg$FAILED;
|
|
624
595
|
}
|
|
596
|
+
if (s3 === peg$FAILED) { break; }
|
|
597
|
+
s2.push(s3);
|
|
625
598
|
}
|
|
626
599
|
s3 = peg$parsecomment();
|
|
627
600
|
if (s3 === peg$FAILED) {
|
|
@@ -687,10 +660,10 @@ function peg$parse(input, options) {
|
|
|
687
660
|
}
|
|
688
661
|
if (s1 !== peg$FAILED) {
|
|
689
662
|
s2 = [];
|
|
690
|
-
|
|
691
|
-
while (s3 !== peg$FAILED) {
|
|
692
|
-
s2.push(s3);
|
|
663
|
+
for (;;) {
|
|
693
664
|
s3 = peg$parsedqchar();
|
|
665
|
+
if (s3 === peg$FAILED) { break; }
|
|
666
|
+
s2.push(s3);
|
|
694
667
|
}
|
|
695
668
|
if (input.charCodeAt(peg$currPos) === 34) {
|
|
696
669
|
s3 = peg$c3;
|
|
@@ -721,10 +694,10 @@ function peg$parse(input, options) {
|
|
|
721
694
|
}
|
|
722
695
|
if (s1 !== peg$FAILED) {
|
|
723
696
|
s2 = [];
|
|
724
|
-
|
|
725
|
-
while (s3 !== peg$FAILED) {
|
|
726
|
-
s2.push(s3);
|
|
697
|
+
for (;;) {
|
|
727
698
|
s3 = peg$parsesqchar();
|
|
699
|
+
if (s3 === peg$FAILED) { break; }
|
|
700
|
+
s2.push(s3);
|
|
728
701
|
}
|
|
729
702
|
if (input.charCodeAt(peg$currPos) === 39) {
|
|
730
703
|
s3 = peg$c4;
|
|
@@ -755,10 +728,10 @@ function peg$parse(input, options) {
|
|
|
755
728
|
}
|
|
756
729
|
if (s1 !== peg$FAILED) {
|
|
757
730
|
s2 = [];
|
|
758
|
-
|
|
759
|
-
while (s3 !== peg$FAILED) {
|
|
760
|
-
s2.push(s3);
|
|
731
|
+
for (;;) {
|
|
761
732
|
s3 = peg$parsebqchar();
|
|
733
|
+
if (s3 === peg$FAILED) { break; }
|
|
734
|
+
s2.push(s3);
|
|
762
735
|
}
|
|
763
736
|
if (input.charCodeAt(peg$currPos) === 96) {
|
|
764
737
|
s3 = peg$c5;
|
|
@@ -806,25 +779,18 @@ function peg$parse(input, options) {
|
|
|
806
779
|
if (s0 === peg$FAILED) {
|
|
807
780
|
s0 = peg$currPos;
|
|
808
781
|
s1 = [];
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
peg$
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
if (s2 !== peg$FAILED) {
|
|
817
|
-
while (s2 !== peg$FAILED) {
|
|
818
|
-
s1.push(s2);
|
|
819
|
-
s2 = input.charAt(peg$currPos);
|
|
820
|
-
if (peg$r0.test(s2)) {
|
|
821
|
-
peg$currPos++;
|
|
822
|
-
} else {
|
|
823
|
-
s2 = peg$FAILED;
|
|
824
|
-
if (peg$silentFails === 0) { peg$fail(peg$e8); }
|
|
825
|
-
}
|
|
782
|
+
for (;;) {
|
|
783
|
+
s2 = input.charAt(peg$currPos);
|
|
784
|
+
if (s2 !== "" && !(peg$charCode = s2.charCodeAt(0), peg$charCode === 92 || peg$charCode === 34)) {
|
|
785
|
+
peg$currPos++;
|
|
786
|
+
} else {
|
|
787
|
+
s2 = peg$FAILED;
|
|
788
|
+
if (peg$silentFails === 0) { peg$fail(peg$e8); }
|
|
826
789
|
}
|
|
827
|
-
|
|
790
|
+
if (s2 === peg$FAILED) { break; }
|
|
791
|
+
s1.push(s2);
|
|
792
|
+
}
|
|
793
|
+
if (s1.length < 1) {
|
|
828
794
|
s1 = peg$FAILED;
|
|
829
795
|
}
|
|
830
796
|
if (s1 !== peg$FAILED) {
|
|
@@ -865,25 +831,18 @@ function peg$parse(input, options) {
|
|
|
865
831
|
if (s0 === peg$FAILED) {
|
|
866
832
|
s0 = peg$currPos;
|
|
867
833
|
s1 = [];
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
peg$
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
if (s2 !== peg$FAILED) {
|
|
876
|
-
while (s2 !== peg$FAILED) {
|
|
877
|
-
s1.push(s2);
|
|
878
|
-
s2 = input.charAt(peg$currPos);
|
|
879
|
-
if (peg$r1.test(s2)) {
|
|
880
|
-
peg$currPos++;
|
|
881
|
-
} else {
|
|
882
|
-
s2 = peg$FAILED;
|
|
883
|
-
if (peg$silentFails === 0) { peg$fail(peg$e11); }
|
|
884
|
-
}
|
|
834
|
+
for (;;) {
|
|
835
|
+
s2 = input.charAt(peg$currPos);
|
|
836
|
+
if (s2 !== "" && !(peg$charCode = s2.charCodeAt(0), peg$charCode === 92 || peg$charCode === 39)) {
|
|
837
|
+
peg$currPos++;
|
|
838
|
+
} else {
|
|
839
|
+
s2 = peg$FAILED;
|
|
840
|
+
if (peg$silentFails === 0) { peg$fail(peg$e11); }
|
|
885
841
|
}
|
|
886
|
-
|
|
842
|
+
if (s2 === peg$FAILED) { break; }
|
|
843
|
+
s1.push(s2);
|
|
844
|
+
}
|
|
845
|
+
if (s1.length < 1) {
|
|
887
846
|
s1 = peg$FAILED;
|
|
888
847
|
}
|
|
889
848
|
if (s1 !== peg$FAILED) {
|
|
@@ -924,25 +883,18 @@ function peg$parse(input, options) {
|
|
|
924
883
|
if (s0 === peg$FAILED) {
|
|
925
884
|
s0 = peg$currPos;
|
|
926
885
|
s1 = [];
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
peg$
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
if (s2 !== peg$FAILED) {
|
|
935
|
-
while (s2 !== peg$FAILED) {
|
|
936
|
-
s1.push(s2);
|
|
937
|
-
s2 = input.charAt(peg$currPos);
|
|
938
|
-
if (peg$r2.test(s2)) {
|
|
939
|
-
peg$currPos++;
|
|
940
|
-
} else {
|
|
941
|
-
s2 = peg$FAILED;
|
|
942
|
-
if (peg$silentFails === 0) { peg$fail(peg$e14); }
|
|
943
|
-
}
|
|
886
|
+
for (;;) {
|
|
887
|
+
s2 = input.charAt(peg$currPos);
|
|
888
|
+
if (s2 !== "" && !(peg$charCode = s2.charCodeAt(0), peg$charCode === 92 || peg$charCode === 96)) {
|
|
889
|
+
peg$currPos++;
|
|
890
|
+
} else {
|
|
891
|
+
s2 = peg$FAILED;
|
|
892
|
+
if (peg$silentFails === 0) { peg$fail(peg$e14); }
|
|
944
893
|
}
|
|
945
|
-
|
|
894
|
+
if (s2 === peg$FAILED) { break; }
|
|
895
|
+
s1.push(s2);
|
|
896
|
+
}
|
|
897
|
+
if (s1.length < 1) {
|
|
946
898
|
s1 = peg$FAILED;
|
|
947
899
|
}
|
|
948
900
|
if (s1 !== peg$FAILED) {
|
|
@@ -975,25 +927,18 @@ function peg$parse(input, options) {
|
|
|
975
927
|
if (s1 !== peg$FAILED) {
|
|
976
928
|
s2 = peg$currPos;
|
|
977
929
|
s3 = [];
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
peg$
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
if (s4 !== peg$FAILED) {
|
|
986
|
-
while (s4 !== peg$FAILED) {
|
|
987
|
-
s3.push(s4);
|
|
988
|
-
s4 = input.charAt(peg$currPos);
|
|
989
|
-
if (peg$r3.test(s4)) {
|
|
990
|
-
peg$currPos++;
|
|
991
|
-
} else {
|
|
992
|
-
s4 = peg$FAILED;
|
|
993
|
-
if (peg$silentFails === 0) { peg$fail(peg$e16); }
|
|
994
|
-
}
|
|
930
|
+
for (;;) {
|
|
931
|
+
s4 = input.charAt(peg$currPos);
|
|
932
|
+
if ((peg$charCode = s4.charCodeAt(0), (peg$charCode >= 97 && peg$charCode <= 102) || (peg$charCode >= 65 && peg$charCode <= 70) || (peg$charCode >= 48 && peg$charCode <= 57))) {
|
|
933
|
+
peg$currPos++;
|
|
934
|
+
} else {
|
|
935
|
+
s4 = peg$FAILED;
|
|
936
|
+
if (peg$silentFails === 0) { peg$fail(peg$e16); }
|
|
995
937
|
}
|
|
996
|
-
|
|
938
|
+
if (s4 === peg$FAILED) { break; }
|
|
939
|
+
s3.push(s4);
|
|
940
|
+
}
|
|
941
|
+
if (s3.length < 1) {
|
|
997
942
|
s3 = peg$FAILED;
|
|
998
943
|
}
|
|
999
944
|
if (s3 !== peg$FAILED) {
|
|
@@ -1021,13 +966,12 @@ function peg$parse(input, options) {
|
|
|
1021
966
|
|
|
1022
967
|
s0 = peg$currPos;
|
|
1023
968
|
s1 = [];
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
} else {
|
|
969
|
+
for (;;) {
|
|
970
|
+
s2 = peg$parsewchar();
|
|
971
|
+
if (s2 === peg$FAILED) { break; }
|
|
972
|
+
s1.push(s2);
|
|
973
|
+
}
|
|
974
|
+
if (s1.length < 1) {
|
|
1031
975
|
s1 = peg$FAILED;
|
|
1032
976
|
}
|
|
1033
977
|
if (s1 !== peg$FAILED) {
|
|
@@ -1044,37 +988,29 @@ function peg$parse(input, options) {
|
|
|
1044
988
|
|
|
1045
989
|
peg$silentFails++;
|
|
1046
990
|
s0 = [];
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
} else {
|
|
991
|
+
for (;;) {
|
|
992
|
+
s1 = peg$parseqchar();
|
|
993
|
+
if (s1 === peg$FAILED) { break; }
|
|
994
|
+
s0.push(s1);
|
|
995
|
+
}
|
|
996
|
+
if (s0.length < 1) {
|
|
1054
997
|
s0 = peg$FAILED;
|
|
1055
998
|
}
|
|
1056
999
|
if (s0 === peg$FAILED) {
|
|
1057
1000
|
s0 = peg$currPos;
|
|
1058
1001
|
s1 = [];
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
peg$
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
if (s2 !== peg$FAILED) {
|
|
1067
|
-
while (s2 !== peg$FAILED) {
|
|
1068
|
-
s1.push(s2);
|
|
1069
|
-
s2 = input.charAt(peg$currPos);
|
|
1070
|
-
if (peg$r4.test(s2)) {
|
|
1071
|
-
peg$currPos++;
|
|
1072
|
-
} else {
|
|
1073
|
-
s2 = peg$FAILED;
|
|
1074
|
-
if (peg$silentFails === 0) { peg$fail(peg$e18); }
|
|
1075
|
-
}
|
|
1002
|
+
for (;;) {
|
|
1003
|
+
s2 = input.charAt(peg$currPos);
|
|
1004
|
+
if (s2 !== "" && !(peg$charCode = s2.charCodeAt(0), peg$charCode === 32 || peg$charCode === 35 || peg$charCode === 58 || peg$charCode === 39 || peg$charCode === 34 || peg$charCode === 9 || peg$charCode === 13 || peg$charCode === 10)) {
|
|
1005
|
+
peg$currPos++;
|
|
1006
|
+
} else {
|
|
1007
|
+
s2 = peg$FAILED;
|
|
1008
|
+
if (peg$silentFails === 0) { peg$fail(peg$e18); }
|
|
1076
1009
|
}
|
|
1077
|
-
|
|
1010
|
+
if (s2 === peg$FAILED) { break; }
|
|
1011
|
+
s1.push(s2);
|
|
1012
|
+
}
|
|
1013
|
+
if (s1.length < 1) {
|
|
1078
1014
|
s1 = peg$FAILED;
|
|
1079
1015
|
}
|
|
1080
1016
|
if (s1 !== peg$FAILED) {
|
|
@@ -1239,22 +1175,16 @@ function peg$parse(input, options) {
|
|
|
1239
1175
|
}
|
|
1240
1176
|
if (s3 !== peg$FAILED) {
|
|
1241
1177
|
s4 = [];
|
|
1242
|
-
|
|
1243
|
-
if (peg$r5.test(s5)) {
|
|
1244
|
-
peg$currPos++;
|
|
1245
|
-
} else {
|
|
1246
|
-
s5 = peg$FAILED;
|
|
1247
|
-
if (peg$silentFails === 0) { peg$fail(peg$e28); }
|
|
1248
|
-
}
|
|
1249
|
-
while (s5 !== peg$FAILED) {
|
|
1250
|
-
s4.push(s5);
|
|
1178
|
+
for (;;) {
|
|
1251
1179
|
s5 = input.charAt(peg$currPos);
|
|
1252
|
-
if (peg$
|
|
1180
|
+
if (s5 !== "" && !(peg$charCode = s5.charCodeAt(0), peg$charCode === 13 || peg$charCode === 10)) {
|
|
1253
1181
|
peg$currPos++;
|
|
1254
1182
|
} else {
|
|
1255
1183
|
s5 = peg$FAILED;
|
|
1256
1184
|
if (peg$silentFails === 0) { peg$fail(peg$e28); }
|
|
1257
1185
|
}
|
|
1186
|
+
if (s5 === peg$FAILED) { break; }
|
|
1187
|
+
s4.push(s5);
|
|
1258
1188
|
}
|
|
1259
1189
|
peg$savedPos = s0;
|
|
1260
1190
|
s0 = peg$f20();
|
|
@@ -1276,22 +1206,16 @@ function peg$parse(input, options) {
|
|
|
1276
1206
|
peg$silentFails++;
|
|
1277
1207
|
s0 = peg$currPos;
|
|
1278
1208
|
s1 = [];
|
|
1279
|
-
|
|
1280
|
-
if (peg$r6.test(s2)) {
|
|
1281
|
-
peg$currPos++;
|
|
1282
|
-
} else {
|
|
1283
|
-
s2 = peg$FAILED;
|
|
1284
|
-
if (peg$silentFails === 0) { peg$fail(peg$e29); }
|
|
1285
|
-
}
|
|
1286
|
-
while (s2 !== peg$FAILED) {
|
|
1287
|
-
s1.push(s2);
|
|
1209
|
+
for (;;) {
|
|
1288
1210
|
s2 = input.charAt(peg$currPos);
|
|
1289
|
-
if (peg$
|
|
1211
|
+
if ((peg$charCode = s2.charCodeAt(0), peg$charCode === 32 || peg$charCode === 9)) {
|
|
1290
1212
|
peg$currPos++;
|
|
1291
1213
|
} else {
|
|
1292
1214
|
s2 = peg$FAILED;
|
|
1293
1215
|
if (peg$silentFails === 0) { peg$fail(peg$e29); }
|
|
1294
1216
|
}
|
|
1217
|
+
if (s2 === peg$FAILED) { break; }
|
|
1218
|
+
s1.push(s2);
|
|
1295
1219
|
}
|
|
1296
1220
|
peg$savedPos = s0;
|
|
1297
1221
|
s1 = peg$f21();
|
|
@@ -1307,22 +1231,16 @@ function peg$parse(input, options) {
|
|
|
1307
1231
|
peg$silentFails++;
|
|
1308
1232
|
s0 = peg$currPos;
|
|
1309
1233
|
s1 = [];
|
|
1310
|
-
|
|
1311
|
-
if (peg$r7.test(s2)) {
|
|
1312
|
-
peg$currPos++;
|
|
1313
|
-
} else {
|
|
1314
|
-
s2 = peg$FAILED;
|
|
1315
|
-
if (peg$silentFails === 0) { peg$fail(peg$e30); }
|
|
1316
|
-
}
|
|
1317
|
-
while (s2 !== peg$FAILED) {
|
|
1318
|
-
s1.push(s2);
|
|
1234
|
+
for (;;) {
|
|
1319
1235
|
s2 = input.charAt(peg$currPos);
|
|
1320
|
-
if (peg$
|
|
1236
|
+
if ((peg$charCode = s2.charCodeAt(0), peg$charCode === 32 || peg$charCode === 9 || peg$charCode === 13 || peg$charCode === 10)) {
|
|
1321
1237
|
peg$currPos++;
|
|
1322
1238
|
} else {
|
|
1323
1239
|
s2 = peg$FAILED;
|
|
1324
1240
|
if (peg$silentFails === 0) { peg$fail(peg$e30); }
|
|
1325
1241
|
}
|
|
1242
|
+
if (s2 === peg$FAILED) { break; }
|
|
1243
|
+
s1.push(s2);
|
|
1326
1244
|
}
|
|
1327
1245
|
peg$savedPos = s0;
|
|
1328
1246
|
s1 = peg$f22();
|
|
@@ -1338,25 +1256,18 @@ function peg$parse(input, options) {
|
|
|
1338
1256
|
peg$silentFails++;
|
|
1339
1257
|
s0 = peg$currPos;
|
|
1340
1258
|
s1 = [];
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
peg$
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
if (s2 !== peg$FAILED) {
|
|
1349
|
-
while (s2 !== peg$FAILED) {
|
|
1350
|
-
s1.push(s2);
|
|
1351
|
-
s2 = input.charAt(peg$currPos);
|
|
1352
|
-
if (peg$r6.test(s2)) {
|
|
1353
|
-
peg$currPos++;
|
|
1354
|
-
} else {
|
|
1355
|
-
s2 = peg$FAILED;
|
|
1356
|
-
if (peg$silentFails === 0) { peg$fail(peg$e29); }
|
|
1357
|
-
}
|
|
1259
|
+
for (;;) {
|
|
1260
|
+
s2 = input.charAt(peg$currPos);
|
|
1261
|
+
if ((peg$charCode = s2.charCodeAt(0), peg$charCode === 32 || peg$charCode === 9)) {
|
|
1262
|
+
peg$currPos++;
|
|
1263
|
+
} else {
|
|
1264
|
+
s2 = peg$FAILED;
|
|
1265
|
+
if (peg$silentFails === 0) { peg$fail(peg$e29); }
|
|
1358
1266
|
}
|
|
1359
|
-
|
|
1267
|
+
if (s2 === peg$FAILED) { break; }
|
|
1268
|
+
s1.push(s2);
|
|
1269
|
+
}
|
|
1270
|
+
if (s1.length < 1) {
|
|
1360
1271
|
s1 = peg$FAILED;
|
|
1361
1272
|
}
|
|
1362
1273
|
if (s1 !== peg$FAILED) {
|
package/version.js
CHANGED