Fix Expression to work with Statement's automatic semicolon insertion logic.

This commit is contained in:
brendan%mozilla.org 2004-02-14 21:56:41 +00:00
Родитель d78e8a45b5
Коммит 20d6618029
1 изменённых файлов: 13 добавлений и 0 удалений

Просмотреть файл

@ -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");
}