biscuit-rust
biscuit-rust copied to clipboard
Support for closures
The goal of this branch is to explore how to add support for closures in the stack machine
-
closures are represented as a list of ops and a list of parameter names
-
closure parameters can be used like variables
-
variable names must be unique, so shadowing is forbidden
-
boolean operators use laziness and push the rhs closure on the ops list only if needed (without recursion)
-
.any()and.all()use recursion to compute results -
[x] closure support in
datalog::expression::Op -
[x] closure support in
format::schema -
[x] closure support in
parser -
[x] closures for lazy boolean operators
-
[x] closures for
.any()and.all() -
[ ] prevent shadowing in closure arguments (parser, deserialization, execution?)