зеркало из https://github.com/mozilla/gecko-dev.git
Bug 475834 - Multiline comments with newlines in them should not decompose to nothing. r=brendan
This commit is contained in:
Родитель
196e202090
Коммит
6c157b6873
|
@ -1802,6 +1802,7 @@ skipline:
|
|||
}
|
||||
|
||||
if (MatchChar(ts, '*')) {
|
||||
uintN lineno = ts->lineno;
|
||||
while ((c = GetChar(ts)) != EOF &&
|
||||
!(c == '*' && MatchChar(ts, '/'))) {
|
||||
/* Ignore all characters until comment close. */
|
||||
|
@ -1811,6 +1812,11 @@ skipline:
|
|||
JSMSG_UNTERMINATED_COMMENT);
|
||||
goto error;
|
||||
}
|
||||
if ((ts->flags & TSF_NEWLINES) && lineno != ts->lineno) {
|
||||
ts->flags &= ~TSF_DIRTYLINE;
|
||||
tt = TOK_EOL;
|
||||
goto eol_out;
|
||||
}
|
||||
ts->cursor = (ts->cursor - 1) & NTOKENS_MASK;
|
||||
goto retry;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче