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 ('?' | '!') ;