mirror of
https://codeberg.org/ProgramSnail/tree-sitter-lang.git
synced 2025-12-06 14:48:48 +00:00
access -> array_access
This commit is contained in:
parent
f525fce6d7
commit
3b4be40ef7
4 changed files with 14 additions and 14 deletions
|
|
@ -84,7 +84,7 @@ test_k 'n 'k : Int Int -> Bool = {
|
|||
(number_literal))
|
||||
(name_expression
|
||||
(reference
|
||||
(access
|
||||
(array_access
|
||||
(simple_name_identifier)
|
||||
(number_literal)))
|
||||
(simple_name_identifier))
|
||||
|
|
|
|||
|
|
@ -671,12 +671,12 @@ arg_deduction_example 'name 'duration : <- String <- Float -> Task = Task 'name
|
|||
(comma_expression
|
||||
(condition
|
||||
(operator_expression
|
||||
(access
|
||||
(array_access
|
||||
(argument_name_identifier)
|
||||
(name_expression
|
||||
(simple_name_identifier)))
|
||||
(operator)
|
||||
(access
|
||||
(array_access
|
||||
(argument_name_identifier)
|
||||
(operator_expression
|
||||
(name_expression
|
||||
|
|
@ -685,11 +685,11 @@ arg_deduction_example 'name 'duration : <- String <- Float -> Task = Task 'name
|
|||
(number_literal))))
|
||||
(name_expression
|
||||
(simple_name_identifier)
|
||||
(access
|
||||
(array_access
|
||||
(argument_name_identifier)
|
||||
(name_expression
|
||||
(simple_name_identifier)))
|
||||
(access
|
||||
(array_access
|
||||
(argument_name_identifier)
|
||||
(operator_expression
|
||||
(name_expression
|
||||
|
|
@ -736,12 +736,12 @@ arg_deduction_example 'name 'duration : <- String <- Float -> Task = Task 'name
|
|||
(comma_expression
|
||||
(condition
|
||||
(operator_expression
|
||||
(access
|
||||
(array_access
|
||||
(argument_name_identifier)
|
||||
(name_expression
|
||||
(simple_name_identifier)))
|
||||
(operator)
|
||||
(access
|
||||
(array_access
|
||||
(argument_name_identifier)
|
||||
(operator_expression
|
||||
(name_expression
|
||||
|
|
@ -750,11 +750,11 @@ arg_deduction_example 'name 'duration : <- String <- Float -> Task = Task 'name
|
|||
(number_literal))))
|
||||
(name_expression
|
||||
(simple_name_identifier)
|
||||
(access
|
||||
(array_access
|
||||
(argument_name_identifier)
|
||||
(name_expression
|
||||
(simple_name_identifier)))
|
||||
(access
|
||||
(array_access
|
||||
(argument_name_identifier)
|
||||
(operator_expression
|
||||
(name_expression
|
||||
|
|
@ -893,7 +893,7 @@ arg_deduction_example 'name 'duration : <- String <- Float -> Task = Task 'name
|
|||
(simple_name_identifier))
|
||||
(case
|
||||
(reference
|
||||
(access
|
||||
(array_access
|
||||
(simple_name_identifier)
|
||||
(number_literal)))))))
|
||||
(function_definition
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ array: '[[' (scoped_expression)+ ']]' ;
|
|||
|
||||
name_definition: (('%' | 'let') | ('$' | 'var')) (SIMPLE_NAME_IDENTIFIER | PLACEHOLDER) ;
|
||||
|
||||
access: scoped_expression '[' super_expression ']' ;
|
||||
array_access: scoped_expression '[' super_expression ']' ;
|
||||
|
||||
tuple_access: scoped_expression, '.' NUMBER_LITERAL
|
||||
|
||||
|
|
@ -113,7 +113,7 @@ not_name_scoped_expression: block
|
|||
| array
|
||||
| PLACEHOLDER
|
||||
| name_definition
|
||||
| access
|
||||
| array_access
|
||||
| tuple_access
|
||||
| loop_control
|
||||
| reference
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ module.exports = grammar({
|
|||
choice($.simple_name_identifier, $.placeholder),
|
||||
),
|
||||
|
||||
access: $ => seq($._scoped_expression, '[', $._super_expression, ']'),
|
||||
array_access: $ => seq($._scoped_expression, '[', $._super_expression, ']'),
|
||||
|
||||
tuple_access: $ => seq($._scoped_expression, '.', $.number_literal),
|
||||
|
||||
|
|
@ -202,7 +202,7 @@ module.exports = grammar({
|
|||
$.array,
|
||||
$.placeholder,
|
||||
$.name_definition,
|
||||
$.access,
|
||||
$.array_access,
|
||||
$.tuple_access,
|
||||
$.loop_control,
|
||||
$.reference,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue