mirror of
https://codeberg.org/ProgramSnail/tree-sitter-lang.git
synced 2025-12-07 15:18:56 +00:00
typle access expression added
This commit is contained in:
parent
209ef22e0f
commit
e0ef917f51
2 changed files with 3 additions and 6 deletions
|
|
@ -87,7 +87,7 @@ name_expression:
|
||||||
|
|
||||||
constructor: type (ANNOTATION_IDENTIFIER)? scoped_expression)+ ;
|
constructor: type (ANNOTATION_IDENTIFIER)? scoped_expression)+ ;
|
||||||
|
|
||||||
lambda: '\\' ((ANNOTATION_IDENTIFIER)? ARGUMENT_NAME_IDENTIFIER)+ '->' expression ;
|
lambda: '\\' (ARGUMENT_NAME_IDENTIFIER)* '->' expression ;
|
||||||
|
|
||||||
super_expression: match
|
super_expression: match
|
||||||
| condition
|
| condition
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ module.exports = grammar({
|
||||||
field('expression', $._expression),
|
field('expression', $._expression),
|
||||||
),
|
),
|
||||||
|
|
||||||
// --- operator
|
// --- operators
|
||||||
|
|
||||||
comma_expression: $ => prec.left(seq($._super_expression, ',', $._super_expression)),
|
comma_expression: $ => prec.left(seq($._super_expression, ',', $._super_expression)),
|
||||||
|
|
||||||
|
|
@ -168,10 +168,7 @@ module.exports = grammar({
|
||||||
|
|
||||||
lambda: $ => seq(
|
lambda: $ => seq(
|
||||||
'\\',
|
'\\',
|
||||||
repeat1(seq(
|
repeat($.argument_name_identifier),
|
||||||
optional($.annotation_identifier),
|
|
||||||
$.argument_name_identifier,
|
|
||||||
)),
|
|
||||||
'->',
|
'->',
|
||||||
$._expression,
|
$._expression,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue