xo-expression: + if-expressions

This commit is contained in:
Roland Conybeare 2024-06-17 12:26:24 -04:00
commit 012597b112
4 changed files with 91 additions and 1 deletions

20
src/expression/IfExpr.cpp Normal file
View file

@ -0,0 +1,20 @@
/* @file IfExpr.cpp */
#include "IfExpr.hpp"
#include "xo/indentlog/print/vector.hpp"
namespace xo {
namespace ast {
void
IfExpr::display(std::ostream & os) const {
os << "<IfExpr"
<< xtag("test", test_)
<< xtag("when_true", when_true_)
<< xtag("when_false", when_false_)
<< ">";
} /*display*/
} /*namespace ast*/
} /*namespace xo*/
/* end IfExpr.cpp */