xo-reader2 xo-expression2: define example working and printing
def foo : f64 = 3.141593;
This commit is contained in:
parent
c3907f45df
commit
855cdb08b7
9 changed files with 172 additions and 6 deletions
|
|
@ -79,11 +79,21 @@ namespace xo {
|
|||
auto rhs = FacetRegistry::instance().try_variant<APrintable,
|
||||
AExpression>(rhs_);
|
||||
|
||||
return ppii.pps()->pretty_struct
|
||||
(ppii,
|
||||
"DDefineExpr",
|
||||
refrtag("lhs", lhs),
|
||||
refrtag("rhs", cond(rhs_, rhs, "nullptr")));
|
||||
// note: xo::print::cond() doesn't resolve the way we want here
|
||||
|
||||
if (rhs) {
|
||||
return ppii.pps()->pretty_struct
|
||||
(ppii,
|
||||
"DDefineExpr",
|
||||
refrtag("lhs", lhs),
|
||||
refrtag("rhs", rhs));
|
||||
} else {
|
||||
return ppii.pps()->pretty_struct
|
||||
(ppii,
|
||||
"DDefineExpr",
|
||||
refrtag("lhs", lhs));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue