mirror of
https://github.com/minetest-mods/mesecons.git
synced 2024-11-14 22:30:32 +01:00
Make code less syntactically ambiguous
This commit is contained in:
parent
776c7e0b23
commit
2d6c987cf0
|
@ -218,7 +218,7 @@ lg.compile = function(t)
|
|||
|
||||
local tokens = {
|
||||
-- Declare inputs and outputs:
|
||||
"return function(iA, iB, iC, iD) local oA, oB, oC, oD",
|
||||
"return function(iA, iB, iC, iD) local oA, oB, oC, oD;",
|
||||
}
|
||||
for i = 1, 14 do
|
||||
local cur = t[i]
|
||||
|
@ -226,6 +226,7 @@ lg.compile = function(t)
|
|||
table.insert(tokens, _dst(cur.dst))
|
||||
table.insert(tokens, "=")
|
||||
table.insert_all(tokens, {_action(cur.action)(_op(cur.op1), _op(cur.op2))})
|
||||
table.insert(tokens, ";")
|
||||
end
|
||||
end
|
||||
table.insert(tokens, "return oA, oB, oC, oD end")
|
||||
|
|
Loading…
Reference in New Issue
Block a user