Commit f4e877da authored by twanvl's avatar twanvl

warn about incorrect string escape sequences

parent 9f6c7817
......@@ -289,7 +289,12 @@ void TokenIterator::readStringToken() {
c = input.GetChar(pos++);
if (c == _('n')) str += _('\n');
else if (c == _('<')) str += _('\1'); // escape for <
else str += c; // \ or { or "
else if (c == _('\\') || c == _('"') || c == _('{') || c == _('}')) {
str += c; // \ or { or "
} else {
add_error(String::Format(_("Invalid string escape sequence: \"\\%c\""),c));
str += _('\\') + c; // ignore
}
} else if (c == _('{')) {
// smart string
// "a{e}b" --> "a" "{ e }" "b"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment