@modular-css/processor
Advanced tools
Comparing version 25.6.0 to 25.7.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [25.7.0](https://github.com/tivac/modular-css/compare/v25.6.0...v25.7.0) (2020-05-15) | ||
### Features | ||
* Support escaped characters in composed class names ([#755](https://github.com/tivac/modular-css/issues/755)) ([6cd4d8a](https://github.com/tivac/modular-css/commit/6cd4d8acc16abc9ac51c778a0b7f42a4c07088e4)) | ||
# [25.6.0](https://github.com/tivac/modular-css/compare/v25.4.1...v25.6.0) (2020-04-21) | ||
@@ -8,0 +19,0 @@ |
{ | ||
"name": "@modular-css/processor", | ||
"version": "25.6.0", | ||
"version": "25.7.0", | ||
"description": "A streamlined reinterpretation of CSS Modules", | ||
@@ -28,3 +28,3 @@ "main": "./processor.js", | ||
"dependency-graph": "^0.9.0", | ||
"escape-string-regexp": "^3.0.0", | ||
"escape-string-regexp": "^4.0.0", | ||
"lodash": "^4.17.0", | ||
@@ -41,3 +41,3 @@ "postcss": "^7.0.0", | ||
}, | ||
"gitHead": "504092a3a0af57e9d988dca0b0ced1b80f2933dd" | ||
"gitHead": "756f3cf67f2886761902bc1fa211f9690954110e" | ||
} |
@@ -157,27 +157,43 @@ /* | ||
peg$c12 = peg$classExpectation(["'", "\r", "\n"], true, false), | ||
peg$c13 = peg$otherExpectation("identifier"), | ||
peg$c14 = /^[a-z0-9\-_]/i, | ||
peg$c15 = peg$classExpectation([["a", "z"], ["0", "9"], "-", "_"], false, true), | ||
peg$c16 = peg$otherExpectation("global"), | ||
peg$c17 = "global", | ||
peg$c18 = peg$literalExpectation("global", false), | ||
peg$c19 = peg$otherExpectation("reference"), | ||
peg$c20 = "(", | ||
peg$c21 = peg$literalExpectation("(", false), | ||
peg$c22 = ")", | ||
peg$c23 = peg$literalExpectation(")", false), | ||
peg$c24 = function(ref) { return { name : ref, global : true }; }, | ||
peg$c25 = function(ref) { return { name : ref }; }, | ||
peg$c26 = peg$otherExpectation("references"), | ||
peg$c27 = ",", | ||
peg$c28 = peg$literalExpectation(",", false), | ||
peg$c29 = function(head, ref) { return ref; }, | ||
peg$c30 = function(head, tail) { return [ head ].concat(tail); }, | ||
peg$c31 = peg$otherExpectation("source"), | ||
peg$c32 = "from", | ||
peg$c33 = peg$literalExpectation("from", false), | ||
peg$c34 = function(source) { | ||
peg$c13 = /^[0-9a-f]/i, | ||
peg$c14 = peg$classExpectation([["0", "9"], ["a", "f"]], false, true), | ||
peg$c15 = /^[\x80-\uFFFF]/, | ||
peg$c16 = peg$classExpectation([["\x80", "\uFFFF"]], false, false), | ||
peg$c17 = "\\", | ||
peg$c18 = peg$literalExpectation("\\", false), | ||
peg$c19 = "\r\n", | ||
peg$c20 = peg$literalExpectation("\r\n", false), | ||
peg$c21 = /^[ \t\r\n\f]/, | ||
peg$c22 = peg$classExpectation([" ", "\t", "\r", "\n", "\f"], false, false), | ||
peg$c23 = function(digits) { | ||
return String.fromCharCode(parseInt(digits, 16)); | ||
}, | ||
peg$c24 = /^[^\r\n\f0-9a-f]/i, | ||
peg$c25 = peg$classExpectation(["\r", "\n", "\f", ["0", "9"], ["a", "f"]], true, true), | ||
peg$c26 = function(char) { return char; }, | ||
peg$c27 = /^[_a-z0-9\-]/i, | ||
peg$c28 = peg$classExpectation(["_", ["a", "z"], ["0", "9"], "-"], false, true), | ||
peg$c29 = peg$otherExpectation("identifier"), | ||
peg$c30 = peg$otherExpectation("global"), | ||
peg$c31 = "global", | ||
peg$c32 = peg$literalExpectation("global", false), | ||
peg$c33 = peg$otherExpectation("reference"), | ||
peg$c34 = "(", | ||
peg$c35 = peg$literalExpectation("(", false), | ||
peg$c36 = ")", | ||
peg$c37 = peg$literalExpectation(")", false), | ||
peg$c38 = function(ref) { return { name : ref, global : true }; }, | ||
peg$c39 = function(ref) { return { name : ref }; }, | ||
peg$c40 = peg$otherExpectation("references"), | ||
peg$c41 = ",", | ||
peg$c42 = peg$literalExpectation(",", false), | ||
peg$c43 = function(head, ref) { return ref; }, | ||
peg$c44 = function(head, tail) { return [ head ].concat(tail); }, | ||
peg$c45 = peg$otherExpectation("source"), | ||
peg$c46 = "from", | ||
peg$c47 = peg$literalExpectation("from", false), | ||
peg$c48 = function(source) { | ||
return source; | ||
}, | ||
peg$c35 = function(source) { | ||
peg$c49 = function(source) { | ||
return { | ||
@@ -472,19 +488,157 @@ source, | ||
function peg$parseident() { | ||
var s0, s1, s2; | ||
function peg$parsehex_digit() { | ||
var s0; | ||
peg$silentFails++; | ||
if (peg$c13.test(input.charAt(peg$currPos))) { | ||
s0 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s0 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c14); } | ||
} | ||
return s0; | ||
} | ||
function peg$parsenonascii() { | ||
var s0; | ||
if (peg$c15.test(input.charAt(peg$currPos))) { | ||
s0 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s0 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c16); } | ||
} | ||
return s0; | ||
} | ||
function peg$parseunicode() { | ||
var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; | ||
s0 = peg$currPos; | ||
s1 = []; | ||
if (peg$c14.test(input.charAt(peg$currPos))) { | ||
s2 = input.charAt(peg$currPos); | ||
if (input.charCodeAt(peg$currPos) === 92) { | ||
s1 = peg$c17; | ||
peg$currPos++; | ||
} else { | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c15); } | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c18); } | ||
} | ||
if (s2 !== peg$FAILED) { | ||
while (s2 !== peg$FAILED) { | ||
s1.push(s2); | ||
if (peg$c14.test(input.charAt(peg$currPos))) { | ||
if (s1 !== peg$FAILED) { | ||
s2 = peg$currPos; | ||
s3 = peg$currPos; | ||
s4 = peg$parsehex_digit(); | ||
if (s4 !== peg$FAILED) { | ||
s5 = peg$parsehex_digit(); | ||
if (s5 === peg$FAILED) { | ||
s5 = null; | ||
} | ||
if (s5 !== peg$FAILED) { | ||
s6 = peg$parsehex_digit(); | ||
if (s6 === peg$FAILED) { | ||
s6 = null; | ||
} | ||
if (s6 !== peg$FAILED) { | ||
s7 = peg$parsehex_digit(); | ||
if (s7 === peg$FAILED) { | ||
s7 = null; | ||
} | ||
if (s7 !== peg$FAILED) { | ||
s8 = peg$parsehex_digit(); | ||
if (s8 === peg$FAILED) { | ||
s8 = null; | ||
} | ||
if (s8 !== peg$FAILED) { | ||
s9 = peg$parsehex_digit(); | ||
if (s9 === peg$FAILED) { | ||
s9 = null; | ||
} | ||
if (s9 !== peg$FAILED) { | ||
s4 = [s4, s5, s6, s7, s8, s9]; | ||
s3 = s4; | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
if (s3 !== peg$FAILED) { | ||
s2 = input.substring(s2, peg$currPos); | ||
} else { | ||
s2 = s3; | ||
} | ||
if (s2 !== peg$FAILED) { | ||
if (input.substr(peg$currPos, 2) === peg$c19) { | ||
s3 = peg$c19; | ||
peg$currPos += 2; | ||
} else { | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c20); } | ||
} | ||
if (s3 === peg$FAILED) { | ||
if (peg$c21.test(input.charAt(peg$currPos))) { | ||
s3 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c22); } | ||
} | ||
} | ||
if (s3 === peg$FAILED) { | ||
s3 = null; | ||
} | ||
if (s3 !== peg$FAILED) { | ||
peg$savedPos = s0; | ||
s1 = peg$c23(s2); | ||
s0 = s1; | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
return s0; | ||
} | ||
function peg$parseescape() { | ||
var s0, s1, s2; | ||
s0 = peg$parseunicode(); | ||
if (s0 === peg$FAILED) { | ||
s0 = peg$currPos; | ||
if (input.charCodeAt(peg$currPos) === 92) { | ||
s1 = peg$c17; | ||
peg$currPos++; | ||
} else { | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c18); } | ||
} | ||
if (s1 !== peg$FAILED) { | ||
if (peg$c24.test(input.charAt(peg$currPos))) { | ||
s2 = input.charAt(peg$currPos); | ||
@@ -494,6 +648,54 @@ peg$currPos++; | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c15); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c25); } | ||
} | ||
if (s2 !== peg$FAILED) { | ||
peg$savedPos = s0; | ||
s1 = peg$c26(s2); | ||
s0 = s1; | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
} | ||
return s0; | ||
} | ||
function peg$parsenmchar() { | ||
var s0; | ||
if (peg$c27.test(input.charAt(peg$currPos))) { | ||
s0 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s0 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c28); } | ||
} | ||
if (s0 === peg$FAILED) { | ||
s0 = peg$parsenonascii(); | ||
if (s0 === peg$FAILED) { | ||
s0 = peg$parseescape(); | ||
} | ||
} | ||
return s0; | ||
} | ||
function peg$parseident() { | ||
var s0, s1, s2; | ||
peg$silentFails++; | ||
s0 = peg$currPos; | ||
s1 = []; | ||
s2 = peg$parsenmchar(); | ||
if (s2 !== peg$FAILED) { | ||
while (s2 !== peg$FAILED) { | ||
s1.push(s2); | ||
s2 = peg$parsenmchar(); | ||
} | ||
} else { | ||
s1 = peg$FAILED; | ||
@@ -509,3 +711,3 @@ } | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c13); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c29); } | ||
} | ||
@@ -520,8 +722,8 @@ | ||
peg$silentFails++; | ||
if (input.substr(peg$currPos, 6) === peg$c17) { | ||
s0 = peg$c17; | ||
if (input.substr(peg$currPos, 6) === peg$c31) { | ||
s0 = peg$c31; | ||
peg$currPos += 6; | ||
} else { | ||
s0 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c18); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c32); } | ||
} | ||
@@ -531,3 +733,3 @@ peg$silentFails--; | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c16); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c30); } | ||
} | ||
@@ -546,7 +748,7 @@ | ||
if (input.charCodeAt(peg$currPos) === 40) { | ||
s2 = peg$c20; | ||
s2 = peg$c34; | ||
peg$currPos++; | ||
} else { | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c21); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c35); } | ||
} | ||
@@ -561,11 +763,11 @@ if (s2 !== peg$FAILED) { | ||
if (input.charCodeAt(peg$currPos) === 41) { | ||
s6 = peg$c22; | ||
s6 = peg$c36; | ||
peg$currPos++; | ||
} else { | ||
s6 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c23); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c37); } | ||
} | ||
if (s6 !== peg$FAILED) { | ||
peg$savedPos = s0; | ||
s1 = peg$c24(s4); | ||
s1 = peg$c38(s4); | ||
s0 = s1; | ||
@@ -601,3 +803,3 @@ } else { | ||
peg$savedPos = s0; | ||
s1 = peg$c25(s1); | ||
s1 = peg$c39(s1); | ||
} | ||
@@ -609,3 +811,3 @@ s0 = s1; | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c19); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c33); } | ||
} | ||
@@ -630,7 +832,7 @@ | ||
if (input.charCodeAt(peg$currPos) === 44) { | ||
s6 = peg$c27; | ||
s6 = peg$c41; | ||
peg$currPos++; | ||
} else { | ||
s6 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c28); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c42); } | ||
} | ||
@@ -643,3 +845,3 @@ if (s6 !== peg$FAILED) { | ||
peg$savedPos = s4; | ||
s5 = peg$c29(s2, s8); | ||
s5 = peg$c43(s2, s8); | ||
s4 = s5; | ||
@@ -668,7 +870,7 @@ } else { | ||
if (input.charCodeAt(peg$currPos) === 44) { | ||
s6 = peg$c27; | ||
s6 = peg$c41; | ||
peg$currPos++; | ||
} else { | ||
s6 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c28); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c42); } | ||
} | ||
@@ -681,3 +883,3 @@ if (s6 !== peg$FAILED) { | ||
peg$savedPos = s4; | ||
s5 = peg$c29(s2, s8); | ||
s5 = peg$c43(s2, s8); | ||
s4 = s5; | ||
@@ -705,3 +907,3 @@ } else { | ||
peg$savedPos = s0; | ||
s1 = peg$c30(s2, s3); | ||
s1 = peg$c44(s2, s3); | ||
s0 = s1; | ||
@@ -727,3 +929,3 @@ } else { | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c26); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c40); } | ||
} | ||
@@ -742,3 +944,3 @@ | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c31); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c45); } | ||
} | ||
@@ -755,8 +957,8 @@ | ||
if (s1 !== peg$FAILED) { | ||
if (input.substr(peg$currPos, 4) === peg$c32) { | ||
s2 = peg$c32; | ||
if (input.substr(peg$currPos, 4) === peg$c46) { | ||
s2 = peg$c46; | ||
peg$currPos += 4; | ||
} else { | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c33); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c47); } | ||
} | ||
@@ -769,3 +971,3 @@ if (s2 !== peg$FAILED) { | ||
peg$savedPos = s0; | ||
s1 = peg$c34(s4); | ||
s1 = peg$c48(s4); | ||
s0 = s1; | ||
@@ -807,3 +1009,3 @@ } else { | ||
peg$savedPos = s0; | ||
s1 = peg$c35(s1); | ||
s1 = peg$c49(s1); | ||
} | ||
@@ -810,0 +1012,0 @@ s0 = s1; |
@@ -157,27 +157,43 @@ /* | ||
peg$c12 = peg$classExpectation(["'", "\r", "\n"], true, false), | ||
peg$c13 = peg$otherExpectation("identifier"), | ||
peg$c14 = /^[a-z0-9\-_]/i, | ||
peg$c15 = peg$classExpectation([["a", "z"], ["0", "9"], "-", "_"], false, true), | ||
peg$c16 = peg$otherExpectation("global"), | ||
peg$c17 = "global", | ||
peg$c18 = peg$literalExpectation("global", false), | ||
peg$c19 = peg$otherExpectation("reference"), | ||
peg$c20 = "(", | ||
peg$c21 = peg$literalExpectation("(", false), | ||
peg$c22 = ")", | ||
peg$c23 = peg$literalExpectation(")", false), | ||
peg$c24 = function(ref) { return { name : ref, global : true }; }, | ||
peg$c25 = function(ref) { return { name : ref }; }, | ||
peg$c26 = peg$otherExpectation("references"), | ||
peg$c27 = ",", | ||
peg$c28 = peg$literalExpectation(",", false), | ||
peg$c29 = function(head, ref) { return ref; }, | ||
peg$c30 = function(head, tail) { return [ head ].concat(tail); }, | ||
peg$c31 = peg$otherExpectation("source"), | ||
peg$c32 = "from", | ||
peg$c33 = peg$literalExpectation("from", false), | ||
peg$c34 = function(source) { | ||
peg$c13 = /^[0-9a-f]/i, | ||
peg$c14 = peg$classExpectation([["0", "9"], ["a", "f"]], false, true), | ||
peg$c15 = /^[\x80-\uFFFF]/, | ||
peg$c16 = peg$classExpectation([["\x80", "\uFFFF"]], false, false), | ||
peg$c17 = "\\", | ||
peg$c18 = peg$literalExpectation("\\", false), | ||
peg$c19 = "\r\n", | ||
peg$c20 = peg$literalExpectation("\r\n", false), | ||
peg$c21 = /^[ \t\r\n\f]/, | ||
peg$c22 = peg$classExpectation([" ", "\t", "\r", "\n", "\f"], false, false), | ||
peg$c23 = function(digits) { | ||
return String.fromCharCode(parseInt(digits, 16)); | ||
}, | ||
peg$c24 = /^[^\r\n\f0-9a-f]/i, | ||
peg$c25 = peg$classExpectation(["\r", "\n", "\f", ["0", "9"], ["a", "f"]], true, true), | ||
peg$c26 = function(char) { return char; }, | ||
peg$c27 = /^[_a-z0-9\-]/i, | ||
peg$c28 = peg$classExpectation(["_", ["a", "z"], ["0", "9"], "-"], false, true), | ||
peg$c29 = peg$otherExpectation("identifier"), | ||
peg$c30 = peg$otherExpectation("global"), | ||
peg$c31 = "global", | ||
peg$c32 = peg$literalExpectation("global", false), | ||
peg$c33 = peg$otherExpectation("reference"), | ||
peg$c34 = "(", | ||
peg$c35 = peg$literalExpectation("(", false), | ||
peg$c36 = ")", | ||
peg$c37 = peg$literalExpectation(")", false), | ||
peg$c38 = function(ref) { return { name : ref, global : true }; }, | ||
peg$c39 = function(ref) { return { name : ref }; }, | ||
peg$c40 = peg$otherExpectation("references"), | ||
peg$c41 = ",", | ||
peg$c42 = peg$literalExpectation(",", false), | ||
peg$c43 = function(head, ref) { return ref; }, | ||
peg$c44 = function(head, tail) { return [ head ].concat(tail); }, | ||
peg$c45 = peg$otherExpectation("source"), | ||
peg$c46 = "from", | ||
peg$c47 = peg$literalExpectation("from", false), | ||
peg$c48 = function(source) { | ||
return source; | ||
}, | ||
peg$c35 = function(refs, source) { | ||
peg$c49 = function(refs, source) { | ||
return { | ||
@@ -189,3 +205,3 @@ type : "composition", | ||
}, | ||
peg$c36 = function(refs) { | ||
peg$c50 = function(refs) { | ||
return { | ||
@@ -196,5 +212,5 @@ type : "simple", | ||
}, | ||
peg$c37 = ".", | ||
peg$c38 = peg$literalExpectation(".", false), | ||
peg$c39 = function(ns, ref) { | ||
peg$c51 = ".", | ||
peg$c52 = peg$literalExpectation(".", false), | ||
peg$c53 = function(ns, ref) { | ||
return { | ||
@@ -206,3 +222,3 @@ type : "namespaced", | ||
}, | ||
peg$c40 = function(refs) { | ||
peg$c54 = function(refs) { | ||
return { | ||
@@ -498,19 +514,157 @@ type : "simple", | ||
function peg$parseident() { | ||
var s0, s1, s2; | ||
function peg$parsehex_digit() { | ||
var s0; | ||
peg$silentFails++; | ||
if (peg$c13.test(input.charAt(peg$currPos))) { | ||
s0 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s0 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c14); } | ||
} | ||
return s0; | ||
} | ||
function peg$parsenonascii() { | ||
var s0; | ||
if (peg$c15.test(input.charAt(peg$currPos))) { | ||
s0 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s0 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c16); } | ||
} | ||
return s0; | ||
} | ||
function peg$parseunicode() { | ||
var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; | ||
s0 = peg$currPos; | ||
s1 = []; | ||
if (peg$c14.test(input.charAt(peg$currPos))) { | ||
s2 = input.charAt(peg$currPos); | ||
if (input.charCodeAt(peg$currPos) === 92) { | ||
s1 = peg$c17; | ||
peg$currPos++; | ||
} else { | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c15); } | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c18); } | ||
} | ||
if (s2 !== peg$FAILED) { | ||
while (s2 !== peg$FAILED) { | ||
s1.push(s2); | ||
if (peg$c14.test(input.charAt(peg$currPos))) { | ||
if (s1 !== peg$FAILED) { | ||
s2 = peg$currPos; | ||
s3 = peg$currPos; | ||
s4 = peg$parsehex_digit(); | ||
if (s4 !== peg$FAILED) { | ||
s5 = peg$parsehex_digit(); | ||
if (s5 === peg$FAILED) { | ||
s5 = null; | ||
} | ||
if (s5 !== peg$FAILED) { | ||
s6 = peg$parsehex_digit(); | ||
if (s6 === peg$FAILED) { | ||
s6 = null; | ||
} | ||
if (s6 !== peg$FAILED) { | ||
s7 = peg$parsehex_digit(); | ||
if (s7 === peg$FAILED) { | ||
s7 = null; | ||
} | ||
if (s7 !== peg$FAILED) { | ||
s8 = peg$parsehex_digit(); | ||
if (s8 === peg$FAILED) { | ||
s8 = null; | ||
} | ||
if (s8 !== peg$FAILED) { | ||
s9 = peg$parsehex_digit(); | ||
if (s9 === peg$FAILED) { | ||
s9 = null; | ||
} | ||
if (s9 !== peg$FAILED) { | ||
s4 = [s4, s5, s6, s7, s8, s9]; | ||
s3 = s4; | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
if (s3 !== peg$FAILED) { | ||
s2 = input.substring(s2, peg$currPos); | ||
} else { | ||
s2 = s3; | ||
} | ||
if (s2 !== peg$FAILED) { | ||
if (input.substr(peg$currPos, 2) === peg$c19) { | ||
s3 = peg$c19; | ||
peg$currPos += 2; | ||
} else { | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c20); } | ||
} | ||
if (s3 === peg$FAILED) { | ||
if (peg$c21.test(input.charAt(peg$currPos))) { | ||
s3 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c22); } | ||
} | ||
} | ||
if (s3 === peg$FAILED) { | ||
s3 = null; | ||
} | ||
if (s3 !== peg$FAILED) { | ||
peg$savedPos = s0; | ||
s1 = peg$c23(s2); | ||
s0 = s1; | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
return s0; | ||
} | ||
function peg$parseescape() { | ||
var s0, s1, s2; | ||
s0 = peg$parseunicode(); | ||
if (s0 === peg$FAILED) { | ||
s0 = peg$currPos; | ||
if (input.charCodeAt(peg$currPos) === 92) { | ||
s1 = peg$c17; | ||
peg$currPos++; | ||
} else { | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c18); } | ||
} | ||
if (s1 !== peg$FAILED) { | ||
if (peg$c24.test(input.charAt(peg$currPos))) { | ||
s2 = input.charAt(peg$currPos); | ||
@@ -520,6 +674,54 @@ peg$currPos++; | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c15); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c25); } | ||
} | ||
if (s2 !== peg$FAILED) { | ||
peg$savedPos = s0; | ||
s1 = peg$c26(s2); | ||
s0 = s1; | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
} | ||
return s0; | ||
} | ||
function peg$parsenmchar() { | ||
var s0; | ||
if (peg$c27.test(input.charAt(peg$currPos))) { | ||
s0 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s0 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c28); } | ||
} | ||
if (s0 === peg$FAILED) { | ||
s0 = peg$parsenonascii(); | ||
if (s0 === peg$FAILED) { | ||
s0 = peg$parseescape(); | ||
} | ||
} | ||
return s0; | ||
} | ||
function peg$parseident() { | ||
var s0, s1, s2; | ||
peg$silentFails++; | ||
s0 = peg$currPos; | ||
s1 = []; | ||
s2 = peg$parsenmchar(); | ||
if (s2 !== peg$FAILED) { | ||
while (s2 !== peg$FAILED) { | ||
s1.push(s2); | ||
s2 = peg$parsenmchar(); | ||
} | ||
} else { | ||
s1 = peg$FAILED; | ||
@@ -535,3 +737,3 @@ } | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c13); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c29); } | ||
} | ||
@@ -546,8 +748,8 @@ | ||
peg$silentFails++; | ||
if (input.substr(peg$currPos, 6) === peg$c17) { | ||
s0 = peg$c17; | ||
if (input.substr(peg$currPos, 6) === peg$c31) { | ||
s0 = peg$c31; | ||
peg$currPos += 6; | ||
} else { | ||
s0 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c18); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c32); } | ||
} | ||
@@ -557,3 +759,3 @@ peg$silentFails--; | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c16); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c30); } | ||
} | ||
@@ -572,7 +774,7 @@ | ||
if (input.charCodeAt(peg$currPos) === 40) { | ||
s2 = peg$c20; | ||
s2 = peg$c34; | ||
peg$currPos++; | ||
} else { | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c21); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c35); } | ||
} | ||
@@ -587,11 +789,11 @@ if (s2 !== peg$FAILED) { | ||
if (input.charCodeAt(peg$currPos) === 41) { | ||
s6 = peg$c22; | ||
s6 = peg$c36; | ||
peg$currPos++; | ||
} else { | ||
s6 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c23); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c37); } | ||
} | ||
if (s6 !== peg$FAILED) { | ||
peg$savedPos = s0; | ||
s1 = peg$c24(s4); | ||
s1 = peg$c38(s4); | ||
s0 = s1; | ||
@@ -627,3 +829,3 @@ } else { | ||
peg$savedPos = s0; | ||
s1 = peg$c25(s1); | ||
s1 = peg$c39(s1); | ||
} | ||
@@ -635,3 +837,3 @@ s0 = s1; | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c19); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c33); } | ||
} | ||
@@ -656,7 +858,7 @@ | ||
if (input.charCodeAt(peg$currPos) === 44) { | ||
s6 = peg$c27; | ||
s6 = peg$c41; | ||
peg$currPos++; | ||
} else { | ||
s6 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c28); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c42); } | ||
} | ||
@@ -669,3 +871,3 @@ if (s6 !== peg$FAILED) { | ||
peg$savedPos = s4; | ||
s5 = peg$c29(s2, s8); | ||
s5 = peg$c43(s2, s8); | ||
s4 = s5; | ||
@@ -694,7 +896,7 @@ } else { | ||
if (input.charCodeAt(peg$currPos) === 44) { | ||
s6 = peg$c27; | ||
s6 = peg$c41; | ||
peg$currPos++; | ||
} else { | ||
s6 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c28); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c42); } | ||
} | ||
@@ -707,3 +909,3 @@ if (s6 !== peg$FAILED) { | ||
peg$savedPos = s4; | ||
s5 = peg$c29(s2, s8); | ||
s5 = peg$c43(s2, s8); | ||
s4 = s5; | ||
@@ -731,3 +933,3 @@ } else { | ||
peg$savedPos = s0; | ||
s1 = peg$c30(s2, s3); | ||
s1 = peg$c44(s2, s3); | ||
s0 = s1; | ||
@@ -753,3 +955,3 @@ } else { | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c26); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c40); } | ||
} | ||
@@ -768,3 +970,3 @@ | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c31); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c45); } | ||
} | ||
@@ -781,8 +983,8 @@ | ||
if (s1 !== peg$FAILED) { | ||
if (input.substr(peg$currPos, 4) === peg$c32) { | ||
s2 = peg$c32; | ||
if (input.substr(peg$currPos, 4) === peg$c46) { | ||
s2 = peg$c46; | ||
peg$currPos += 4; | ||
} else { | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c33); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c47); } | ||
} | ||
@@ -795,3 +997,3 @@ if (s2 !== peg$FAILED) { | ||
peg$savedPos = s0; | ||
s1 = peg$c34(s4); | ||
s1 = peg$c48(s4); | ||
s0 = s1; | ||
@@ -844,3 +1046,3 @@ } else { | ||
peg$savedPos = s0; | ||
s1 = peg$c35(s1, s2); | ||
s1 = peg$c49(s1, s2); | ||
s0 = s1; | ||
@@ -867,8 +1069,8 @@ } else { | ||
if (s2 !== peg$FAILED) { | ||
if (input.substr(peg$currPos, 4) === peg$c32) { | ||
s3 = peg$c32; | ||
if (input.substr(peg$currPos, 4) === peg$c46) { | ||
s3 = peg$c46; | ||
peg$currPos += 4; | ||
} else { | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c33); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c47); } | ||
} | ||
@@ -881,3 +1083,3 @@ if (s3 !== peg$FAILED) { | ||
peg$savedPos = s0; | ||
s1 = peg$c36(s1); | ||
s1 = peg$c50(s1); | ||
s0 = s1; | ||
@@ -915,7 +1117,7 @@ } else { | ||
if (input.charCodeAt(peg$currPos) === 46) { | ||
s2 = peg$c37; | ||
s2 = peg$c51; | ||
peg$currPos++; | ||
} else { | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c38); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c52); } | ||
} | ||
@@ -926,3 +1128,3 @@ if (s2 !== peg$FAILED) { | ||
peg$savedPos = s0; | ||
s1 = peg$c39(s1, s3); | ||
s1 = peg$c53(s1, s3); | ||
s0 = s1; | ||
@@ -952,3 +1154,3 @@ } else { | ||
peg$savedPos = s0; | ||
s1 = peg$c40(s1); | ||
s1 = peg$c54(s1); | ||
} | ||
@@ -955,0 +1157,0 @@ s0 = s1; |
@@ -157,27 +157,43 @@ /* | ||
peg$c12 = peg$classExpectation(["'", "\r", "\n"], true, false), | ||
peg$c13 = peg$otherExpectation("identifier"), | ||
peg$c14 = /^[a-z0-9\-_]/i, | ||
peg$c15 = peg$classExpectation([["a", "z"], ["0", "9"], "-", "_"], false, true), | ||
peg$c16 = peg$otherExpectation("global"), | ||
peg$c17 = "global", | ||
peg$c18 = peg$literalExpectation("global", false), | ||
peg$c19 = peg$otherExpectation("reference"), | ||
peg$c20 = "(", | ||
peg$c21 = peg$literalExpectation("(", false), | ||
peg$c22 = ")", | ||
peg$c23 = peg$literalExpectation(")", false), | ||
peg$c24 = function(ref) { return { name : ref, global : true }; }, | ||
peg$c25 = function(ref) { return { name : ref }; }, | ||
peg$c26 = peg$otherExpectation("references"), | ||
peg$c27 = ",", | ||
peg$c28 = peg$literalExpectation(",", false), | ||
peg$c29 = function(head, ref) { return ref; }, | ||
peg$c30 = function(head, tail) { return [ head ].concat(tail); }, | ||
peg$c31 = peg$otherExpectation("source"), | ||
peg$c32 = "from", | ||
peg$c33 = peg$literalExpectation("from", false), | ||
peg$c34 = function(source) { | ||
peg$c13 = /^[0-9a-f]/i, | ||
peg$c14 = peg$classExpectation([["0", "9"], ["a", "f"]], false, true), | ||
peg$c15 = /^[\x80-\uFFFF]/, | ||
peg$c16 = peg$classExpectation([["\x80", "\uFFFF"]], false, false), | ||
peg$c17 = "\\", | ||
peg$c18 = peg$literalExpectation("\\", false), | ||
peg$c19 = "\r\n", | ||
peg$c20 = peg$literalExpectation("\r\n", false), | ||
peg$c21 = /^[ \t\r\n\f]/, | ||
peg$c22 = peg$classExpectation([" ", "\t", "\r", "\n", "\f"], false, false), | ||
peg$c23 = function(digits) { | ||
return String.fromCharCode(parseInt(digits, 16)); | ||
}, | ||
peg$c24 = /^[^\r\n\f0-9a-f]/i, | ||
peg$c25 = peg$classExpectation(["\r", "\n", "\f", ["0", "9"], ["a", "f"]], true, true), | ||
peg$c26 = function(char) { return char; }, | ||
peg$c27 = /^[_a-z0-9\-]/i, | ||
peg$c28 = peg$classExpectation(["_", ["a", "z"], ["0", "9"], "-"], false, true), | ||
peg$c29 = peg$otherExpectation("identifier"), | ||
peg$c30 = peg$otherExpectation("global"), | ||
peg$c31 = "global", | ||
peg$c32 = peg$literalExpectation("global", false), | ||
peg$c33 = peg$otherExpectation("reference"), | ||
peg$c34 = "(", | ||
peg$c35 = peg$literalExpectation("(", false), | ||
peg$c36 = ")", | ||
peg$c37 = peg$literalExpectation(")", false), | ||
peg$c38 = function(ref) { return { name : ref, global : true }; }, | ||
peg$c39 = function(ref) { return { name : ref }; }, | ||
peg$c40 = peg$otherExpectation("references"), | ||
peg$c41 = ",", | ||
peg$c42 = peg$literalExpectation(",", false), | ||
peg$c43 = function(head, ref) { return ref; }, | ||
peg$c44 = function(head, tail) { return [ head ].concat(tail); }, | ||
peg$c45 = peg$otherExpectation("source"), | ||
peg$c46 = "from", | ||
peg$c47 = peg$literalExpectation("from", false), | ||
peg$c48 = function(source) { | ||
return source; | ||
}, | ||
peg$c35 = function(ref, source) { | ||
peg$c49 = function(ref, source) { | ||
return { | ||
@@ -474,19 +490,157 @@ type : "composition", | ||
function peg$parseident() { | ||
var s0, s1, s2; | ||
function peg$parsehex_digit() { | ||
var s0; | ||
peg$silentFails++; | ||
if (peg$c13.test(input.charAt(peg$currPos))) { | ||
s0 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s0 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c14); } | ||
} | ||
return s0; | ||
} | ||
function peg$parsenonascii() { | ||
var s0; | ||
if (peg$c15.test(input.charAt(peg$currPos))) { | ||
s0 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s0 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c16); } | ||
} | ||
return s0; | ||
} | ||
function peg$parseunicode() { | ||
var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; | ||
s0 = peg$currPos; | ||
s1 = []; | ||
if (peg$c14.test(input.charAt(peg$currPos))) { | ||
s2 = input.charAt(peg$currPos); | ||
if (input.charCodeAt(peg$currPos) === 92) { | ||
s1 = peg$c17; | ||
peg$currPos++; | ||
} else { | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c15); } | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c18); } | ||
} | ||
if (s2 !== peg$FAILED) { | ||
while (s2 !== peg$FAILED) { | ||
s1.push(s2); | ||
if (peg$c14.test(input.charAt(peg$currPos))) { | ||
if (s1 !== peg$FAILED) { | ||
s2 = peg$currPos; | ||
s3 = peg$currPos; | ||
s4 = peg$parsehex_digit(); | ||
if (s4 !== peg$FAILED) { | ||
s5 = peg$parsehex_digit(); | ||
if (s5 === peg$FAILED) { | ||
s5 = null; | ||
} | ||
if (s5 !== peg$FAILED) { | ||
s6 = peg$parsehex_digit(); | ||
if (s6 === peg$FAILED) { | ||
s6 = null; | ||
} | ||
if (s6 !== peg$FAILED) { | ||
s7 = peg$parsehex_digit(); | ||
if (s7 === peg$FAILED) { | ||
s7 = null; | ||
} | ||
if (s7 !== peg$FAILED) { | ||
s8 = peg$parsehex_digit(); | ||
if (s8 === peg$FAILED) { | ||
s8 = null; | ||
} | ||
if (s8 !== peg$FAILED) { | ||
s9 = peg$parsehex_digit(); | ||
if (s9 === peg$FAILED) { | ||
s9 = null; | ||
} | ||
if (s9 !== peg$FAILED) { | ||
s4 = [s4, s5, s6, s7, s8, s9]; | ||
s3 = s4; | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
if (s3 !== peg$FAILED) { | ||
s2 = input.substring(s2, peg$currPos); | ||
} else { | ||
s2 = s3; | ||
} | ||
if (s2 !== peg$FAILED) { | ||
if (input.substr(peg$currPos, 2) === peg$c19) { | ||
s3 = peg$c19; | ||
peg$currPos += 2; | ||
} else { | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c20); } | ||
} | ||
if (s3 === peg$FAILED) { | ||
if (peg$c21.test(input.charAt(peg$currPos))) { | ||
s3 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c22); } | ||
} | ||
} | ||
if (s3 === peg$FAILED) { | ||
s3 = null; | ||
} | ||
if (s3 !== peg$FAILED) { | ||
peg$savedPos = s0; | ||
s1 = peg$c23(s2); | ||
s0 = s1; | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
return s0; | ||
} | ||
function peg$parseescape() { | ||
var s0, s1, s2; | ||
s0 = peg$parseunicode(); | ||
if (s0 === peg$FAILED) { | ||
s0 = peg$currPos; | ||
if (input.charCodeAt(peg$currPos) === 92) { | ||
s1 = peg$c17; | ||
peg$currPos++; | ||
} else { | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c18); } | ||
} | ||
if (s1 !== peg$FAILED) { | ||
if (peg$c24.test(input.charAt(peg$currPos))) { | ||
s2 = input.charAt(peg$currPos); | ||
@@ -496,6 +650,54 @@ peg$currPos++; | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c15); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c25); } | ||
} | ||
if (s2 !== peg$FAILED) { | ||
peg$savedPos = s0; | ||
s1 = peg$c26(s2); | ||
s0 = s1; | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
} | ||
return s0; | ||
} | ||
function peg$parsenmchar() { | ||
var s0; | ||
if (peg$c27.test(input.charAt(peg$currPos))) { | ||
s0 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s0 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c28); } | ||
} | ||
if (s0 === peg$FAILED) { | ||
s0 = peg$parsenonascii(); | ||
if (s0 === peg$FAILED) { | ||
s0 = peg$parseescape(); | ||
} | ||
} | ||
return s0; | ||
} | ||
function peg$parseident() { | ||
var s0, s1, s2; | ||
peg$silentFails++; | ||
s0 = peg$currPos; | ||
s1 = []; | ||
s2 = peg$parsenmchar(); | ||
if (s2 !== peg$FAILED) { | ||
while (s2 !== peg$FAILED) { | ||
s1.push(s2); | ||
s2 = peg$parsenmchar(); | ||
} | ||
} else { | ||
s1 = peg$FAILED; | ||
@@ -511,3 +713,3 @@ } | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c13); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c29); } | ||
} | ||
@@ -522,8 +724,8 @@ | ||
peg$silentFails++; | ||
if (input.substr(peg$currPos, 6) === peg$c17) { | ||
s0 = peg$c17; | ||
if (input.substr(peg$currPos, 6) === peg$c31) { | ||
s0 = peg$c31; | ||
peg$currPos += 6; | ||
} else { | ||
s0 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c18); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c32); } | ||
} | ||
@@ -533,3 +735,3 @@ peg$silentFails--; | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c16); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c30); } | ||
} | ||
@@ -548,7 +750,7 @@ | ||
if (input.charCodeAt(peg$currPos) === 40) { | ||
s2 = peg$c20; | ||
s2 = peg$c34; | ||
peg$currPos++; | ||
} else { | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c21); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c35); } | ||
} | ||
@@ -563,11 +765,11 @@ if (s2 !== peg$FAILED) { | ||
if (input.charCodeAt(peg$currPos) === 41) { | ||
s6 = peg$c22; | ||
s6 = peg$c36; | ||
peg$currPos++; | ||
} else { | ||
s6 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c23); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c37); } | ||
} | ||
if (s6 !== peg$FAILED) { | ||
peg$savedPos = s0; | ||
s1 = peg$c24(s4); | ||
s1 = peg$c38(s4); | ||
s0 = s1; | ||
@@ -603,3 +805,3 @@ } else { | ||
peg$savedPos = s0; | ||
s1 = peg$c25(s1); | ||
s1 = peg$c39(s1); | ||
} | ||
@@ -611,3 +813,3 @@ s0 = s1; | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c19); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c33); } | ||
} | ||
@@ -632,7 +834,7 @@ | ||
if (input.charCodeAt(peg$currPos) === 44) { | ||
s6 = peg$c27; | ||
s6 = peg$c41; | ||
peg$currPos++; | ||
} else { | ||
s6 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c28); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c42); } | ||
} | ||
@@ -645,3 +847,3 @@ if (s6 !== peg$FAILED) { | ||
peg$savedPos = s4; | ||
s5 = peg$c29(s2, s8); | ||
s5 = peg$c43(s2, s8); | ||
s4 = s5; | ||
@@ -670,7 +872,7 @@ } else { | ||
if (input.charCodeAt(peg$currPos) === 44) { | ||
s6 = peg$c27; | ||
s6 = peg$c41; | ||
peg$currPos++; | ||
} else { | ||
s6 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c28); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c42); } | ||
} | ||
@@ -683,3 +885,3 @@ if (s6 !== peg$FAILED) { | ||
peg$savedPos = s4; | ||
s5 = peg$c29(s2, s8); | ||
s5 = peg$c43(s2, s8); | ||
s4 = s5; | ||
@@ -707,3 +909,3 @@ } else { | ||
peg$savedPos = s0; | ||
s1 = peg$c30(s2, s3); | ||
s1 = peg$c44(s2, s3); | ||
s0 = s1; | ||
@@ -729,3 +931,3 @@ } else { | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c26); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c40); } | ||
} | ||
@@ -744,3 +946,3 @@ | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c31); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c45); } | ||
} | ||
@@ -757,8 +959,8 @@ | ||
if (s1 !== peg$FAILED) { | ||
if (input.substr(peg$currPos, 4) === peg$c32) { | ||
s2 = peg$c32; | ||
if (input.substr(peg$currPos, 4) === peg$c46) { | ||
s2 = peg$c46; | ||
peg$currPos += 4; | ||
} else { | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c33); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c47); } | ||
} | ||
@@ -771,3 +973,3 @@ if (s2 !== peg$FAILED) { | ||
peg$savedPos = s0; | ||
s1 = peg$c34(s4); | ||
s1 = peg$c48(s4); | ||
s0 = s1; | ||
@@ -811,3 +1013,3 @@ } else { | ||
peg$savedPos = s0; | ||
s1 = peg$c35(s1, s2); | ||
s1 = peg$c49(s1, s2); | ||
s0 = s1; | ||
@@ -814,0 +1016,0 @@ } else { |
@@ -157,29 +157,45 @@ /* | ||
peg$c12 = peg$classExpectation(["'", "\r", "\n"], true, false), | ||
peg$c13 = peg$otherExpectation("identifier"), | ||
peg$c14 = /^[a-z0-9\-_]/i, | ||
peg$c15 = peg$classExpectation([["a", "z"], ["0", "9"], "-", "_"], false, true), | ||
peg$c16 = peg$otherExpectation("global"), | ||
peg$c17 = "global", | ||
peg$c18 = peg$literalExpectation("global", false), | ||
peg$c19 = peg$otherExpectation("reference"), | ||
peg$c20 = "(", | ||
peg$c21 = peg$literalExpectation("(", false), | ||
peg$c22 = ")", | ||
peg$c23 = peg$literalExpectation(")", false), | ||
peg$c24 = function(ref) { return { name : ref, global : true }; }, | ||
peg$c25 = function(ref) { return { name : ref }; }, | ||
peg$c26 = peg$otherExpectation("references"), | ||
peg$c27 = ",", | ||
peg$c28 = peg$literalExpectation(",", false), | ||
peg$c29 = function(head, ref) { return ref; }, | ||
peg$c30 = function(head, tail) { return [ head ].concat(tail); }, | ||
peg$c31 = peg$otherExpectation("source"), | ||
peg$c32 = "from", | ||
peg$c33 = peg$literalExpectation("from", false), | ||
peg$c34 = function(source) { | ||
peg$c13 = /^[0-9a-f]/i, | ||
peg$c14 = peg$classExpectation([["0", "9"], ["a", "f"]], false, true), | ||
peg$c15 = /^[\x80-\uFFFF]/, | ||
peg$c16 = peg$classExpectation([["\x80", "\uFFFF"]], false, false), | ||
peg$c17 = "\\", | ||
peg$c18 = peg$literalExpectation("\\", false), | ||
peg$c19 = "\r\n", | ||
peg$c20 = peg$literalExpectation("\r\n", false), | ||
peg$c21 = /^[ \t\r\n\f]/, | ||
peg$c22 = peg$classExpectation([" ", "\t", "\r", "\n", "\f"], false, false), | ||
peg$c23 = function(digits) { | ||
return String.fromCharCode(parseInt(digits, 16)); | ||
}, | ||
peg$c24 = /^[^\r\n\f0-9a-f]/i, | ||
peg$c25 = peg$classExpectation(["\r", "\n", "\f", ["0", "9"], ["a", "f"]], true, true), | ||
peg$c26 = function(char) { return char; }, | ||
peg$c27 = /^[_a-z0-9\-]/i, | ||
peg$c28 = peg$classExpectation(["_", ["a", "z"], ["0", "9"], "-"], false, true), | ||
peg$c29 = peg$otherExpectation("identifier"), | ||
peg$c30 = peg$otherExpectation("global"), | ||
peg$c31 = "global", | ||
peg$c32 = peg$literalExpectation("global", false), | ||
peg$c33 = peg$otherExpectation("reference"), | ||
peg$c34 = "(", | ||
peg$c35 = peg$literalExpectation("(", false), | ||
peg$c36 = ")", | ||
peg$c37 = peg$literalExpectation(")", false), | ||
peg$c38 = function(ref) { return { name : ref, global : true }; }, | ||
peg$c39 = function(ref) { return { name : ref }; }, | ||
peg$c40 = peg$otherExpectation("references"), | ||
peg$c41 = ",", | ||
peg$c42 = peg$literalExpectation(",", false), | ||
peg$c43 = function(head, ref) { return ref; }, | ||
peg$c44 = function(head, tail) { return [ head ].concat(tail); }, | ||
peg$c45 = peg$otherExpectation("source"), | ||
peg$c46 = "from", | ||
peg$c47 = peg$literalExpectation("from", false), | ||
peg$c48 = function(source) { | ||
return source; | ||
}, | ||
peg$c35 = "*", | ||
peg$c36 = peg$literalExpectation("*", false), | ||
peg$c37 = function(source) { | ||
peg$c49 = "*", | ||
peg$c50 = peg$literalExpectation("*", false), | ||
peg$c51 = function(source) { | ||
return { | ||
@@ -190,5 +206,5 @@ type : "import", | ||
}, | ||
peg$c38 = "as", | ||
peg$c39 = peg$literalExpectation("as", false), | ||
peg$c40 = function(name, source) { | ||
peg$c52 = "as", | ||
peg$c53 = peg$literalExpectation("as", false), | ||
peg$c54 = function(name, source) { | ||
return { | ||
@@ -200,3 +216,3 @@ type : "namespace", | ||
}, | ||
peg$c41 = function(name, alias, source) { | ||
peg$c55 = function(name, alias, source) { | ||
return { | ||
@@ -209,6 +225,6 @@ type : "alias", | ||
}, | ||
peg$c42 = ":", | ||
peg$c43 = peg$literalExpectation(":", false), | ||
peg$c44 = peg$anyExpectation(), | ||
peg$c45 = function(ref, value) { | ||
peg$c56 = ":", | ||
peg$c57 = peg$literalExpectation(":", false), | ||
peg$c58 = peg$anyExpectation(), | ||
peg$c59 = function(ref, value) { | ||
return { | ||
@@ -220,3 +236,3 @@ type : "assignment", | ||
}, | ||
peg$c46 = function(refs, source) { | ||
peg$c60 = function(refs, source) { | ||
return { | ||
@@ -513,19 +529,157 @@ type : "composition", | ||
function peg$parseident() { | ||
var s0, s1, s2; | ||
function peg$parsehex_digit() { | ||
var s0; | ||
peg$silentFails++; | ||
if (peg$c13.test(input.charAt(peg$currPos))) { | ||
s0 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s0 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c14); } | ||
} | ||
return s0; | ||
} | ||
function peg$parsenonascii() { | ||
var s0; | ||
if (peg$c15.test(input.charAt(peg$currPos))) { | ||
s0 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s0 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c16); } | ||
} | ||
return s0; | ||
} | ||
function peg$parseunicode() { | ||
var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; | ||
s0 = peg$currPos; | ||
s1 = []; | ||
if (peg$c14.test(input.charAt(peg$currPos))) { | ||
s2 = input.charAt(peg$currPos); | ||
if (input.charCodeAt(peg$currPos) === 92) { | ||
s1 = peg$c17; | ||
peg$currPos++; | ||
} else { | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c15); } | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c18); } | ||
} | ||
if (s2 !== peg$FAILED) { | ||
while (s2 !== peg$FAILED) { | ||
s1.push(s2); | ||
if (peg$c14.test(input.charAt(peg$currPos))) { | ||
if (s1 !== peg$FAILED) { | ||
s2 = peg$currPos; | ||
s3 = peg$currPos; | ||
s4 = peg$parsehex_digit(); | ||
if (s4 !== peg$FAILED) { | ||
s5 = peg$parsehex_digit(); | ||
if (s5 === peg$FAILED) { | ||
s5 = null; | ||
} | ||
if (s5 !== peg$FAILED) { | ||
s6 = peg$parsehex_digit(); | ||
if (s6 === peg$FAILED) { | ||
s6 = null; | ||
} | ||
if (s6 !== peg$FAILED) { | ||
s7 = peg$parsehex_digit(); | ||
if (s7 === peg$FAILED) { | ||
s7 = null; | ||
} | ||
if (s7 !== peg$FAILED) { | ||
s8 = peg$parsehex_digit(); | ||
if (s8 === peg$FAILED) { | ||
s8 = null; | ||
} | ||
if (s8 !== peg$FAILED) { | ||
s9 = peg$parsehex_digit(); | ||
if (s9 === peg$FAILED) { | ||
s9 = null; | ||
} | ||
if (s9 !== peg$FAILED) { | ||
s4 = [s4, s5, s6, s7, s8, s9]; | ||
s3 = s4; | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
if (s3 !== peg$FAILED) { | ||
s2 = input.substring(s2, peg$currPos); | ||
} else { | ||
s2 = s3; | ||
} | ||
if (s2 !== peg$FAILED) { | ||
if (input.substr(peg$currPos, 2) === peg$c19) { | ||
s3 = peg$c19; | ||
peg$currPos += 2; | ||
} else { | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c20); } | ||
} | ||
if (s3 === peg$FAILED) { | ||
if (peg$c21.test(input.charAt(peg$currPos))) { | ||
s3 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c22); } | ||
} | ||
} | ||
if (s3 === peg$FAILED) { | ||
s3 = null; | ||
} | ||
if (s3 !== peg$FAILED) { | ||
peg$savedPos = s0; | ||
s1 = peg$c23(s2); | ||
s0 = s1; | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
return s0; | ||
} | ||
function peg$parseescape() { | ||
var s0, s1, s2; | ||
s0 = peg$parseunicode(); | ||
if (s0 === peg$FAILED) { | ||
s0 = peg$currPos; | ||
if (input.charCodeAt(peg$currPos) === 92) { | ||
s1 = peg$c17; | ||
peg$currPos++; | ||
} else { | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c18); } | ||
} | ||
if (s1 !== peg$FAILED) { | ||
if (peg$c24.test(input.charAt(peg$currPos))) { | ||
s2 = input.charAt(peg$currPos); | ||
@@ -535,6 +689,54 @@ peg$currPos++; | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c15); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c25); } | ||
} | ||
if (s2 !== peg$FAILED) { | ||
peg$savedPos = s0; | ||
s1 = peg$c26(s2); | ||
s0 = s1; | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
} | ||
return s0; | ||
} | ||
function peg$parsenmchar() { | ||
var s0; | ||
if (peg$c27.test(input.charAt(peg$currPos))) { | ||
s0 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s0 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c28); } | ||
} | ||
if (s0 === peg$FAILED) { | ||
s0 = peg$parsenonascii(); | ||
if (s0 === peg$FAILED) { | ||
s0 = peg$parseescape(); | ||
} | ||
} | ||
return s0; | ||
} | ||
function peg$parseident() { | ||
var s0, s1, s2; | ||
peg$silentFails++; | ||
s0 = peg$currPos; | ||
s1 = []; | ||
s2 = peg$parsenmchar(); | ||
if (s2 !== peg$FAILED) { | ||
while (s2 !== peg$FAILED) { | ||
s1.push(s2); | ||
s2 = peg$parsenmchar(); | ||
} | ||
} else { | ||
s1 = peg$FAILED; | ||
@@ -550,3 +752,3 @@ } | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c13); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c29); } | ||
} | ||
@@ -561,8 +763,8 @@ | ||
peg$silentFails++; | ||
if (input.substr(peg$currPos, 6) === peg$c17) { | ||
s0 = peg$c17; | ||
if (input.substr(peg$currPos, 6) === peg$c31) { | ||
s0 = peg$c31; | ||
peg$currPos += 6; | ||
} else { | ||
s0 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c18); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c32); } | ||
} | ||
@@ -572,3 +774,3 @@ peg$silentFails--; | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c16); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c30); } | ||
} | ||
@@ -587,7 +789,7 @@ | ||
if (input.charCodeAt(peg$currPos) === 40) { | ||
s2 = peg$c20; | ||
s2 = peg$c34; | ||
peg$currPos++; | ||
} else { | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c21); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c35); } | ||
} | ||
@@ -602,11 +804,11 @@ if (s2 !== peg$FAILED) { | ||
if (input.charCodeAt(peg$currPos) === 41) { | ||
s6 = peg$c22; | ||
s6 = peg$c36; | ||
peg$currPos++; | ||
} else { | ||
s6 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c23); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c37); } | ||
} | ||
if (s6 !== peg$FAILED) { | ||
peg$savedPos = s0; | ||
s1 = peg$c24(s4); | ||
s1 = peg$c38(s4); | ||
s0 = s1; | ||
@@ -642,3 +844,3 @@ } else { | ||
peg$savedPos = s0; | ||
s1 = peg$c25(s1); | ||
s1 = peg$c39(s1); | ||
} | ||
@@ -650,3 +852,3 @@ s0 = s1; | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c19); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c33); } | ||
} | ||
@@ -671,7 +873,7 @@ | ||
if (input.charCodeAt(peg$currPos) === 44) { | ||
s6 = peg$c27; | ||
s6 = peg$c41; | ||
peg$currPos++; | ||
} else { | ||
s6 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c28); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c42); } | ||
} | ||
@@ -684,3 +886,3 @@ if (s6 !== peg$FAILED) { | ||
peg$savedPos = s4; | ||
s5 = peg$c29(s2, s8); | ||
s5 = peg$c43(s2, s8); | ||
s4 = s5; | ||
@@ -709,7 +911,7 @@ } else { | ||
if (input.charCodeAt(peg$currPos) === 44) { | ||
s6 = peg$c27; | ||
s6 = peg$c41; | ||
peg$currPos++; | ||
} else { | ||
s6 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c28); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c42); } | ||
} | ||
@@ -722,3 +924,3 @@ if (s6 !== peg$FAILED) { | ||
peg$savedPos = s4; | ||
s5 = peg$c29(s2, s8); | ||
s5 = peg$c43(s2, s8); | ||
s4 = s5; | ||
@@ -746,3 +948,3 @@ } else { | ||
peg$savedPos = s0; | ||
s1 = peg$c30(s2, s3); | ||
s1 = peg$c44(s2, s3); | ||
s0 = s1; | ||
@@ -768,3 +970,3 @@ } else { | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c26); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c40); } | ||
} | ||
@@ -783,3 +985,3 @@ | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c31); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c45); } | ||
} | ||
@@ -796,8 +998,8 @@ | ||
if (s1 !== peg$FAILED) { | ||
if (input.substr(peg$currPos, 4) === peg$c32) { | ||
s2 = peg$c32; | ||
if (input.substr(peg$currPos, 4) === peg$c46) { | ||
s2 = peg$c46; | ||
peg$currPos += 4; | ||
} else { | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c33); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c47); } | ||
} | ||
@@ -810,3 +1012,3 @@ if (s2 !== peg$FAILED) { | ||
peg$savedPos = s0; | ||
s1 = peg$c34(s4); | ||
s1 = peg$c48(s4); | ||
s0 = s1; | ||
@@ -860,7 +1062,7 @@ } else { | ||
if (input.charCodeAt(peg$currPos) === 42) { | ||
s2 = peg$c35; | ||
s2 = peg$c49; | ||
peg$currPos++; | ||
} else { | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c36); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c50); } | ||
} | ||
@@ -873,3 +1075,3 @@ if (s2 !== peg$FAILED) { | ||
peg$savedPos = s0; | ||
s1 = peg$c37(s4); | ||
s1 = peg$c51(s4); | ||
s0 = s1; | ||
@@ -903,7 +1105,7 @@ } else { | ||
if (input.charCodeAt(peg$currPos) === 42) { | ||
s2 = peg$c35; | ||
s2 = peg$c49; | ||
peg$currPos++; | ||
} else { | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c36); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c50); } | ||
} | ||
@@ -913,8 +1115,8 @@ if (s2 !== peg$FAILED) { | ||
if (s3 !== peg$FAILED) { | ||
if (input.substr(peg$currPos, 2) === peg$c38) { | ||
s4 = peg$c38; | ||
if (input.substr(peg$currPos, 2) === peg$c52) { | ||
s4 = peg$c52; | ||
peg$currPos += 2; | ||
} else { | ||
s4 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c39); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c53); } | ||
} | ||
@@ -929,3 +1131,3 @@ if (s4 !== peg$FAILED) { | ||
peg$savedPos = s0; | ||
s1 = peg$c40(s6, s7); | ||
s1 = peg$c54(s6, s7); | ||
s0 = s1; | ||
@@ -972,8 +1174,8 @@ } else { | ||
if (s2 !== peg$FAILED) { | ||
if (input.substr(peg$currPos, 2) === peg$c38) { | ||
s3 = peg$c38; | ||
if (input.substr(peg$currPos, 2) === peg$c52) { | ||
s3 = peg$c52; | ||
peg$currPos += 2; | ||
} else { | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c39); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c53); } | ||
} | ||
@@ -988,3 +1190,3 @@ if (s3 !== peg$FAILED) { | ||
peg$savedPos = s0; | ||
s1 = peg$c41(s1, s5, s6); | ||
s1 = peg$c55(s1, s5, s6); | ||
s0 = s1; | ||
@@ -1028,7 +1230,7 @@ } else { | ||
if (input.charCodeAt(peg$currPos) === 58) { | ||
s3 = peg$c42; | ||
s3 = peg$c56; | ||
peg$currPos++; | ||
} else { | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c43); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c57); } | ||
} | ||
@@ -1044,3 +1246,3 @@ if (s3 !== peg$FAILED) { | ||
s6 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c44); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c58); } | ||
} | ||
@@ -1055,3 +1257,3 @@ if (s6 !== peg$FAILED) { | ||
s6 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c44); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c58); } | ||
} | ||
@@ -1064,3 +1266,3 @@ } | ||
peg$savedPos = s0; | ||
s1 = peg$c45(s1, s5); | ||
s1 = peg$c59(s1, s5); | ||
s0 = s1; | ||
@@ -1100,3 +1302,3 @@ } else { | ||
peg$savedPos = s0; | ||
s1 = peg$c46(s1, s2); | ||
s1 = peg$c60(s1, s2); | ||
s0 = s1; | ||
@@ -1103,0 +1305,0 @@ } else { |
179403
5065
+ Addedescape-string-regexp@4.0.0(transitive)
- Removedescape-string-regexp@3.0.0(transitive)
Updatedescape-string-regexp@^4.0.0