Skip to content

Commit 3c2647c

Browse files
committed
More tiny cleanups.
1 parent 2c44d9b commit 3c2647c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dumbParser.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -427,12 +427,12 @@ local PARSER_VERSION = "2.1.0-dev"
427427
local NORMALIZE_MINUS_ZERO, HANDLE_ENV
428428
do
429429
local n = 0
430-
NORMALIZE_MINUS_ZERO = tostring(-n) == "0"
430+
NORMALIZE_MINUS_ZERO = tostring(-n) == "0" -- Lua 5.3+ normalizes -0 to 0.
431431
end
432432
do
433433
local pcall = pcall
434434
local _ENV = nil
435-
HANDLE_ENV = not pcall(function() local x = _G end)
435+
HANDLE_ENV = not pcall(function() return _G end) -- Looking up the global _G will raise an error if _ENV is supported (Lua 5.2+).
436436
end
437437

438438
local assert = assert
@@ -4797,10 +4797,10 @@ do
47974797
end
47984798

47994799
-- stats = minify( node [, optimize=false ] )
4800-
local function minify(node, optimize)
4800+
local function minify(node, doOptimize)
48014801
local stats = Stats()
48024802

4803-
if optimize then
4803+
if doOptimize then
48044804
_optimize(node, stats)
48054805
end
48064806

0 commit comments

Comments
 (0)