diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2016-10-07 18:43:39 -0600 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2016-10-07 18:43:39 -0600 |
commit | 7bbd1a207f65428283471f1cc956f3fda43fbe3e (patch) | |
tree | f8febd1c59ad6aa5f071aa8644a4961b163cfb77 /src/printer/dump.cpp | |
parent | 79866eaaf708759db9458e60bb4ea51799608f2e (diff) | |
download | chill-7bbd1a207f65428283471f1cc956f3fda43fbe3e.tar.gz chill-7bbd1a207f65428283471f1cc956f3fda43fbe3e.tar.bz2 chill-7bbd1a207f65428283471f1cc956f3fda43fbe3e.zip |
fixes
Diffstat (limited to 'src/printer/dump.cpp')
-rw-r--r-- | src/printer/dump.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/printer/dump.cpp b/src/printer/dump.cpp index cd4c316..ca208ab 100644 --- a/src/printer/dump.cpp +++ b/src/printer/dump.cpp @@ -24,6 +24,7 @@ void dumpVector(GenericPrinter *p, string ident, chillAST_TypedefTable *n, ostre } void Dump::print(string ident, chillAST_Node *n, ostream &o) { + if (!n) return; o << "(" << n->getTypeString() << " "; if (n->getParameters()) { o << "(Params: "; @@ -70,8 +71,7 @@ void Dump::printS(std::string ident, chillAST_BinaryOperator *n, std::ostream &o } void Dump::printS(std::string ident, chillAST_CallExpr *n, std::ostream &o) { - if (n->getCallee()) - print(ident, n->getCallee(), o); + dumpVector(this,ident,n->getChildren(),o); } void Dump::printS(std::string ident, chillAST_CompoundStmt *n, std::ostream &o) { |