xo-expression: refactor: Lambda/Primitive share FunctionInterface
This commit is contained in:
parent
0595c7c74e
commit
5c4b062cf8
6 changed files with 63 additions and 22 deletions
|
|
@ -49,7 +49,7 @@ namespace xo {
|
|||
TypeDescr lambda_type,
|
||||
const std::vector<rp<Variable>> & argv,
|
||||
const ref::rp<Expression> & body)
|
||||
: Expression(exprtype::lambda, lambda_type),
|
||||
: FunctionInterface(exprtype::lambda, lambda_type),
|
||||
name_{name},
|
||||
argv_{argv},
|
||||
body_{body}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ namespace xo {
|
|||
Variable::display(std::ostream & os) const {
|
||||
os << "<Variable"
|
||||
<< xtag("name", name_)
|
||||
<< xtag("type", this->valuetype()->short_name())
|
||||
<< ">";
|
||||
} /*display*/
|
||||
} /*namespace ast*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue