When the Lua parser reads 9999999999999999999, it overflows and results in -8446744073709551616. In contrast, all the versions of Lua I tested will parse it into a floating-point number.
Also, when the Lua parser reads 0xffffffffffffffff, it overflows and results in -1. This does not happen in Lua 5.2. The Lua 5.3/5.4 reference manual (see section 3.1) specifies this to be the correct behavior for hexadecimal integers, but since Cobalt doesn't have the Lua 5.3 integer subtype I don't think it should do this either.
I haven't tested it yet, but this could probably be fixed by something like:
When the Lua parser reads
9999999999999999999
, it overflows and results in-8446744073709551616
. In contrast, all the versions of Lua I tested will parse it into a floating-point number.Also, when the Lua parser reads
0xffffffffffffffff
, it overflows and results in-1
. This does not happen in Lua 5.2. The Lua 5.3/5.4 reference manual (see section 3.1) specifies this to be the correct behavior for hexadecimal integers, but since Cobalt doesn't have the Lua 5.3 integer subtype I don't think it should do this either. I haven't tested it yet, but this could probably be fixed by something like:in NumberParser::scanLong.