Skip to content

[BUG] Parsing error when there is no leading 0 before the decimal point #39

@zebranine

Description

@zebranine

Thanks for all your hard work on this, very promising.

Unfortunately I see a parsing error when there is no leading 0 before the decimal point, so:

local val = .5

results in output:

←[0m←[31mPROMETHEUS: Parsing Error at Position 1:12, Unexpected Token ".". Expected a Expression!←[0m

whereas this generates without issue:

local val = 0.5

I have seen a similar situation in other minifiers/obfuscators where the absence of a number after the decimal point prevents generation (not the case here).

  • Lua version: lua-5.1.5 Win64
  • Command line: lua5.1.exe cli.lua --preset Medium test.lua
  • Tested with various presets

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions