@@ -1347,9 +1347,11 @@ function parse($TEXT, options) {
|
|||||||
var loop = S.in_loop;
|
var loop = S.in_loop;
|
||||||
var labels = S.labels;
|
var labels = S.labels;
|
||||||
++S.in_function;
|
++S.in_function;
|
||||||
|
S.input.push_directives_stack();
|
||||||
S.in_loop = 0;
|
S.in_loop = 0;
|
||||||
S.labels = [];
|
S.labels = [];
|
||||||
if (is("punc", "{")) {
|
if (is("punc", "{")) {
|
||||||
|
S.in_directives = true;
|
||||||
body = block_();
|
body = block_();
|
||||||
value = null;
|
value = null;
|
||||||
} else {
|
} else {
|
||||||
@@ -1357,6 +1359,8 @@ function parse($TEXT, options) {
|
|||||||
handle_regexp();
|
handle_regexp();
|
||||||
value = maybe_assign();
|
value = maybe_assign();
|
||||||
}
|
}
|
||||||
|
var is_strict = S.input.has_directive("use strict");
|
||||||
|
S.input.pop_directives_stack();
|
||||||
--S.in_function;
|
--S.in_function;
|
||||||
S.in_loop = loop;
|
S.in_loop = loop;
|
||||||
S.labels = labels;
|
S.labels = labels;
|
||||||
@@ -1370,7 +1374,7 @@ function parse($TEXT, options) {
|
|||||||
value: value,
|
value: value,
|
||||||
end: prev(),
|
end: prev(),
|
||||||
});
|
});
|
||||||
if (S.input.has_directive("use strict")) node.each_argname(strict_verify_symbol);
|
if (is_strict) node.each_argname(strict_verify_symbol);
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1106,3 +1106,17 @@ issue_5416: {
|
|||||||
expect_stdout: "undefined"
|
expect_stdout: "undefined"
|
||||||
node_version: ">=4"
|
node_version: ">=4"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_5495: {
|
||||||
|
input: {
|
||||||
|
console.log((() => {
|
||||||
|
"use strict";
|
||||||
|
return function() {
|
||||||
|
return this;
|
||||||
|
}();
|
||||||
|
})());
|
||||||
|
}
|
||||||
|
expect_exact: 'console.log((()=>{"use strict";return function(){return this}()})());'
|
||||||
|
expect_stdout: "undefined"
|
||||||
|
node_version: ">=4"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user