xo-expression: + Variable + apply/lambda fixes
This commit is contained in:
parent
20b23b50fc
commit
9d2b0f17f8
7 changed files with 90 additions and 3 deletions
|
|
@ -5,6 +5,7 @@ set(SELF_SRCS
|
|||
Expression.cpp
|
||||
Apply.cpp
|
||||
Lambda.cpp
|
||||
Variable.cpp
|
||||
#init_reflect.cpp
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ namespace xo {
|
|||
void
|
||||
Lambda::display(std::ostream & os) const {
|
||||
os << "<Lambda"
|
||||
<< xtag("name", name_)
|
||||
<< xtag("argv", argv_)
|
||||
<< xtag("body", body_)
|
||||
<< ">";
|
||||
|
|
|
|||
17
src/expression/Variable.cpp
Normal file
17
src/expression/Variable.cpp
Normal 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 */
|
||||
Loading…
Add table
Add a link
Reference in a new issue