Closed divarvel closed 4 months ago
Comparing closures
(6fe9bfd) with v5
(3e3f071)
✅ 12
untouched benchmarks
Attention: Patch coverage is 88.65546%
with 27 lines
in your changes are missing coverage. Please review.
Project coverage is 68.57%. Comparing base (
3e3f071
) to head (6fe9bfd
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
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()
[x] prevent shadowing in closure arguments
[x] print
And
andOr
with&&!
and||!
, without parsing them.[x] v5 block detection depends on #220