[LIGO-47] PascaLIGO: Move block
out of case_block
alternatives
Problem: In multisig.ligo:48, the case alternative block is interpreted as empty, while it is not. This happens because PascaLIGO parser expects to find `fields "statements"` inside a `case_block`. In practice, if a `case_block` contains a `block`, statements are deeper in the hierarchy, and get ignored. Solution: Move "block" option out of the "case_block" (to _if_clause).
This commit is contained in:
parent
04724a1db2
commit
c44a35d4d1
@ -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(
|
||||
@ -822,4 +820,4 @@ module.exports = grammar({
|
||||
skip: $ => 'skip',
|
||||
recursive: $ => 'recursive',
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user