Floating point numbers Follow macks Created April 23, 2015 07:27 There is a native integer type in MPS. Is there also a Double or a Float type? I couldn't find one.Thanks in advance!Regardsmschalk
I added the jetbrains.mps.lang.structure + jetbrains.mps.baseLanguage to my own language.
However I can't define the mentioned Types from above for my property in structure definition.
Finally it's working!
This will actually provide you with a string representing a (floating point) number, which can then be parsed through Double.parseDouble and related functions.
Is it possible to add Java behavior to these constrained string representations, so that we can avoid the boilerplate Double.parseDouble (and e.g. provide a default null when a NumberFormatError is thrown)