Lua 5.4 introduced a new parser for numbers.
In 5.3 and below code like below do run:
Lua 5.3.3 Copyright (C) 1994-2016 Lua.org, PUC-Rio
> x = 1.print(x)
1.0
The formatter correctly handles these odd numbers.
In 5.4 these are set to be invalid. Meaning that the parser will consume all tokens.
https://marc.info/?l=lua-l&m=156942228214223&w=2
The somewhat experimental support for 5.4 in LuaFormatter doesn't invalidate such numbers as it should.