From 87e7538503756d036fec4c2b18a9c19d126626a4 Mon Sep 17 00:00:00 2001 From: Tuowen Zhao Date: Fri, 30 Sep 2016 13:25:57 -0600 Subject: Binary Ternary --- src/printer/cfamily.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/printer/cfamily.cpp') diff --git a/src/printer/cfamily.cpp b/src/printer/cfamily.cpp index 299c81c..8aa6e62 100644 --- a/src/printer/cfamily.cpp +++ b/src/printer/cfamily.cpp @@ -56,10 +56,10 @@ int CFamily::getPrecS(chillAST_BinaryOperator *n) { void CFamily::printS(std::string ident, chillAST_BinaryOperator *n, std::ostream &o) { int prec = getPrec(n); - if (n->lhs) printPrec(ident, n->lhs, o, prec); + if (n->getLHS()) printPrec(ident, n->getLHS(), o, prec); else o << "(NULL)"; o << " " << n->op << " "; - if (n->rhs) printPrec(ident, n->rhs, o, prec); + if (n->getRHS()) printPrec(ident, n->getRHS(), o, prec); else o << "(NULL)"; } @@ -347,11 +347,11 @@ int CFamily::getPrecS(chillAST_TernaryOperator *n) { void CFamily::printS(std::string ident, chillAST_TernaryOperator *n, std::ostream &o) { int prec = getPrec(n); - printPrec(ident, n->condition, o, prec); + printPrec(ident, n->getCond(), o, prec); o << "" << n->op << ""; - printPrec(ident, n->lhs, o, prec); + printPrec(ident, n->getLHS(), o, prec); o << ":"; - printPrec(ident, n->rhs, o, prec); + printPrec(ident, n->getRHS(), o, prec); } const char *unaryPrec[] = { -- cgit v1.2.3-70-g09d2