fixed loop bug

This commit is contained in:
leaf corcoran 2011-05-30 01:23:35 -07:00
parent 233738aad2
commit 3ebfe88d30

8
moonc
View File

@ -70,6 +70,7 @@ function compile_file(from, to)
end
out_f:write(code.."\n")
out_f:close()
return true
end
@ -197,7 +198,9 @@ if opts.w then
if events then
for _, ev in ipairs(events) do
local fname = wd_table[ev.wd]..ev.name
local success, err = compile_file(fname, target_dir..convert_path(fname))
if fname:match("%.moon$") then
local target = target_dir..convert_path(fname)
local success, err = compile_file(fname, target)
if not success then
print()
@ -208,6 +211,7 @@ if opts.w then
print("Built", fname)
end
end
end
else break end
end
else
@ -216,6 +220,8 @@ else
if not success then
print(fname, err)
break
else
print("Built", fname)
end
end
end