bump simplecpp

This commit is contained in:
Daniel Marjamäki 2018-11-02 16:28:48 +01:00
parent 3798feecad
commit 590bf97247
1 changed files with 4 additions and 1 deletions

View File

@ -439,7 +439,6 @@ void simplecpp::TokenList::readfile(std::istream &istr, const std::string &filen
if (oldLastToken != cback()) { if (oldLastToken != cback()) {
oldLastToken = cback(); oldLastToken = cback();
const std::string lastline(lastLine()); const std::string lastline(lastLine());
if (lastline == "# file %str%") { if (lastline == "# file %str%") {
loc.push(location); loc.push(location);
location.fileIndex = fileIndex(cback()->str().substr(1U, cback()->str().size() - 2U)); location.fileIndex = fileIndex(cback()->str().substr(1U, cback()->str().size() - 2U));
@ -451,6 +450,10 @@ void simplecpp::TokenList::readfile(std::istream &istr, const std::string &filen
loc.push(location); loc.push(location);
location.fileIndex = fileIndex(cback()->str().substr(1U, cback()->str().size() - 2U)); location.fileIndex = fileIndex(cback()->str().substr(1U, cback()->str().size() - 2U));
location.line = std::atol(cback()->previous->str().c_str()); location.line = std::atol(cback()->previous->str().c_str());
} else if (lastline == "# %num% %str%") {
loc.push(location);
location.fileIndex = fileIndex(cback()->str().substr(1U, cback()->str().size() - 2U));
location.line = std::atol(cback()->previous->str().c_str());
} }
// #endfile // #endfile
else if (lastline == "# endfile" && !loc.empty()) { else if (lastline == "# endfile" && !loc.empty()) {