Fix eager parsing of arrow functions for non-punc tokens

This commit is contained in:
viclm
2016-03-08 15:43:01 +08:00
committed by Richard van Velzen
parent 0b303379c0
commit 6780d0906c
2 changed files with 9 additions and 1 deletions

View File

@@ -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([]);