aboutsummaryrefslogtreecommitdiff
path: root/src/3rdParty/luaminify.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdParty/luaminify.lua')
-rw-r--r--src/3rdParty/luaminify.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/3rdParty/luaminify.lua b/src/3rdParty/luaminify.lua
index 925af1e..d4389d7 100644
--- a/src/3rdParty/luaminify.lua
+++ b/src/3rdParty/luaminify.lua
@@ -1309,6 +1309,9 @@ local function ParseLua(src)
1309 if not tok:ConsumeKeyword('then', tokenList) then 1309 if not tok:ConsumeKeyword('then', tokenList) then
1310 return false, GenerateError("`then` expected.") 1310 return false, GenerateError("`then` expected.")
1311 end 1311 end
1312 if tok:IsSymbol(';') then
1313 tok:Get()
1314 end
1312 local st, nodeBody = ParseStatementList(scope) 1315 local st, nodeBody = ParseStatementList(scope)
1313 if not st then return false, nodeBody end 1316 if not st then return false, nodeBody end
1314 nodeIfStat.Clauses[#nodeIfStat.Clauses+1] = { 1317 nodeIfStat.Clauses[#nodeIfStat.Clauses+1] = {
@@ -2459,7 +2462,7 @@ local function GetYueLineMap(luaCodes)
2459 local current = 1 2462 local current = 1
2460 local lastLine = 1 2463 local lastLine = 1
2461 local lineMap = { } 2464 local lineMap = { }
2462 for lineCode in luaCodes:gmatch("[^\n\r]*") do 2465 for lineCode in luaCodes:gmatch("([^\r\n]*)\r?\n?") do
2463 local num = lineCode:match("--%s*(%d+)%s*$") 2466 local num = lineCode:match("--%s*(%d+)%s*$")
2464 if num then 2467 if num then
2465 local line = tonumber(num) 2468 local line = tonumber(num)