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

View file

@ -6,7 +6,7 @@ set(SELF_SRCS
Apply.cpp
Lambda.cpp
Variable.cpp
#init_reflect.cpp
IfExpr.cpp
)
xo_add_shared_library4(${SELF_LIB} ${PROJECT_NAME}Targets ${PROJECT_VERSION} 1 ${SELF_SRCS})

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 */