Include id2ast pointers when dumping AST

This commit is contained in:
Clifford Wolf 2014-03-05 19:56:31 +01:00
parent d6a01fe412
commit 09805ee9ec
1 changed files with 6 additions and 0 deletions

View File

@ -244,6 +244,12 @@ void AstNode::dumpAst(FILE *f, std::string indent)
std::string type_name = type2str(type);
fprintf(f, "%s%s <%s:%d>", indent.c_str(), type_name.c_str(), filename.c_str(), linenum);
if (id2ast)
fprintf(f, " [%p -> %p]", this, id2ast);
else
fprintf(f, " [%p]", this);
if (!str.empty())
fprintf(f, " str='%s'", str.c_str());
if (!bits.empty()) {