xo-reader2: bugfix in DDefineExpr
This commit is contained in:
parent
516b0932ee
commit
a0d021abfc
2 changed files with 6 additions and 2 deletions
|
|
@ -24,9 +24,13 @@ namespace xo {
|
|||
void * mem = mm.alloc(typeseq::id<DDefineExpr>(),
|
||||
sizeof(DDefineExpr));
|
||||
|
||||
TypeRef rhs_tref;
|
||||
if (rhs_expr)
|
||||
rhs_tref = rhs_expr.typeref();
|
||||
|
||||
auto lhs_var = DVariable::make(mm,
|
||||
lhs_name,
|
||||
rhs_expr.typeref());
|
||||
rhs_tref);
|
||||
|
||||
return new (mem) DDefineExpr(lhs_var, rhs_expr);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ namespace xo {
|
|||
auto & result = parser.on_token(Token::symbol_token("foo"));
|
||||
|
||||
REQUIRE(parser.has_incomplete_expr() == true);
|
||||
REQUIRE(result.is_error());
|
||||
REQUIRE(result.is_incomplete());
|
||||
}
|
||||
|
||||
// define-expressions not properly implemented
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue