From eb1ab91e1a12520d825cae60ee49655a0e8c4b94 Mon Sep 17 00:00:00 2001 From: Tuowen Zhao Date: Mon, 26 Sep 2016 08:51:47 -0600 Subject: Node cleanup --- src/printer/cfamily.cpp | 11 +++++++---- src/printer/dump.cpp | 1 - 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'src/printer') diff --git a/src/printer/cfamily.cpp b/src/printer/cfamily.cpp index e1e2b9a..299c81c 100644 --- a/src/printer/cfamily.cpp +++ b/src/printer/cfamily.cpp @@ -160,10 +160,13 @@ void CFamily::printS(std::string ident, chillAST_DeclRefExpr *n, std::ostream &o } void CFamily::printS(std::string ident, chillAST_FloatingLiteral *n, std::ostream &o) { - // Althedigits contaminates the result - o << showpoint << n->value; - if (n->getPrecision() == 1) - o << "f"; + if (n->allthedigits) + o<allthedigits; + else { + o << showpoint << n->value; + if (n->getPrecision() == 1) + o << "f"; + } } void CFamily::printS(std::string ident, chillAST_ForStmt *n, std::ostream &o) { diff --git a/src/printer/dump.cpp b/src/printer/dump.cpp index 66bcc7e..a88f472 100644 --- a/src/printer/dump.cpp +++ b/src/printer/dump.cpp @@ -159,7 +159,6 @@ void Dump::printS(std::string ident, chillAST_MacroDefinition *n, std::ostream & o << n->macroName << " "; dumpVector(this, ident, n->getParameters(), o); print(ident, n->getBody(), o); - if (n->rhsString) o << " (aka " << n->rhsString << ") "; } void Dump::printS(std::string ident, chillAST_Malloc *n, std::ostream &o) { -- cgit v1.2.3-70-g09d2