Skip to content

Commit

Permalink
bug fixed: param missing error
Browse files Browse the repository at this point in the history
  • Loading branch information
BHznJNs committed Mar 11, 2023
1 parent bd75dc1 commit ac259be
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/computer/compute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ fn expression_compute(
Some(func) => {
// build-in function
if let Some(params) = &node.params {
if params.len() == 0 {
println!("Parameter for function '{}' is missing.", name);
return Err(())
}

let expression_node = ASTNode {
type__: ASTNodeTypes::Expression,
params: Some(params.to_vec()),
Expand Down

0 comments on commit ac259be

Please sign in to comment.