Lexer recognizes hex integer as float
toxamin opened this issue · 1 comments
Describe the bug
Lua 5.1 syntax preset incorrectly specifies acceptHexFloatLiterals as false.
To Reproduce
Have this code:
print(0X049bbe662)
Try parsing with Loretta and the Lua 5.1 syntax preset.
Encounter LUA0010: Hexadecimal floating point numeric literals are not supported in this lua version diagnostic.
Expected behavior
There is no diagnostic, since this is a valid Lua 5.1 file.
Additional context
Loretta Version: 0.2.12-nightly.24
Add any other context about the problem here.
Correction on this, the issue is that the lexer is incorrectly recognizing 0X049bbe662
as a hex float when it shouldn't.
Lua 5.1 does not support hex floats so this will not be changed on the preset, but I'll be fixing the lexer.