simplify func return type, complete eval and process logic

This commit is contained in:
Aidan 2021-06-05 01:14:38 -07:00
parent 0adda0109c
commit 4712d5466c
No known key found for this signature in database
GPG key ID: 327711E983899316
3 changed files with 49 additions and 24 deletions

View file

@ -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!");