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
Родитель d97dedc812
Коммит 76d7770850
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");
}