Internals: Refactor some VAssign printing. No functional change.

This commit is contained in:
Wilson Snyder
2020-11-01 16:59:23 -05:00
parent 2aedc91151
commit 80284c437e
6 changed files with 12 additions and 16 deletions
+4 -12
View File
@@ -1453,12 +1453,8 @@ void AstVarScope::dump(std::ostream& str) const {
void AstNodeVarRef::dump(std::ostream& str) const { this->AstNodeMath::dump(str); }
void AstVarXRef::dump(std::ostream& str) const {
this->AstNodeVarRef::dump(str);
if (packagep()) { str << " pkg=" << nodeAddr(packagep()); }
if (access().isWrite()) {
str << " [LV] => ";
} else {
str << " [RV] <- ";
}
if (packagep()) str << " pkg=" << nodeAddr(packagep());
str << " " << access().arrow() << " ";
str << ".=" << dotted() << " ";
if (inlinedDots() != "") str << " inline.=" << inlinedDots() << " - ";
if (varScopep()) {
@@ -1471,12 +1467,8 @@ void AstVarXRef::dump(std::ostream& str) const {
}
void AstVarRef::dump(std::ostream& str) const {
this->AstNodeVarRef::dump(str);
if (packagep()) { str << " pkg=" << nodeAddr(packagep()); }
if (access().isWrite()) {
str << " [LV] => ";
} else {
str << " [RV] <- ";
}
if (packagep()) str << " pkg=" << nodeAddr(packagep());
str << " " << access().arrow() << " ";
if (varScopep()) {
varScopep()->dump(str);
} else if (varp()) {