Skip to content

[bug] Lua 5.4 invalidates oddly crafted numbers #56

@tammela

Description

@tammela

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions