sergiotaborda / lense-lang

The Lense Language Compiler
1 stars 0 forks source link

Parse binary literals to BitArray #22

Closed sergiotaborda closed 8 years ago

sergiotaborda commented 8 years ago

Allow for binary literal in the form $0011_00111101 where is an optional separator. Make the compiler parse this to an instance of BitArray.

Binary flags = $0_0_1_1;

should compile to

Binary flags = BitArray.valueOf(false, false, true , true );

sergiotaborda commented 8 years ago

This feature is already implemented but the bit code is interpreted as a number and passed as a number to BitArray. This should be revised has the number can be quite large.