simplify func return type, complete eval and process logic
This commit is contained in:
parent
0adda0109c
commit
4712d5466c
3 changed files with 49 additions and 24 deletions
|
|
@ -20,7 +20,7 @@ mod func_tests {
|
|||
is_bool = true;
|
||||
}
|
||||
|
||||
new_ast(Ctr::Bool(is_bool), Ctr::None)
|
||||
Ctr::Bool(is_bool)
|
||||
}
|
||||
)
|
||||
};
|
||||
|
|
@ -42,8 +42,8 @@ mod func_tests {
|
|||
return;
|
||||
}
|
||||
|
||||
if let Ok(ast) = func_call(func, args, vt, ft) {
|
||||
match &ast.borrow().car {
|
||||
if let Ok(ret) = func_call(func, args, vt, ft) {
|
||||
match ret {
|
||||
Ctr::Bool(b) => assert!(b),
|
||||
_ => {
|
||||
print!("invalid return from func!");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue