Bug 475834 - Multiline comments with newlines in them should not decompose to nothing. r=brendan

This commit is contained in:
Blake Kaplan 2009-01-29 12:22:26 -08:00
parent 2ba2f5d3ed
commit 69a2bec66d

View File

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