Make generated parsers use strict mode

* Issue #324

 * JSHint complains about two possible strict violations. But are valid
   uses of `this`, so we suppress the warnings.
redux
Arlo Breault 10 years ago
parent 7285ccfd4e
commit 45e39c3ac8

@ -1,17 +1,18 @@
{ {
"curly": true, "curly": true,
"eqeqeq": true, "eqeqeq": true,
"evil": true, "evil": true,
"forin": true, "forin": true,
"freeze": true, "freeze": true,
"immed": true, "immed": true,
"latedef": "nofunc", "latedef": "nofunc",
"laxbreak": true, "laxbreak": true,
"loopfunc": true, "loopfunc": true,
"newcap": false, "newcap": false,
"noarg": true, "noarg": true,
"noempty": true, "noempty": true,
"nonew": true, "nonew": true,
"trailing": true, "trailing": true,
"-W082": false "validthis": true,
"-W082": false
} }

@ -761,6 +761,8 @@ function generateJavascript(ast, options) {
parts.push([ parts.push([
'(function() {', '(function() {',
' "use strict";',
'',
' /*', ' /*',
' * Generated by PEG.js 0.8.0.', ' * Generated by PEG.js 0.8.0.',
' *', ' *',

@ -1,4 +1,6 @@
module.exports = (function() { module.exports = (function() {
"use strict";
/* /*
* Generated by PEG.js 0.8.0. * Generated by PEG.js 0.8.0.
* *

Loading…
Cancel
Save