Commit 09d15d15 authored by Philip Makedonski's avatar Philip Makedonski
Browse files

+ grammar adjustments for annotation identifiers

parent ead39793
Loading
Loading
Loading
Loading
+12 −10
Original line number Diff line number Diff line
@@ -95,21 +95,13 @@ Comment returns tdl::Comment:
;

Annotation returns tdl::Annotation:
    '@' key=[tdl::AnnotationType|Identifier]
    '@' key=[tdl::AnnotationType|AIdentifier]
    (':' value=EString)?
;

AnnotationType returns tdl::AnnotationType:
    AnnotationCommentFragment
    'Annotation' name = (
        Identifier 
        | InitialBlockName 
        | ExpectedBlockName 
        | FinalBlockName 
        | TestPurposeDescriptionName
        | When
        | Then
    )
    'Annotation' name = AIdentifier
    ('extends' extension=Extension)?
;

@@ -1038,6 +1030,16 @@ Identifier:
    | 'name' | 'type' //TODO: exclude other keywords to the extent possible?
;

AIdentifier:    
    Identifier 
    | InitialBlockName 
    | ExpectedBlockName 
    | FinalBlockName 
    | TestPurposeDescriptionName
    | When
    | Then    
;

GRIdentifier:
    ID ('::' ID)?
;