diff --git a/lib/compiler/passes/generate-js.js b/lib/compiler/passes/generate-js.js index e70d99e..aafc4e5 100644 --- a/lib/compiler/passes/generate-js.js +++ b/lib/compiler/passes/generate-js.js @@ -788,7 +788,7 @@ function generateJS(ast, options) { ' return "\\\"" + literalEscape(expectation.text) + "\\\"";', ' },', '', - ' class: function(expectation) {', + ' "class": function(expectation) {', ' var escapedParts = "",', ' i;', '', diff --git a/lib/parser.js b/lib/parser.js index 666f2f5..17c6230 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -35,7 +35,7 @@ peg$SyntaxError.buildMessage = function(expected, found) { return "\"" + literalEscape(expectation.text) + "\""; }, - class: function(expectation) { + "class": function(expectation) { var escapedParts = "", i;