Fix eager parsing of arrow functions for non-punc tokens
This commit is contained in:
committed by
Richard van Velzen
parent
0b303379c0
commit
6780d0906c
@@ -1794,7 +1794,7 @@ function parse($TEXT, options) {
|
|||||||
var maybe_assign = function(no_in) {
|
var maybe_assign = function(no_in) {
|
||||||
var start = S.token;
|
var start = S.token;
|
||||||
|
|
||||||
if (start.value == "(" && peek().value == ")") {
|
if (start.type == "punc" && start.value == "(" && peek().value == ")") {
|
||||||
next();
|
next();
|
||||||
next();
|
next();
|
||||||
return arrow_function([]);
|
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(")");'
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user