typle access expression added

This commit is contained in:
ProgramSnail 2023-07-18 11:39:18 +03:00
parent 209ef22e0f
commit e0ef917f51
2 changed files with 3 additions and 6 deletions

View file

@ -87,7 +87,7 @@ name_expression:
constructor: type (ANNOTATION_IDENTIFIER)? scoped_expression)+ ;
lambda: '\\' ((ANNOTATION_IDENTIFIER)? ARGUMENT_NAME_IDENTIFIER)+ '->' expression ;
lambda: '\\' (ARGUMENT_NAME_IDENTIFIER)* '->' expression ;
super_expression: match
| condition

View file

@ -113,7 +113,7 @@ module.exports = grammar({
field('expression', $._expression),
),
// --- operator
// --- operators
comma_expression: $ => prec.left(seq($._super_expression, ',', $._super_expression)),
@ -168,10 +168,7 @@ module.exports = grammar({
lambda: $ => seq(
'\\',
repeat1(seq(
optional($.annotation_identifier),
$.argument_name_identifier,
)),
repeat($.argument_name_identifier),
'->',
$._expression,
),