summaryrefslogtreecommitdiff
path: root/src/printer
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2016-10-06 16:07:35 -0600
committerTuowen Zhao <ztuowen@gmail.com>2016-10-06 16:07:35 -0600
commitf329ee2b4cfdde656d2fe30f2a2789d8a3774203 (patch)
treeea000895ad943188ebdded11f4311b4e1cf011bb /src/printer
parentb7a50e256d0ac6ec120050173b37f34d434ef325 (diff)
downloadchill-f329ee2b4cfdde656d2fe30f2a2789d8a3774203.tar.gz
chill-f329ee2b4cfdde656d2fe30f2a2789d8a3774203.tar.bz2
chill-f329ee2b4cfdde656d2fe30f2a2789d8a3774203.zip
cleanup
Diffstat (limited to 'src/printer')
-rw-r--r--src/printer/cfamily.cpp6
-rw-r--r--src/printer/dump.cpp6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/printer/cfamily.cpp b/src/printer/cfamily.cpp
index 738db47..d0f8030 100644
--- a/src/printer/cfamily.cpp
+++ b/src/printer/cfamily.cpp
@@ -21,9 +21,9 @@ bool ifSemicolonFree(CHILLAST_NODE_TYPE t) {
}
void CFamily::printS(std::string ident, chillAST_ArraySubscriptExpr *n, std::ostream &o) {
- print(ident, n->base, o);
+ print(ident, n->getBase(), o);
o << "[";
- print(ident, n->index, o);
+ print(ident, n->getIndex(), o);
o << "]";
}
@@ -266,7 +266,7 @@ void CFamily::printS(std::string ident, chillAST_Malloc *n, std::ostream &o) {
void CFamily::printS(std::string ident, chillAST_MemberExpr *n, std::ostream &o) {
int prec = getPrec(n);
- if (n->base) printPrec(ident, n->base, o, prec);
+ if (n->getBase()) printPrec(ident, n->getBase(), o, prec);
else o << "(NULL)";
if (n->exptype == CHILLAST_MEMBER_EXP_ARROW) o << "->";
else o << ".";
diff --git a/src/printer/dump.cpp b/src/printer/dump.cpp
index f3fe2e5..cd4c316 100644
--- a/src/printer/dump.cpp
+++ b/src/printer/dump.cpp
@@ -57,8 +57,8 @@ void Dump::printS(std::string ident, chillAST_ArraySubscriptExpr *n, std::ostrea
else
o << "lvalue ";
} else o << "rvalue ";
- print(ident, n->base, o);
- print(ident, n->index, o);
+ print(ident, n->getBase(), o);
+ print(ident, n->getIndex(), o);
}
void Dump::printS(std::string ident, chillAST_BinaryOperator *n, std::ostream &o) {
@@ -166,7 +166,7 @@ void Dump::printS(std::string ident, chillAST_Malloc *n, std::ostream &o) {
}
void Dump::printS(std::string ident, chillAST_MemberExpr *n, std::ostream &o) {
- print(ident, n->base, o);
+ print(ident, n->getBase(), o);
if (n->exptype == CHILLAST_MEMBER_EXP_ARROW) o << "-> ";
else o << ". ";
o << n->member << " ";