.g4 fixes

This commit is contained in:
ProgramSnail 2023-08-14 11:19:08 +03:00
parent 9c0565f876
commit 1f3a477948

View file

@ -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) ;