Add method to convert NumberLiteral
type and/or stringify without type suffix
#10462
Labels
NumberLiteral
type and/or stringify without type suffix
#10462
Stringifying a
NumberLiteral
always adds a the type suffix unless the type isInt32
(which is the default).It seems there is currently no way to remove that type suffix, for example for cleanly stringifying the value (see #10460).
A good solution is probably adding
NumberLiteral#to_i
to converts to an Int32 literal which is without type suffix. This can than be used to stringify or construct other number literals.The text was updated successfully, but these errors were encountered: