xo-expression: minor print logging fixes

This commit is contained in:
Roland Conybeare 2024-08-28 00:57:17 -04:00
commit 24d9d504b5
2 changed files with 13 additions and 7 deletions

View file

@ -66,10 +66,13 @@ namespace xo {
}
virtual void display(std::ostream & os) const override {
os << "<Constant"
<< xtag("type", value_td_->short_name())
<< xtag("value", value_)
<< ">";
os << "<Constant";
if (value_td_)
os << xtag("type", value_td_->short_name());
else
os << xtag("type", "nullptr");;
os << xtag("value", value_);
os << ">";
}
private: