xo-expression: + Variable + apply/lambda fixes

This commit is contained in:
Roland Conybeare 2024-06-13 17:59:51 -04:00
commit 9d2b0f17f8
7 changed files with 90 additions and 3 deletions

View file

@ -5,6 +5,7 @@ set(SELF_SRCS
Expression.cpp
Apply.cpp
Lambda.cpp
Variable.cpp
#init_reflect.cpp
)

View file

@ -8,6 +8,7 @@ namespace xo {
void
Lambda::display(std::ostream & os) const {
os << "<Lambda"
<< xtag("name", name_)
<< xtag("argv", argv_)
<< xtag("body", body_)
<< ">";

View file

@ -0,0 +1,17 @@
/* @file Variable.cpp */
#include "Variable.hpp"
namespace xo {
namespace ast {
void
Variable::display(std::ostream & os) const {
os << "<Variable"
<< xtag("name", name_)
<< ">";
} /*display*/
} /*namespace ast*/
} /*namespace xo*/
/* end Variable.cpp */