This commit is contained in:
Erik Lax 2013-01-22 13:49:54 +01:00 committed by PKEuS
parent f97015e244
commit 444f80c4bb
2 changed files with 3 additions and 2 deletions

View File

@ -294,7 +294,8 @@ bool TokenList::createTokens(std::istream &code, const std::string& file0)
std::getline(code, line);
// Update the current line number
std::stringstream(line) >> lineno;
if (!(std::stringstream(line) >> lineno))
++lineno;
CurrentToken.clear();
continue;
} else if (CurrentToken == "#endfile") {

View File

@ -4693,7 +4693,7 @@ private:
if (tok->str() == "second")
ASSERT_EQUALS(5, tok->linenr());
if (tok->str() == "third")
TODO_ASSERT_EQUALS(7, 0, tok->linenr());
ASSERT_EQUALS(7, tok->linenr());
if (tok->str() == "fourth")
ASSERT_EQUALS(100, tok->linenr());
if (tok->str() == "fifth")