convert_luau_number
unreleased
This rule transforms Luau-specific number literals into Lua compatible number literals. It converts binary literals (prefixed with 0b
or 0B
) to their hexadecimal equivalents. It also removes underscores used as digit separators in numbers.
Examples
print(0b1000_0001)
print(0x81)
return 0xA000_FFFF
return 0xA000FFFF
Input | Output |
---|---|
|
|
|
|