A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/JohnnyMorganz/StyLua/issues/407 below:

Lua 5.2 label syntax error when using binary built all features enabled · Issue #407 · JohnnyMorganz/StyLua · GitHub

I was experimenting with using StyLua on minified Lua, and found that StyLua fails to parse this valid Lua when minified.

source:

local function test()
    goto end_thing

    local x = 1

    ::end_thing::
end

-> minified:

local function a()goto b;local c=1::b::end

with error:

error: could not format file minified.lua: error parsing: unexpected token `end`. (starting from line 1, character 40 
and ending on line 1, character 43)
additional information: expected identifier after `::`

If I add a semicolon after local c = 1 in the minified Lua then it parses as expected.

Julian, Frederick888, haolian9 and RW21


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4