Merge branch 'kkirka/ligo47-fix-incorrect-parsing' into 'tooling'

[LIGO-47] Fix incorrect parsing of lambdas and case clauses

See merge request serokell/ligo/ligo!19
This commit is contained in:
Kirill Kuvshinov 2020-09-15 08:35:45 +00:00
commit ee86539685
2 changed files with 4 additions and 6 deletions

View File

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

View File

@ -363,13 +363,11 @@ module.exports = grammar({
choice(
$._instruction,
$.clause_block,
$.block,
),
clause_block: $ =>
choice(
field("block", $.block),
seq('{', sepBy1(';', field("statement", $._statement)), '}')
),
seq('{', sepBy1(';', field("statement", $._statement)), '}'),
block: $ =>
choice(