Fix eager parsing of arrow functions for non-punc tokens
This commit is contained in:
parent
627083fa16
commit
0e230169f8
|
|
@ -1798,7 +1798,7 @@ function parse($TEXT, options) {
|
|||
var maybe_assign = function(no_in) {
|
||||
var start = S.token;
|
||||
|
||||
if (start.value == "(" && peek().value == ")") {
|
||||
if (start.type == "punc" && start.value == "(" && peek().value == ")") {
|
||||
next();
|
||||
next();
|
||||
return arrow_function([]);
|
||||
|
|
|
|||
8
test/compress/issue-1001.js
Normal file
8
test/compress/issue-1001.js
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
parenthesis_strings_in_parenthesis: {
|
||||
input: {
|
||||
('(');
|
||||
a(')');
|
||||
|
||||
}
|
||||
expect_exact: '"(";a(")");'
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user