Fixed #4505
This commit is contained in:
parent
f97015e244
commit
444f80c4bb
|
@ -294,7 +294,8 @@ bool TokenList::createTokens(std::istream &code, const std::string& file0)
|
||||||
std::getline(code, line);
|
std::getline(code, line);
|
||||||
|
|
||||||
// Update the current line number
|
// Update the current line number
|
||||||
std::stringstream(line) >> lineno;
|
if (!(std::stringstream(line) >> lineno))
|
||||||
|
++lineno;
|
||||||
CurrentToken.clear();
|
CurrentToken.clear();
|
||||||
continue;
|
continue;
|
||||||
} else if (CurrentToken == "#endfile") {
|
} else if (CurrentToken == "#endfile") {
|
||||||
|
|
|
@ -4693,7 +4693,7 @@ private:
|
||||||
if (tok->str() == "second")
|
if (tok->str() == "second")
|
||||||
ASSERT_EQUALS(5, tok->linenr());
|
ASSERT_EQUALS(5, tok->linenr());
|
||||||
if (tok->str() == "third")
|
if (tok->str() == "third")
|
||||||
TODO_ASSERT_EQUALS(7, 0, tok->linenr());
|
ASSERT_EQUALS(7, tok->linenr());
|
||||||
if (tok->str() == "fourth")
|
if (tok->str() == "fourth")
|
||||||
ASSERT_EQUALS(100, tok->linenr());
|
ASSERT_EQUALS(100, tok->linenr());
|
||||||
if (tok->str() == "fifth")
|
if (tok->str() == "fifth")
|
||||||
|
|
Loading…
Reference in New Issue