mirror of
https://codeberg.org/ProgramSnail/tree-sitter-lang.git
synced 2025-12-06 14:48:48 +00:00
.g4 fixes
This commit is contained in:
parent
9c0565f876
commit
1f3a477948
1 changed files with 4 additions and 0 deletions
|
|
@ -125,6 +125,8 @@ variant_type: ('|')? annotated_type ('|' annotated_type)+ ;
|
||||||
|
|
||||||
tuple_type: ('&')? annotated_type ('&' _annotated_type)+ ;
|
tuple_type: ('&')? annotated_type ('&' _annotated_type)+ ;
|
||||||
|
|
||||||
|
function_type: '((' (_annotated_type)+ '))';
|
||||||
|
|
||||||
annotated_type: (ANNOTATION_IDENTIFIER)? scoped_type ;
|
annotated_type: (ANNOTATION_IDENTIFIER)? scoped_type ;
|
||||||
|
|
||||||
array_type: '[[' type ']]' ;
|
array_type: '[[' type ']]' ;
|
||||||
|
|
@ -141,6 +143,7 @@ type: simple_type
|
||||||
| array_type
|
| array_type
|
||||||
| variant_type
|
| variant_type
|
||||||
| tuple_type
|
| tuple_type
|
||||||
|
| function_type
|
||||||
;
|
;
|
||||||
|
|
||||||
scoped_type: simple_type
|
scoped_type: simple_type
|
||||||
|
|
@ -148,6 +151,7 @@ scoped_type: simple_type
|
||||||
| modified_type
|
| modified_type
|
||||||
| array_type
|
| array_type
|
||||||
| '(' (variant_type | tuple_type) ')'
|
| '(' (variant_type | tuple_type) ')'
|
||||||
|
| function_type
|
||||||
;
|
;
|
||||||
|
|
||||||
name_identifier: (ARGUMENT_NAME_IDENTIFIER | SIMPLE_NAME_IDENTIFIER) ;
|
name_identifier: (ARGUMENT_NAME_IDENTIFIER | SIMPLE_NAME_IDENTIFIER) ;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue