From 2d6c987cf029a112fe6b0a579a1aabbcdc6fe2f9 Mon Sep 17 00:00:00 2001 From: Jude Melton-Houghton Date: Thu, 8 Dec 2022 09:14:10 -0500 Subject: [PATCH] Make code less syntactically ambiguous --- mesecons_fpga/logic.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mesecons_fpga/logic.lua b/mesecons_fpga/logic.lua index 810481b..e93a8d4 100644 --- a/mesecons_fpga/logic.lua +++ b/mesecons_fpga/logic.lua @@ -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")