diff --git a/lib/compiler/passes/generate-javascript.js b/lib/compiler/passes/generate-javascript.js index 90cccba..1d27101 100644 --- a/lib/compiler/passes/generate-javascript.js +++ b/lib/compiler/passes/generate-javascript.js @@ -277,7 +277,7 @@ module.exports = function(ast, options) { ' case ' + op.FAIL + ':', // FAIL e ' stack.push(peg$FAILED);', ' if (peg$silentFails === 0) {', - ' peg$fail(peg$consts[bc[ip + 1]], peg$currPos);', + ' peg$expected(peg$consts[bc[ip + 1]], peg$currPos);', ' }', ' ip += 2;', ' break;', @@ -597,7 +597,7 @@ module.exports = function(ast, options) { case op.FAIL: // FAIL e parts.push(stack.push('peg$FAILED')); - parts.push('if (peg$silentFails === 0) { peg$fail(' + c(bc[ip + 1]) + ', peg$currPos); }'); + parts.push('if (peg$silentFails === 0) { peg$expected(' + c(bc[ip + 1]) + ', peg$currPos); }'); ip += 2; break; @@ -857,7 +857,10 @@ module.exports = function(ast, options) { '', ' function expected(description) {', ' if (peg$silentFails === 0) {', - ' peg$fail({ type: "other", description: description }, peg$reportedPos);', + ' peg$expected(', + ' { type: "other", description: description },', + ' peg$reportedPos', + ' );', ' }', ' peg$userFail = true;', ' }', @@ -895,7 +898,7 @@ module.exports = function(ast, options) { ' return peg$cachedPosDetails;', ' }', '', - ' function peg$fail(expected, pos) {', + ' function peg$expected(expected, pos) {', ' if (pos < peg$maxFailPos) { return; }', '', ' if (pos > peg$maxFailPos) {', diff --git a/lib/parser.js b/lib/parser.js index 3e9069c..e110efb 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -417,7 +417,10 @@ module.exports = (function() { function expected(description) { if (peg$silentFails === 0) { - peg$fail({ type: "other", description: description }, peg$reportedPos); + peg$expected( + { type: "other", description: description }, + peg$reportedPos + ); } peg$userFail = true; } @@ -455,7 +458,7 @@ module.exports = (function() { return peg$cachedPosDetails; } - function peg$fail(expected, pos) { + function peg$expected(expected, pos) { if (pos < peg$maxFailPos) { return; } if (pos > peg$maxFailPos) { @@ -1136,7 +1139,7 @@ module.exports = (function() { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c22, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c22, peg$currPos); } } return s0; @@ -1152,7 +1155,7 @@ module.exports = (function() { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c25, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c25, peg$currPos); } } if (s2 !== peg$FAILED) { s3 = []; @@ -1173,7 +1176,7 @@ module.exports = (function() { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c27, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c27, peg$currPos); } } if (s4 !== peg$FAILED) { s2 = [s2, s3, s4]; @@ -1223,7 +1226,7 @@ module.exports = (function() { peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c29, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c29, peg$currPos); } } return s0; @@ -1238,7 +1241,7 @@ module.exports = (function() { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c31, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c31, peg$currPos); } } if (s1 !== peg$FAILED) { s2 = peg$parse__(); @@ -1274,7 +1277,7 @@ module.exports = (function() { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c34, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c34, peg$currPos); } } if (s1 !== peg$FAILED) { s2 = peg$parse__(); @@ -1310,7 +1313,7 @@ module.exports = (function() { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c37, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c37, peg$currPos); } } if (s1 !== peg$FAILED) { s2 = peg$parse__(); @@ -1346,7 +1349,7 @@ module.exports = (function() { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c40, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c40, peg$currPos); } } if (s1 !== peg$FAILED) { s2 = peg$parse__(); @@ -1382,7 +1385,7 @@ module.exports = (function() { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c43, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c43, peg$currPos); } } if (s1 !== peg$FAILED) { s2 = peg$parse__(); @@ -1418,7 +1421,7 @@ module.exports = (function() { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c46, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c46, peg$currPos); } } if (s1 !== peg$FAILED) { s2 = peg$parse__(); @@ -1454,7 +1457,7 @@ module.exports = (function() { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c49, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c49, peg$currPos); } } if (s1 !== peg$FAILED) { s2 = peg$parse__(); @@ -1490,7 +1493,7 @@ module.exports = (function() { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c52, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c52, peg$currPos); } } if (s1 !== peg$FAILED) { s2 = peg$parse__(); @@ -1526,7 +1529,7 @@ module.exports = (function() { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c55, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c55, peg$currPos); } } if (s1 !== peg$FAILED) { s2 = peg$parse__(); @@ -1562,7 +1565,7 @@ module.exports = (function() { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c58, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c58, peg$currPos); } } if (s1 !== peg$FAILED) { s2 = peg$parse__(); @@ -1598,7 +1601,7 @@ module.exports = (function() { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c61, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c61, peg$currPos); } } if (s1 !== peg$FAILED) { s2 = peg$parse__(); @@ -1634,7 +1637,7 @@ module.exports = (function() { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c64, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c64, peg$currPos); } } if (s1 !== peg$FAILED) { s2 = peg$parse__(); @@ -1670,7 +1673,7 @@ module.exports = (function() { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c67, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c67, peg$currPos); } } if (s1 !== peg$FAILED) { s2 = peg$parse__(); @@ -1711,7 +1714,7 @@ module.exports = (function() { peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c71, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c71, peg$currPos); } } } if (s3 !== peg$FAILED) { @@ -1725,7 +1728,7 @@ module.exports = (function() { peg$currPos++; } else { s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c71, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c71, peg$currPos); } } } } @@ -1740,7 +1743,7 @@ module.exports = (function() { peg$currPos++; } else { s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c71, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c71, peg$currPos); } } } } @@ -1784,7 +1787,7 @@ module.exports = (function() { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c69, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c69, peg$currPos); } } return s0; @@ -1805,7 +1808,7 @@ module.exports = (function() { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c75, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c75, peg$currPos); } } if (s2 === peg$FAILED) { s2 = peg$c1; @@ -1838,7 +1841,7 @@ module.exports = (function() { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c73, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c73, peg$currPos); } } return s0; @@ -1877,7 +1880,7 @@ module.exports = (function() { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c77, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c77, peg$currPos); } } return s0; @@ -1892,7 +1895,7 @@ module.exports = (function() { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c80, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c80, peg$currPos); } } if (s1 !== peg$FAILED) { s2 = []; @@ -1907,7 +1910,7 @@ module.exports = (function() { peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c80, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c80, peg$currPos); } } if (s3 !== peg$FAILED) { peg$reportedPos = s0; @@ -1970,7 +1973,7 @@ module.exports = (function() { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c80, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c80, peg$currPos); } } if (s2 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 92) { @@ -1978,7 +1981,7 @@ module.exports = (function() { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c83, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c83, peg$currPos); } } if (s2 === peg$FAILED) { s2 = peg$parseeolChar(); @@ -1997,7 +2000,7 @@ module.exports = (function() { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c84, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c84, peg$currPos); } } if (s2 !== peg$FAILED) { peg$reportedPos = s0; @@ -2031,7 +2034,7 @@ module.exports = (function() { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c87, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c87, peg$currPos); } } if (s1 !== peg$FAILED) { s2 = []; @@ -2046,7 +2049,7 @@ module.exports = (function() { peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c87, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c87, peg$currPos); } } if (s3 !== peg$FAILED) { peg$reportedPos = s0; @@ -2109,7 +2112,7 @@ module.exports = (function() { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c87, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c87, peg$currPos); } } if (s2 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 92) { @@ -2117,7 +2120,7 @@ module.exports = (function() { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c83, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c83, peg$currPos); } } if (s2 === peg$FAILED) { s2 = peg$parseeolChar(); @@ -2136,7 +2139,7 @@ module.exports = (function() { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c84, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c84, peg$currPos); } } if (s2 !== peg$FAILED) { peg$reportedPos = s0; @@ -2171,7 +2174,7 @@ module.exports = (function() { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c90, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c90, peg$currPos); } } if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 94) { @@ -2179,7 +2182,7 @@ module.exports = (function() { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c92, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c92, peg$currPos); } } if (s2 === peg$FAILED) { s2 = peg$c1; @@ -2203,7 +2206,7 @@ module.exports = (function() { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c94, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c94, peg$currPos); } } if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 105) { @@ -2211,7 +2214,7 @@ module.exports = (function() { peg$currPos++; } else { s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c75, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c75, peg$currPos); } } if (s5 === peg$FAILED) { s5 = peg$c1; @@ -2256,7 +2259,7 @@ module.exports = (function() { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c88, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c88, peg$currPos); } } return s0; @@ -2273,7 +2276,7 @@ module.exports = (function() { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c97, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c97, peg$currPos); } } if (s2 !== peg$FAILED) { s3 = peg$parseclassCharacter(); @@ -2359,7 +2362,7 @@ module.exports = (function() { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c94, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c94, peg$currPos); } } if (s2 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 92) { @@ -2367,7 +2370,7 @@ module.exports = (function() { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c83, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c83, peg$currPos); } } if (s2 === peg$FAILED) { s2 = peg$parseeolChar(); @@ -2386,7 +2389,7 @@ module.exports = (function() { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c84, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c84, peg$currPos); } } if (s2 !== peg$FAILED) { peg$reportedPos = s0; @@ -2420,7 +2423,7 @@ module.exports = (function() { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c83, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c83, peg$currPos); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -2432,7 +2435,7 @@ module.exports = (function() { peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c101, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c101, peg$currPos); } } if (s3 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 117) { @@ -2440,7 +2443,7 @@ module.exports = (function() { peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c103, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c103, peg$currPos); } } if (s3 === peg$FAILED) { s3 = peg$parseeolChar(); @@ -2460,7 +2463,7 @@ module.exports = (function() { peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c84, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c84, peg$currPos); } } if (s3 !== peg$FAILED) { peg$reportedPos = s0; @@ -2498,7 +2501,7 @@ module.exports = (function() { peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c106, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c106, peg$currPos); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -2543,7 +2546,7 @@ module.exports = (function() { peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c109, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c109, peg$currPos); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -2598,7 +2601,7 @@ module.exports = (function() { peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c112, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c112, peg$currPos); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -2665,7 +2668,7 @@ module.exports = (function() { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c83, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c83, peg$currPos); } } if (s1 !== peg$FAILED) { s2 = peg$parseeol(); @@ -2700,7 +2703,7 @@ module.exports = (function() { peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c115, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c115, peg$currPos); } } return s0; @@ -2714,7 +2717,7 @@ module.exports = (function() { peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c117, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c117, peg$currPos); } } return s0; @@ -2739,7 +2742,7 @@ module.exports = (function() { peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c119, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c119, peg$currPos); } } return s0; @@ -2753,7 +2756,7 @@ module.exports = (function() { peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c121, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c121, peg$currPos); } } return s0; @@ -2795,7 +2798,7 @@ module.exports = (function() { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c122, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c122, peg$currPos); } } return s0; @@ -2810,7 +2813,7 @@ module.exports = (function() { peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c124, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c124, peg$currPos); } } if (s1 !== peg$FAILED) { s2 = []; @@ -2831,7 +2834,7 @@ module.exports = (function() { peg$currPos++; } else { s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c84, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c84, peg$currPos); } } if (s5 !== peg$FAILED) { s4 = [s4, s5]; @@ -2863,7 +2866,7 @@ module.exports = (function() { peg$currPos++; } else { s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c84, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c84, peg$currPos); } } if (s5 !== peg$FAILED) { s4 = [s4, s5]; @@ -2901,7 +2904,7 @@ module.exports = (function() { peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c126, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c126, peg$currPos); } } if (s1 !== peg$FAILED) { s2 = []; @@ -2913,7 +2916,7 @@ module.exports = (function() { peg$currPos += 2; } else { s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c128, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c128, peg$currPos); } } peg$silentFails--; if (s5 === peg$FAILED) { @@ -2928,7 +2931,7 @@ module.exports = (function() { peg$currPos++; } else { s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c84, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c84, peg$currPos); } } if (s5 !== peg$FAILED) { s4 = [s4, s5]; @@ -2951,7 +2954,7 @@ module.exports = (function() { peg$currPos += 2; } else { s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c128, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c128, peg$currPos); } } peg$silentFails--; if (s5 === peg$FAILED) { @@ -2966,7 +2969,7 @@ module.exports = (function() { peg$currPos++; } else { s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c84, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c84, peg$currPos); } } if (s5 !== peg$FAILED) { s4 = [s4, s5]; @@ -2986,7 +2989,7 @@ module.exports = (function() { peg$currPos += 2; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c128, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c128, peg$currPos); } } if (s3 !== peg$FAILED) { s1 = [s1, s2, s3]; @@ -3016,7 +3019,7 @@ module.exports = (function() { peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c131, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c131, peg$currPos); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c132) { @@ -3024,7 +3027,7 @@ module.exports = (function() { peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c133, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c133, peg$currPos); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 13) { @@ -3032,7 +3035,7 @@ module.exports = (function() { peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c135, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c135, peg$currPos); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8232) { @@ -3040,7 +3043,7 @@ module.exports = (function() { peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c137, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c137, peg$currPos); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8233) { @@ -3048,7 +3051,7 @@ module.exports = (function() { peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c139, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c139, peg$currPos); } } } } @@ -3057,7 +3060,7 @@ module.exports = (function() { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c129, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c129, peg$currPos); } } return s0; @@ -3071,7 +3074,7 @@ module.exports = (function() { peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c141, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c141, peg$currPos); } } return s0; @@ -3086,12 +3089,12 @@ module.exports = (function() { peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c144, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c144, peg$currPos); } } peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c142, peg$currPos); } + if (peg$silentFails === 0) { peg$expected(peg$c142, peg$currPos); } } return s0;