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:
commit
ee86539685
@ -229,7 +229,7 @@ module.exports = grammar({
|
|||||||
"fun",
|
"fun",
|
||||||
repeat1(field("arg", $._paren_pattern)),
|
repeat1(field("arg", $._paren_pattern)),
|
||||||
"->",
|
"->",
|
||||||
field("body", $._expr)
|
field("body", $._program)
|
||||||
),
|
),
|
||||||
|
|
||||||
list_expr: $ => seq(
|
list_expr: $ => seq(
|
||||||
|
@ -363,13 +363,11 @@ module.exports = grammar({
|
|||||||
choice(
|
choice(
|
||||||
$._instruction,
|
$._instruction,
|
||||||
$.clause_block,
|
$.clause_block,
|
||||||
|
$.block,
|
||||||
),
|
),
|
||||||
|
|
||||||
clause_block: $ =>
|
clause_block: $ =>
|
||||||
choice(
|
seq('{', sepBy1(';', field("statement", $._statement)), '}'),
|
||||||
field("block", $.block),
|
|
||||||
seq('{', sepBy1(';', field("statement", $._statement)), '}')
|
|
||||||
),
|
|
||||||
|
|
||||||
block: $ =>
|
block: $ =>
|
||||||
choice(
|
choice(
|
||||||
@ -822,4 +820,4 @@ module.exports = grammar({
|
|||||||
skip: $ => 'skip',
|
skip: $ => 'skip',
|
||||||
recursive: $ => 'recursive',
|
recursive: $ => 'recursive',
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user