Usage for Primitive Data Type Declaration
I'm working my way through learning MPS and am perplexed by the ability to create new Primitive Data Type Declarations in the structural aspect.
Can someone explain the benefit of these nodes? I see that I can make my new primitive the value type of an enum, but really don't understand where to go from there?
Where can I define the valid value options for my primitive? For example, for boolean, this would be {true, false}.
I've searched the documentation, but don't even see this structure mentioned in the user guide. Is it deprecated?
Thanks!
Can someone explain the benefit of these nodes? I see that I can make my new primitive the value type of an enum, but really don't understand where to go from there?
Where can I define the valid value options for my primitive? For example, for boolean, this would be {true, false}.
I've searched the documentation, but don't even see this structure mentioned in the user guide. Is it deprecated?
Thanks!
Please sign in to leave a comment.
According to @fabiencampagne 's book
You can restrict your type in the property constraints section and in the editor limit user input.
What's the real (huge) benefit is also in my interest.
Regards,
msch95