Custom number type #35
Labels
code-generation
Involves generation of parser / serializer code
enhancement
Enhancement of existing feature
Projects
Add the possibility to define custom number types (integer or real), e.g. a dynamic-sized "big integer" type. The parser API could look like this:
clear
- sets$S
to zeroappendDigit
- appends (decimal) digit$X
to the whole part ot$S
- equivalent to10*$S+$X
, $E isVALUE_OUT_OF_RANGE
error statementappendFractionalDigit
- appends$I
-th (decimal) fractional digit$X
to$S
, if left blank, the type is assumed to be integer-onlysetExponent
- multiplies$S
by 10 to the power of$X
makeNegative
- changes the value to negative, guaranteed to be called at the endOr, instead of the last two, there could be
finalize
with arguments for sign and exponent.The text was updated successfully, but these errors were encountered: