|
|
@ -21,7 +21,7 @@ describe("generated parser behavior", function() {
|
|
|
|
{ cache: false, optimize: "speed" },
|
|
|
|
{ cache: false, optimize: "speed" },
|
|
|
|
{ cache: false, optimize: "size" },
|
|
|
|
{ cache: false, optimize: "size" },
|
|
|
|
{ cache: true, optimize: "speed" },
|
|
|
|
{ cache: true, optimize: "speed" },
|
|
|
|
{ cache: true, optimize: "size" },
|
|
|
|
{ cache: true, optimize: "size" }
|
|
|
|
],
|
|
|
|
],
|
|
|
|
i;
|
|
|
|
i;
|
|
|
|
|
|
|
|
|
|
|
@ -400,7 +400,7 @@ describe("generated parser behavior", function() {
|
|
|
|
it("returns its result", function() {
|
|
|
|
it("returns its result", function() {
|
|
|
|
var parser = PEG.buildParser([
|
|
|
|
var parser = PEG.buildParser([
|
|
|
|
'start = a',
|
|
|
|
'start = a',
|
|
|
|
'a = "a"',
|
|
|
|
'a = "a"'
|
|
|
|
].join("\n"), options);
|
|
|
|
].join("\n"), options);
|
|
|
|
|
|
|
|
|
|
|
|
expect(parser).toParse("a", "a");
|
|
|
|
expect(parser).toParse("a", "a");
|
|
|
@ -411,7 +411,7 @@ describe("generated parser behavior", function() {
|
|
|
|
it("reports match failure", function() {
|
|
|
|
it("reports match failure", function() {
|
|
|
|
var parser = PEG.buildParser([
|
|
|
|
var parser = PEG.buildParser([
|
|
|
|
'start = a',
|
|
|
|
'start = a',
|
|
|
|
'a = "a"',
|
|
|
|
'a = "a"'
|
|
|
|
].join("\n"), options);
|
|
|
|
].join("\n"), options);
|
|
|
|
|
|
|
|
|
|
|
|
expect(parser).toFailToParse("b");
|
|
|
|
expect(parser).toFailToParse("b");
|
|
|
|