Fixed pre-precessor bug.

When a PP line ended with a \ (join line) and the next line was empty
(ending th joining), the following token would be incorrectly marked as
joined.

Done-with: Roberto Raggi
This commit is contained in:
Erik Verbruggen
2010-02-10 11:04:31 +01:00
parent b1af22b3ab
commit 9806b1e165
2 changed files with 58 additions and 2 deletions

View File

@@ -180,10 +180,12 @@ void Lexer::scan_helper(Token *tok)
{
_Lagain:
while (_yychar && std::isspace(_yychar)) {
if (_yychar == '\n')
if (_yychar == '\n') {
tok->f.joined = false;
tok->f.newline = true;
else
} else {
tok->f.whitespace = true;
}
yyinp();
}