block moved to scoped_expression

This commit is contained in:
ProgramSnail 2023-07-18 14:37:16 +03:00
parent 7f53a21f20
commit f525fce6d7
2 changed files with 8 additions and 7 deletions

View file

@ -64,7 +64,7 @@ module.exports = grammar({
optional(choice(choice('->', 'out'), choice('<-', 'in'), choice('<>', 'ref'))),
$.type,
)))),
choice(seq('=', choice(seq($._super_expression, ';'), $.block)), ';'),
choice(seq('=', choice(prec(2, $.block), seq($._super_expression, ';'))), ';'),
),
typeclass_definition: $ => seq(
@ -185,7 +185,6 @@ module.exports = grammar({
_expression: $ => choice(
$.operator_expression,
$.block,
$.return,
$.name_expression,
$.constructor,
@ -199,6 +198,7 @@ module.exports = grammar({
),
_not_name_scoped_expression: $ => choice(
$.block,
$.array,
$.placeholder,
$.name_definition,