Open jclark opened 3 years ago
They can be parsed with float:fromHexString.
@jclark float:fromHexString
is giving me the following error
error: {ballerina}TypeCastError {"message":"incompatible types: 'handle' cannot be cast to '(float|error)'"} at ballerina.lang.float.1_0_0:fromHexString(float.bal:367)
@ushirask please create an issue in ballerina-lang repo with a minimal test case.
@ushirask please create an issue in ballerina-lang repo with a minimal test case.
created in https://github.com/ballerina-platform/ballerina-lang/issues/32220#issue-973862104
Your test case is not a valid https://ballerina.io/spec/lang/2021R1/#HexFloatingPointLiteral
Do you get an error when you pass valid literals?
When parsing the literal, don't allow a trailing .
(i.e. the token cannot have a .
without a following hex digit). This is for consistency with the change we made to decimal literals.
These are documented here:
https://ballerina.io/spec/lang/2021R1/#HexFloatingPointLiteral
They can be parsed with float:fromHexString.