Constrained data type?

Could you suggest how to define a Constrained data type, please? I'm trying to define a type which is an integer limited to 1-16 range..

0
1 comment
Avatar
Permanently deleted user

Igor Karpov wrote:

Could you suggest how to define a Constrained data type, please? I'm trying to define a type which is an integer limited to 1-16 range..

You can create ConstrainedDataType concept. You can constraint string

representation for some datatype by specifying regexp. Look at concept

FPNumberString in jetbrains.mps.baseLanguage.structure model (you can

find it if you expand jetbrains.mps.baseLanguage node in Languages node

in project tree).

0

Please sign in to leave a comment.