diff --git a/lib/parse.js b/lib/parse.js index 0a6072af..8e608e8a 100644 --- a/lib/parse.js +++ b/lib/parse.js @@ -1794,7 +1794,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([]); diff --git a/test/compress/issue-1001.js b/test/compress/issue-1001.js new file mode 100644 index 00000000..89adf81c --- /dev/null +++ b/test/compress/issue-1001.js @@ -0,0 +1,8 @@ +parenthesis_strings_in_parenthesis: { + input: { + ('('); + a(')'); + + } + expect_exact: '"(";a(")");' +}