Fixing line number generation for the empty return statement which was reported by Steven Beal. It was caused by missed update of lineno in statementHelper when dealing with return;.

This commit is contained in:
igor%mir2.org 2002-08-16 06:42:27 +00:00
Родитель d9ec8520f9
Коммит 2809a2cb52
1 изменённых файлов: 1 добавлений и 2 удалений

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

@ -736,7 +736,6 @@ class Parser {
}
case TokenStream.RETURN: {
Object retExpr = null;
int lineno = 0;
sourceAdd((char)ts.RETURN);
@ -749,8 +748,8 @@ class Parser {
tt = ts.peekTokenSameLine();
ts.flags &= ~ts.TSF_REGEXP;
int lineno = ts.getLineno();
if (tt != ts.EOF && tt != ts.EOL && tt != ts.SEMI && tt != ts.RC) {
lineno = ts.getLineno();
retExpr = expr(ts, false);
if (ts.getLineno() == lineno)
wellTerminated(ts, ts.ERROR);