update debug token list output for templates.

This commit is contained in:
Daniel Marjamäki 2017-12-25 23:16:51 +01:00
parent a80760cb6f
commit eaadfb3910
3 changed files with 133 additions and 128 deletions

View File

@ -988,7 +988,12 @@ void Token::stringify(std::ostream& os, bool varid, bool attributes, bool macro)
}
if (macro && isExpandedMacro())
os << "$";
if (_str[0] != '\"' || _str.find('\0') == std::string::npos)
if (isName() && _str.find(' ') != std::string::npos) {
for (std::size_t i = 0U; i < _str.size(); ++i) {
if (_str[i] != ' ')
os << _str[i];
}
} else if (_str[0] != '\"' || _str.find('\0') == std::string::npos)
os << _str;
else {
for (std::size_t i = 0U; i < _str.size(); ++i) {