|
|
|
@ -633,7 +633,8 @@ describe("generated parser behavior", function() {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
describe("zero or more", function() {
|
|
|
|
|
it("matches correctly", function() {
|
|
|
|
|
describe("when the expression matches zero or more times", function() {
|
|
|
|
|
it("returns an array of its match results", function() {
|
|
|
|
|
var parser = PEG.buildParser('start = "a"*', options);
|
|
|
|
|
|
|
|
|
|
expect(parser).toParse("", []);
|
|
|
|
@ -641,6 +642,7 @@ describe("generated parser behavior", function() {
|
|
|
|
|
expect(parser).toParse("aaa", ["a", "a", "a"]);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
describe("one or more", function() {
|
|
|
|
|
it("matches correctly", function() {
|
|
|
|
|