azreika / lambdul

Lambda calculus interpreter written in Java
8 stars 2 forks source link

Fix for the scoping of the body of a lambda abstraction, and support empty lines #4

Closed davidwzhao closed 5 years ago

davidwzhao commented 6 years ago

The body of a lambda abstraction without brackets should be as follows: \x.x x -> \x.(x x)

Previous behaviour was: \x.x x -> (\x.x) x

The body of a lambda abstraction is now parsed as a sequence of expressions rather than just a single expression.

Additionally, empty lines are now supported with the AstEmpty node.