bump simplecpp (#2245)

This commit is contained in:
Rikard Falkeborn 2019-10-08 10:38:22 +02:00 committed by Daniel Marjamäki
parent 93e9e12aa1
commit d27e70db8e
1 changed files with 14 additions and 6 deletions

View File

@ -1133,12 +1133,20 @@ std::string simplecpp::TokenList::readUntil(std::istream &istr, const Location &
backslash = false; backslash = false;
ret += ch; ret += ch;
if (ch == '\\') { if (ch == '\\') {
const char next = readChar(istr, bom); bool update_ch = false;
if (next == '\r' || next == '\n') { char next = 0;
ret.erase(ret.size()-1U); do {
backslash = (next == '\r'); next = readChar(istr, bom);
} if (next == '\r' || next == '\n') {
ret += next; ret.erase(ret.size()-1U);
backslash = (next == '\r');
update_ch = false;
} else if (next == '\\')
update_ch = !update_ch;
ret += next;
} while (next == '\\');
if (update_ch)
ch = next;
} }
} }