Clean up
This commit is contained in:
parent
48f3ccdd58
commit
1794f7559c
@ -214,8 +214,8 @@ impl AbstractNode for Logic {
|
|||||||
|
|
||||||
left_boolean || right_boolean
|
left_boolean || right_boolean
|
||||||
}
|
}
|
||||||
Logic::Not(statement) => {
|
Logic::Not(expression) => {
|
||||||
let boolean = run_and_expect_boolean(statement)?;
|
let boolean = run_and_expect_boolean(expression)?;
|
||||||
|
|
||||||
!boolean
|
!boolean
|
||||||
}
|
}
|
||||||
|
@ -820,6 +820,8 @@ impl Function {
|
|||||||
|
|
||||||
debug!("Calling function");
|
debug!("Calling function");
|
||||||
|
|
||||||
|
self.body
|
||||||
|
.define_and_validate(&self.context, false, SourcePosition(0, usize::MAX))?;
|
||||||
self.body
|
self.body
|
||||||
.evaluate(&self.context, false, SourcePosition(0, usize::MAX))
|
.evaluate(&self.context, false, SourcePosition(0, usize::MAX))
|
||||||
}
|
}
|
||||||
|
@ -105,7 +105,7 @@ fn recursion() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fib(4)
|
fib(8)
|
||||||
"
|
"
|
||||||
),
|
),
|
||||||
Ok(Some(Value::integer(13)))
|
Ok(Some(Value::integer(13)))
|
||||||
|
Loading…
Reference in New Issue
Block a user