The MLscript programming language. Functional and object-oriented; structurally typed and sound; with powerful type inference. Soon to have full interop with TypeScript!
Decimal numeric literals in floating-point style: 1e100, 3.141592653589793, etc.
Support separators to be interleaved in all digits: 0x0010_1101, 12_34.56_78E+9_0, etc.
Lastly, the support for string escapes \\, \b, and \f. (I forgot this so it's not indicated by my commit messages. 🤦♂️)
[!NOTE]
This PR does not support numeric literals starting with decimal points, for example, .5, because it conflicts with selecting tuple indices. We can check the accumulated tokens to determine the meaning of tokens such as .1, but I don't have time to summarize various situations and add tests right now, so I will leave it for future work.
This PR adds the support for various literals.
0xCAFE
, etc.0o4567
, etc.0b0010
, etc.1e100
,3.141592653589793
, etc.0x0010_1101
,12_34.56_78E+9_0
, etc.\\
,\b
, and\f
. (I forgot this so it's not indicated by my commit messages. 🤦♂️)