mirror of
https://github.com/minetest-mods/mesecons.git
synced 2025-03-22 20:10:36 +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 = {
|
local tokens = {
|
||||||
-- Declare inputs and outputs:
|
-- 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
|
for i = 1, 14 do
|
||||||
local cur = t[i]
|
local cur = t[i]
|
||||||
@ -226,6 +226,7 @@ lg.compile = function(t)
|
|||||||
table.insert(tokens, _dst(cur.dst))
|
table.insert(tokens, _dst(cur.dst))
|
||||||
table.insert(tokens, "=")
|
table.insert(tokens, "=")
|
||||||
table.insert_all(tokens, {_action(cur.action)(_op(cur.op1), _op(cur.op2))})
|
table.insert_all(tokens, {_action(cur.action)(_op(cur.op1), _op(cur.op2))})
|
||||||
|
table.insert(tokens, ";")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
table.insert(tokens, "return oA, oB, oC, oD end")
|
table.insert(tokens, "return oA, oB, oC, oD end")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user