From 83219f8522271ae4f278abc5687921cc8267bb33 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 31 Oct 2018 03:51:37 -0700 Subject: Bumped version number, fixed REPL, and simplified/fixed (use %). --- files.lua | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'files.lua') diff --git a/files.lua b/files.lua index c04f703..48e047f 100644 --- a/files.lua +++ b/files.lua @@ -191,20 +191,18 @@ Files.walk = function(path, flush_cache) end end end - local iter - iter = function(files, i) - if not (files) then - return - end - i = i + 1 - do - local f = files[i] - if f then - return i, f - end + files = files or { } + do + local _accum_0 = { } + local _len_0 = 1 + for _index_0 = 1, #files do + local f = files[_index_0] + _accum_0[_len_0] = gsub(f, "^%./", "") + _len_0 = _len_0 + 1 end + files = _accum_0 end - return iter, files, 0 + return ipairs(files) end local line_counter = re.compile([[ lines <- {| line (%nl line)* |} line <- {} (!%nl .)* -- cgit v1.2.3