Jasmine: Convert tests of parser's "action" rule

redux
David Majda 13 years ago
parent 35771e15bc
commit 57bbcd71e5

@ -134,6 +134,13 @@ describe("PEG.js grammar parser", function() {
});
});
/* Canonical action is "{ code }". */
it("parses action", function() {
expect('start = "abcd" { code }').toParseAs(actionGrammar(" code "));
expect('start = "abcd" { code }\n').toParseAs(actionGrammar(" code "));
});
/* Canonical braced is "{ code }". */
it("parses braced", function() {
expect('start = "abcd" {}' ).toParseAs(actionGrammar(""));

@ -302,9 +302,4 @@ test("parses primary", function() {
parserParses('start = ("abcd")', literalGrammar("abcd"));
});
/* Canonical action is "{ code }". */
test("parses action", function() {
parserParses('start = "a" { code }', actionGrammar(" code "));
});
})();

Loading…
Cancel
Save