Remove block around initialize code

* In strict mode code, functions can only be declared at top level or
   immediately within another function.  This means functions defined in
   the initializer would throw.
This commit is contained in:
Arlo Breault 2015-06-05 15:33:35 -07:00
parent b079a056a2
commit 7285ccfd4e
2 changed files with 3 additions and 3 deletions

View file

@ -1147,7 +1147,7 @@ function generateJavascript(ast, options) {
}
if (ast.initializer) {
parts.push(indent4("{" + ast.initializer.code + "}"));
parts.push(indent4(ast.initializer.code));
parts.push('');
}

View file

@ -4893,7 +4893,7 @@ module.exports = (function() {
return s0;
}
{
var OPS_TO_PREFIXED_TYPES = {
"$": "text",
"&": "simple_and",
@ -4940,7 +4940,7 @@ module.exports = (function() {
function buildList(first, rest, index) {
return [first].concat(extractList(rest, index));
}
}
peg$result = peg$startRuleFunction();