Skip to content

Commit eaadfb3

Browse files
committed
update debug token list output for templates.
1 parent a80760c commit eaadfb3

3 files changed

Lines changed: 133 additions & 128 deletions

File tree

lib/token.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,12 @@ void Token::stringify(std::ostream& os, bool varid, bool attributes, bool macro)
988988
}
989989
if (macro && isExpandedMacro())
990990
os << "$";
991-
if (_str[0] != '\"' || _str.find('\0') == std::string::npos)
991+
if (isName() && _str.find(' ') != std::string::npos) {
992+
for (std::size_t i = 0U; i < _str.size(); ++i) {
993+
if (_str[i] != ' ')
994+
os << _str[i];
995+
}
996+
} else if (_str[0] != '\"' || _str.find('\0') == std::string::npos)
992997
os << _str;
993998
else {
994999
for (std::size_t i = 0U; i < _str.size(); ++i) {

0 commit comments

Comments
 (0)