Fixed bug in line numbers and enabled test case that spots it.

This commit is contained in:
Reijo Tomperi 2009-01-19 18:51:27 +00:00
parent 7b90246198
commit de28502bb1
2 changed files with 3 additions and 2 deletions

View File

@ -354,6 +354,7 @@ void Tokenizer::tokenizeCode(std::istream &code, unsigned int FileIndex)
}
// Has this file been tokenized already?
++lineno;
bool foundOurfile = false;
for (unsigned int i = 0; i < _files.size(); i++)
{
@ -372,7 +373,7 @@ void Tokenizer::tokenizeCode(std::istream &code, unsigned int FileIndex)
fileIndexes.push_back(lineno);
}
lineno = 0;
lineno = 1;
FileIndex = fileIndexes.size() - 1;
continue;
}

View File

@ -67,7 +67,7 @@ private:
TEST_CASE(varid1);
TEST_CASE(varid2);
// TODO TEST_CASE(file1);
TEST_CASE(file1);
}