antimony-lang/antimony

Support for non-standard number system notations

garritfra opened this issue · 0 comments

Binary, Hex and Octal systems should be supported using the following notation:

binary_lit     = "0" ( "b" | "B" ) binary_digits .
octal_lit      = "0" [ "o" | "O" ] octal_digits .
hex_lit        = "0" ( "x" | "X" ) hex_digits .

Examples

5 == 5
5 == 0x5
5 == 0X5
5 == 0o5
5 == 0b101

Golang specifcation can be used as a reference.