Skip to content

Commit

Permalink
Make luacheck happy.
Browse files Browse the repository at this point in the history
  • Loading branch information
vifino committed Dec 11, 2016
1 parent 5e3e026 commit ba68af1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions luaforth.lua
Expand Up @@ -117,7 +117,7 @@ function luaforth.parse_word(src, env, pos)
error("Failed finding requested "..pt.. " as word argument.", 0)
end
end

local rt = word_value._fnret
instruction = {
t = parser_type_word,
Expand Down Expand Up @@ -189,12 +189,12 @@ end

-- runner
function luaforth.eval_inst(inst, env, stack)
local stack = stack or {}
if inst.t == parser_type_word then
local args = inst.extra and {inst.extra} or {}
local args_offset = #args
for i=1, inst.argn, 1 do
if #stack == 0 then error("Stack underflow!", 0) end
args[#args+1] = tremove(stack)
args[i+args_offset] = tremove(stack)
end

local ra = {inst.fn(stack, env, unpack(args))}
Expand Down Expand Up @@ -226,7 +226,7 @@ end

function luaforth.eval_insts(insts, env, stack)
-- stack
local stack = stack or {}
stack = stack or {}

local ipos = 1
while #insts >= ipos do
Expand Down

0 comments on commit ba68af1

Please sign in to comment.