generate bare anonymous functions

This commit is contained in:
alexlamsl 2017-04-23 05:47:18 +08:00
parent 0a259f74e4
commit 7194c09e4c

View File

@ -631,7 +631,7 @@ function _createExpression(recurmax, noComma, stmtDepth, canThrow) {
break;
default:
s.push(
'new function ' + name + '(){',
(rng(4) == 0 ? '' : 'new ') + 'function ' + name + '(){',
strictMode(),
createStatements(rng(5) + 1, recurmax, canThrow, CANNOT_BREAK, CANNOT_CONTINUE, CAN_RETURN, stmtDepth),
'}'