generate-js.js: Quote the "class" key in DESCRIBE_EXPECTATION_FNS

"class" is a reserved word. Having it as a key unquoted broke IE 8 (both
in standards and quirks mode) and IE 9 (in quirks mode).
redux
David Majda 8 years ago
parent 2a8544d86c
commit b77d33ca05

@ -788,7 +788,7 @@ function generateJS(ast, options) {
' return "\\\"" + literalEscape(expectation.text) + "\\\"";',
' },',
'',
' class: function(expectation) {',
' "class": function(expectation) {',
' var escapedParts = "",',
' i;',
'',

@ -35,7 +35,7 @@ peg$SyntaxError.buildMessage = function(expected, found) {
return "\"" + literalEscape(expectation.text) + "\"";
},
class: function(expectation) {
"class": function(expectation) {
var escapedParts = "",
i;

Loading…
Cancel
Save