diff options
| author | Tuowen Zhao <ztuowen@gmail.com> | 2016-09-26 08:51:47 -0600 | 
|---|---|---|
| committer | Tuowen Zhao <ztuowen@gmail.com> | 2016-09-26 08:51:47 -0600 | 
| commit | eb1ab91e1a12520d825cae60ee49655a0e8c4b94 (patch) | |
| tree | b9ed57a06489a57d4bc42cfd7ed3d80b7b1fec1a /src/printer | |
| parent | e7de858ce27ded585d6e2ec4a5cbc3467c6a7593 (diff) | |
| download | chill-eb1ab91e1a12520d825cae60ee49655a0e8c4b94.tar.gz chill-eb1ab91e1a12520d825cae60ee49655a0e8c4b94.tar.bz2 chill-eb1ab91e1a12520d825cae60ee49655a0e8c4b94.zip  | |
Node cleanup
Diffstat (limited to 'src/printer')
| -rw-r--r-- | src/printer/cfamily.cpp | 11 | ||||
| -rw-r--r-- | src/printer/dump.cpp | 1 | 
2 files changed, 7 insertions, 5 deletions
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<<n->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) {  | 
