Commit d045c4eb authored by Philip Makedonski's avatar Philip Makedonski
Browse files

* data element use refinements

parent d64dc4f1
Loading
Loading
Loading
Loading
Loading
+19 −4
Original line number Diff line number Diff line
@@ -551,7 +551,7 @@ DataElementUse returns tdl::DataElementUse:
        ParameterBindingFragment?
        ReductionFragment
        CheckFragment?
    ) | (
    ) | ( //TODO: split off as separate rule?
        //type / anonymous (simplified, avoid duplication, otherwise remove "?")
        //DONE: empty parameters / collections? -> added
        //DONE: support simple data types as well? -> use any value instead
@@ -561,9 +561,14 @@ DataElementUse returns tdl::DataElementUse:
        	//DONE: do we really need different ways? -> not for now!
        	//name=('new' | 'a' | 'an' | 'the')
        	//TODO: is this still used?
        	'new' dataElement=[tdl::DataType|Identifier]? //TODO: keep optional?
        )
        	//TODO: this is clashing with the above during serialisation
//        	NewElementFragment -> needed for serialisation
//        	'<' dataElement=[tdl::DataType|Identifier] '>'
        	'new' dataElement=[tdl::DataType|Identifier]? //TODO: keep optional? -> too confusing?
        )?
        UnassignedFragmentNamedElement?
        //ParameterBinding is clashing with predefined function binary
        //due to ParameterReductionFragment.. -> custom syntax? 
        (ParameterBindingFragment | CollectionItemFragment) 
        CheckFragment?
    )
@@ -577,6 +582,16 @@ fragment CollectionItemFragment returns tdl::DataElementUse:
    '[' (item+=DataUse (',' item+=DataUse)*)? ']'
;

fragment NewElementFragment returns tdl::DataElementUse:
    comment+=NewElementComment
;

NewElementComment returns tdl::Comment:
	body='new'
;



//# Time

Time returns tdl::Time: