Merge pull request #210 from AWoloszyn/fix-compilation

Fixed compilation issue introduced by my last commit
This commit is contained in:
John Kessenich 2016-03-21 14:06:55 -06:00
commit 5ace09a75b
2 changed files with 24 additions and 11 deletions

View File

@ -170,6 +170,14 @@ public:
loc[getLastValidSourceIndex()].name = filename;
}
void setFile(const char* filename, size_t i)
{
if (i == getLastValidSourceIndex()) {
logicalSourceLoc.name = filename;
}
loc[i].name = filename;
}
void setString(int newString)
{
logicalSourceLoc.string = newString;

View File

@ -447,19 +447,24 @@ protected:
prologue_(prologue),
includedFile_(includedFile),
epilogue_(epilogue),
strings({prologue_.data(), includedFile_->file_data, epilogue_.data()}),
lengths({prologue_.size(), includedFile_->file_length, epilogue_.size()}),
names({
includedFile_->file_name.c_str(),
includedFile_->file_name.c_str(),
includedFile_->file_name.c_str()
}),
scanner(3, strings, lengths, names, 0, 0, true),
prevScanner(nullptr),
stringInput(pp, scanner) {
stringInput(pp, scanner)
{
strings[0] = prologue_.data();
strings[1] = includedFile_->file_data;
strings[2] = epilogue_.data();
lengths[0] = prologue_.size();
lengths[1] = includedFile_->file_length;
lengths[2] = epilogue_.size();
scanner.setLine(startLoc.line);
scanner.setString(startLoc.string);
scanner.setFile(startLoc.name);
scanner.setFile(startLoc.name, 0);
scanner.setFile(startLoc.name, 1);
scanner.setFile(startLoc.name, 2);
}
// tInput methods: