From 6b093311dfb371cf67a218a8c97779ae5e15e234 Mon Sep 17 00:00:00 2001 From: ProgramSnail Date: Sun, 13 Aug 2023 12:59:19 +0300 Subject: [PATCH] grammar.g4 fixes --- grammar.g4 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/grammar.g4 b/grammar.g4 index c1e7826..187281e 100644 --- a/grammar.g4 +++ b/grammar.g4 @@ -3,8 +3,6 @@ grammar lang ; // not always most recent grammar // not checked -// TODO - source_file: (statement)+ EOF ; statement: import @@ -27,7 +25,7 @@ function_definition: (definietion_info)? (ANNOTATION_INFO)* (constraint ';')* (('=' ( /*prec 2*/ block | (super_expression ';'))) | ';') ; -type_definition: (DEFINITION_INFO)? (ANNOTATION_INFO)* ('^')? +type_definition: (DEFINITION_INFO)? (ANNOTATION_INFO)* (REFERENCE)? (SIMPLE_TYPE_IDENTIFIER | TYPECLASS_IDENTIFIER) ('[' (TYPECLASS_IDENTIFIER)+ ']')? (ARGUMENT_TYPE_IDENTIFIER)* @@ -131,7 +129,7 @@ annotated_type: (ANNOTATION_IDENTIFIER)? scoped_type ; array_type: '[[' type ']]' ; -reference_type: /* prec -1 */ '^' scoped_type ; +reference_type: /* prec -1 */ REFERENCE scoped_type ; modified_type: scoped_type ('?' | '!') ;