Label scope specs: Remove redundant sequence elements

Semantic predicate specs which verified scope of labels from containing
sequences used 3 elements where 1 is enough.

This commit removes the redundant elements.
redux
David Majda 9 years ago
parent 6bc91c010d
commit a20d04edf4

@ -439,11 +439,11 @@ describe("generated parser behavior", function() {
describe("in containing sequence", function() {
it("can access variables defined by preceding labeled elements", function() {
var parser = PEG.buildParser(
'start = a:"a" b:"b" c:"c" &{ return a === "a" && b === "b" && c === "c"; }',
'start = a:"a" &{ return a === "a"; }',
options
);
expect(parser).toParse("abc");
expect(parser).toParse("a");
});
});
@ -594,11 +594,11 @@ describe("generated parser behavior", function() {
describe("in containing sequence", function() {
it("can access variables defined by preceding labeled elements", function() {
var parser = PEG.buildParser(
'start = a:"a" b:"b" c:"c" !{ return a !== "a" || b !== "b" || c !== "c"; }',
'start = a:"a" !{ return a !== "a"; }',
options
);
expect(parser).toParse("abc");
expect(parser).toParse("a");
});
});

Loading…
Cancel
Save