Clang import; character literal '\'

This commit is contained in:
Daniel Marjamäki 2020-01-10 17:37:36 +01:00
parent 4c778e0999
commit f667abacf6
1 changed files with 2 additions and 0 deletions

View File

@ -460,6 +460,8 @@ Token *clangimport::AstNode::createTokens(TokenList *tokenList)
return addtoken(tokenList, "\'\\n\'"); return addtoken(tokenList, "\'\\n\'");
if (c == '\t') if (c == '\t')
return addtoken(tokenList, "\'\\t\'"); return addtoken(tokenList, "\'\\t\'");
if (c == '\\')
return addtoken(tokenList, "\'\\\\\'");
if (c < ' ' || c >= 0x80) { if (c < ' ' || c >= 0x80) {
std::ostringstream hex; std::ostringstream hex;
hex << std::hex << ((c>>4) & 0xf) << (c&0xf); hex << std::hex << ((c>>4) & 0xf) << (c&0xf);