Verbose AST dump: Show if token is expanded from macro

I also added the token variable id, but that decreased
readability of the AST tree too much.
This commit is contained in:
Thomas Jarosch 2015-01-17 23:11:22 +01:00
parent 10fffbfce0
commit 2bcd675653
1 changed files with 6 additions and 1 deletions

View File

@ -1250,7 +1250,12 @@ static std::string indent(const unsigned int indent1, const unsigned int indent2
std::string Token::astStringVerbose(const unsigned int indent1, const unsigned int indent2) const
{
std::string ret = _str + "\n";
std::string ret;
if (isExpandedMacro())
ret += "$";
ret += _str + "\n";
if (_astOperand1) {
unsigned int i1 = indent1, i2 = indent2 + 2;
if (indent1==indent2 && !_astOperand2)