[LIGO-47] Allow let .. in in lambda body

Problem: In multisig.mligo, else clause on line 36 ends on line 55,
while it should end on line 80. This happens because of incorrect
lambda parsing on lines 42-43. In particular, `let valid, keys = vk`
in lambda body gets parsed as a
`tuple (fun_app "let" "valid") (binary_op "=" "keys" "vk")`, and `in`
is considered as a part of the outer `let`.

Solution: Allow `_program` instead of `_expr` as the lambda body.
This commit is contained in:
Kirill Kuvshinov 2020-09-15 11:22:15 +03:00
parent 7f6820c368
commit 04724a1db2
No known key found for this signature in database
GPG Key ID: 3705CDC3F29E4DAF

View File

@ -229,7 +229,7 @@ module.exports = grammar({
"fun",
repeat1(field("arg", $._paren_pattern)),
"->",
field("body", $._expr)
field("body", $._program)
),
list_expr: $ => seq(