зеркало из https://github.com/mozilla/pjs.git
Fix Expression to work with Statement's automatic semicolon insertion logic.
This commit is contained in:
Родитель
d78e8a45b5
Коммит
20d6618029
|
@ -951,6 +951,19 @@ loop:
|
|||
--x.parenLevel;
|
||||
break;
|
||||
|
||||
// Automatic semicolon insertion means we may scan across a newline
|
||||
// and into the beginning of another statement. If so, break out of
|
||||
// the while loop and let the t.scanOperand logic handle errors.
|
||||
case FUNCTION:
|
||||
case IF: case SWITCH: case CASE: case DEFAULT:
|
||||
case FOR: case WHILE: case DO: case BREAK: case CONTINUE:
|
||||
case TRY: case CATCH: case FINALLY:
|
||||
case THROW: case RETURN:
|
||||
case WITH:
|
||||
case VAR: case CONST:
|
||||
case DEBUGGER:
|
||||
break loop;
|
||||
|
||||
default:
|
||||
throw t.newSyntaxError("Syntax error");
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче