astrocite-ris
Advanced tools
Comparing version 0.8.5 to 0.9.4
@@ -130,3 +130,3 @@ /* | ||
}; | ||
}, peg$c3 = "ER", peg$c4 = peg$literalExpectation("ER", false), peg$c5 = /^[A-Z0-9]/, peg$c6 = peg$classExpectation([["A", "Z"], ["0", "9"]], false, false), peg$c7 = function (k) { return k; }, peg$c8 = /^[^\r\n]/, peg$c9 = peg$classExpectation(["\r", "\n"], true, false), peg$c10 = function (line) { return line; }, peg$c11 = "-", peg$c12 = peg$literalExpectation("-", false), peg$c13 = "TY", peg$c14 = peg$literalExpectation("TY", false), peg$c15 = function (v) { return v; }, peg$c16 = /^[\r\n]/, peg$c17 = peg$classExpectation(["\r", "\n"], false, false), peg$c18 = peg$otherExpectation("Mandatory Horizontal Whitespace"), peg$c19 = /^[ \t]/, peg$c20 = peg$classExpectation([" ", "\t"], false, false), peg$c21 = peg$otherExpectation("Optional Horizontal Whitespace"), peg$c22 = peg$otherExpectation("Mandatory Vertical Whitespace"), peg$c23 = peg$otherExpectation("Optional Vertical Whitespace"), peg$c24 = peg$otherExpectation("Mandatory Whitespace"), peg$c25 = /^[ \t\n\r]/, peg$c26 = peg$classExpectation([" ", "\t", "\n", "\r"], false, false), peg$c27 = peg$otherExpectation("Optional Whitespace"), peg$currPos = 0, peg$savedPos = 0, peg$posDetailsCache = [{ line: 1, column: 1 }], peg$maxFailPos = 0, peg$maxFailExpected = [], peg$silentFails = 0, peg$result; | ||
}, peg$c3 = "ER", peg$c4 = peg$literalExpectation("ER", false), peg$c5 = /^[A-Z0-9]/, peg$c6 = peg$classExpectation([["A", "Z"], ["0", "9"]], false, false), peg$c7 = function (k) { return k; }, peg$c8 = /^[^\r\n]/, peg$c9 = peg$classExpectation(["\r", "\n"], true, false), peg$c10 = function (line) { return line; }, peg$c11 = "-", peg$c12 = peg$literalExpectation("-", false), peg$c13 = "TY", peg$c14 = peg$literalExpectation("TY", false), peg$c15 = function (v) { return v; }, peg$c16 = "\n", peg$c17 = peg$literalExpectation("\n", false), peg$c18 = "\r\n", peg$c19 = peg$literalExpectation("\r\n", false), peg$c20 = peg$otherExpectation("Mandatory Horizontal Whitespace"), peg$c21 = /^[ \t]/, peg$c22 = peg$classExpectation([" ", "\t"], false, false), peg$c23 = peg$otherExpectation("Optional Horizontal Whitespace"), peg$c24 = peg$otherExpectation("Mandatory Vertical Whitespace"), peg$c25 = /^[\r\n]/, peg$c26 = peg$classExpectation(["\r", "\n"], false, false), peg$c27 = peg$otherExpectation("Optional Vertical Whitespace"), peg$c28 = peg$otherExpectation("Mandatory Whitespace"), peg$c29 = /^[ \t\n\r]/, peg$c30 = peg$classExpectation([" ", "\t", "\n", "\r"], false, false), peg$c31 = peg$otherExpectation("Optional Whitespace"), peg$currPos = 0, peg$savedPos = 0, peg$posDetailsCache = [{ line: 1, column: 1 }], peg$maxFailPos = 0, peg$maxFailExpected = [], peg$silentFails = 0, peg$result; | ||
if ("startRule" in options) { | ||
@@ -595,4 +595,4 @@ if (!(options.startRule in peg$startRuleFunctions)) { | ||
var s0; | ||
if (peg$c16.test(input.charAt(peg$currPos))) { | ||
s0 = input.charAt(peg$currPos); | ||
if (input.charCodeAt(peg$currPos) === 10) { | ||
s0 = peg$c16; | ||
peg$currPos++; | ||
@@ -606,2 +606,14 @@ } | ||
} | ||
if (s0 === peg$FAILED) { | ||
if (input.substr(peg$currPos, 2) === peg$c18) { | ||
s0 = peg$c18; | ||
peg$currPos += 2; | ||
} | ||
else { | ||
s0 = peg$FAILED; | ||
if (peg$silentFails === 0) { | ||
peg$fail(peg$c19); | ||
} | ||
} | ||
} | ||
return s0; | ||
@@ -613,3 +625,3 @@ } | ||
s0 = []; | ||
if (peg$c19.test(input.charAt(peg$currPos))) { | ||
if (peg$c21.test(input.charAt(peg$currPos))) { | ||
s1 = input.charAt(peg$currPos); | ||
@@ -621,3 +633,3 @@ peg$currPos++; | ||
if (peg$silentFails === 0) { | ||
peg$fail(peg$c20); | ||
peg$fail(peg$c22); | ||
} | ||
@@ -628,3 +640,3 @@ } | ||
s0.push(s1); | ||
if (peg$c19.test(input.charAt(peg$currPos))) { | ||
if (peg$c21.test(input.charAt(peg$currPos))) { | ||
s1 = input.charAt(peg$currPos); | ||
@@ -636,3 +648,3 @@ peg$currPos++; | ||
if (peg$silentFails === 0) { | ||
peg$fail(peg$c20); | ||
peg$fail(peg$c22); | ||
} | ||
@@ -649,3 +661,3 @@ } | ||
if (peg$silentFails === 0) { | ||
peg$fail(peg$c18); | ||
peg$fail(peg$c20); | ||
} | ||
@@ -659,3 +671,3 @@ } | ||
s0 = []; | ||
if (peg$c19.test(input.charAt(peg$currPos))) { | ||
if (peg$c21.test(input.charAt(peg$currPos))) { | ||
s1 = input.charAt(peg$currPos); | ||
@@ -667,3 +679,3 @@ peg$currPos++; | ||
if (peg$silentFails === 0) { | ||
peg$fail(peg$c20); | ||
peg$fail(peg$c22); | ||
} | ||
@@ -673,3 +685,3 @@ } | ||
s0.push(s1); | ||
if (peg$c19.test(input.charAt(peg$currPos))) { | ||
if (peg$c21.test(input.charAt(peg$currPos))) { | ||
s1 = input.charAt(peg$currPos); | ||
@@ -681,3 +693,3 @@ peg$currPos++; | ||
if (peg$silentFails === 0) { | ||
peg$fail(peg$c20); | ||
peg$fail(peg$c22); | ||
} | ||
@@ -690,3 +702,3 @@ } | ||
if (peg$silentFails === 0) { | ||
peg$fail(peg$c21); | ||
peg$fail(peg$c23); | ||
} | ||
@@ -700,3 +712,3 @@ } | ||
s0 = []; | ||
if (peg$c16.test(input.charAt(peg$currPos))) { | ||
if (peg$c25.test(input.charAt(peg$currPos))) { | ||
s1 = input.charAt(peg$currPos); | ||
@@ -708,3 +720,3 @@ peg$currPos++; | ||
if (peg$silentFails === 0) { | ||
peg$fail(peg$c17); | ||
peg$fail(peg$c26); | ||
} | ||
@@ -715,3 +727,3 @@ } | ||
s0.push(s1); | ||
if (peg$c16.test(input.charAt(peg$currPos))) { | ||
if (peg$c25.test(input.charAt(peg$currPos))) { | ||
s1 = input.charAt(peg$currPos); | ||
@@ -723,3 +735,3 @@ peg$currPos++; | ||
if (peg$silentFails === 0) { | ||
peg$fail(peg$c17); | ||
peg$fail(peg$c26); | ||
} | ||
@@ -736,3 +748,3 @@ } | ||
if (peg$silentFails === 0) { | ||
peg$fail(peg$c22); | ||
peg$fail(peg$c24); | ||
} | ||
@@ -746,3 +758,3 @@ } | ||
s0 = []; | ||
if (peg$c16.test(input.charAt(peg$currPos))) { | ||
if (peg$c25.test(input.charAt(peg$currPos))) { | ||
s1 = input.charAt(peg$currPos); | ||
@@ -754,3 +766,3 @@ peg$currPos++; | ||
if (peg$silentFails === 0) { | ||
peg$fail(peg$c17); | ||
peg$fail(peg$c26); | ||
} | ||
@@ -760,3 +772,3 @@ } | ||
s0.push(s1); | ||
if (peg$c16.test(input.charAt(peg$currPos))) { | ||
if (peg$c25.test(input.charAt(peg$currPos))) { | ||
s1 = input.charAt(peg$currPos); | ||
@@ -768,3 +780,3 @@ peg$currPos++; | ||
if (peg$silentFails === 0) { | ||
peg$fail(peg$c17); | ||
peg$fail(peg$c26); | ||
} | ||
@@ -777,3 +789,3 @@ } | ||
if (peg$silentFails === 0) { | ||
peg$fail(peg$c23); | ||
peg$fail(peg$c27); | ||
} | ||
@@ -787,3 +799,3 @@ } | ||
s0 = []; | ||
if (peg$c25.test(input.charAt(peg$currPos))) { | ||
if (peg$c29.test(input.charAt(peg$currPos))) { | ||
s1 = input.charAt(peg$currPos); | ||
@@ -795,3 +807,3 @@ peg$currPos++; | ||
if (peg$silentFails === 0) { | ||
peg$fail(peg$c26); | ||
peg$fail(peg$c30); | ||
} | ||
@@ -802,3 +814,3 @@ } | ||
s0.push(s1); | ||
if (peg$c25.test(input.charAt(peg$currPos))) { | ||
if (peg$c29.test(input.charAt(peg$currPos))) { | ||
s1 = input.charAt(peg$currPos); | ||
@@ -810,3 +822,3 @@ peg$currPos++; | ||
if (peg$silentFails === 0) { | ||
peg$fail(peg$c26); | ||
peg$fail(peg$c30); | ||
} | ||
@@ -823,3 +835,3 @@ } | ||
if (peg$silentFails === 0) { | ||
peg$fail(peg$c24); | ||
peg$fail(peg$c28); | ||
} | ||
@@ -833,3 +845,3 @@ } | ||
s0 = []; | ||
if (peg$c25.test(input.charAt(peg$currPos))) { | ||
if (peg$c29.test(input.charAt(peg$currPos))) { | ||
s1 = input.charAt(peg$currPos); | ||
@@ -841,3 +853,3 @@ peg$currPos++; | ||
if (peg$silentFails === 0) { | ||
peg$fail(peg$c26); | ||
peg$fail(peg$c30); | ||
} | ||
@@ -847,3 +859,3 @@ } | ||
s0.push(s1); | ||
if (peg$c25.test(input.charAt(peg$currPos))) { | ||
if (peg$c29.test(input.charAt(peg$currPos))) { | ||
s1 = input.charAt(peg$currPos); | ||
@@ -855,3 +867,3 @@ peg$currPos++; | ||
if (peg$silentFails === 0) { | ||
peg$fail(peg$c26); | ||
peg$fail(peg$c30); | ||
} | ||
@@ -864,3 +876,3 @@ } | ||
if (peg$silentFails === 0) { | ||
peg$fail(peg$c27); | ||
peg$fail(peg$c31); | ||
} | ||
@@ -867,0 +879,0 @@ } |
{ | ||
"name": "astrocite-ris", | ||
"version": "0.8.5", | ||
"version": "0.9.4", | ||
"description": "Parser and AST for converting RIS to CSL JSON", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
48428
1191