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 9 years ago
parent 7285ccfd4e
commit 45e39c3ac8

@ -13,5 +13,6 @@
"noempty": true, "noempty": true,
"nonew": true, "nonew": true,
"trailing": true, "trailing": true,
"validthis": true,
"-W082": false "-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