diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-07-17 16:13:35 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-07-17 16:13:55 -0700 |
| commit | cbd143775295cca490b09eae37c1766389da5edf (patch) | |
| tree | 74a89c6a15173de43fc89ae8632162a37525f716 /nomsu.lua | |
| parent | 39a0121856f8230332bcef1b6a7108696f2a765d (diff) | |
Optimization/simplification pass.
Diffstat (limited to 'nomsu.lua')
| -rw-r--r-- | nomsu.lua | 34 |
1 files changed, 18 insertions, 16 deletions
@@ -144,7 +144,7 @@ run = function() if not (files.exists(f)) then error("Could not find: " .. tostring(f)) end - for filename in files.walk(f) do + for _, filename in files.walk(f) do input_files[filename] = true end end @@ -228,7 +228,7 @@ run = function() local parse_errs = { } for _index_0 = 1, #file_queue do local f = file_queue[_index_0] - for filename in files.walk(f) do + for _, filename in files.walk(f) do local _continue_0 = false repeat if not (filename == "stdin" or filename:match("%.nom$")) then @@ -323,18 +323,20 @@ say ".." end end end -local debugger -if args.debugger == "nil" then - debugger = { } -else - debugger = require(args.debugger or 'error_handling') -end -local guard -if type(debugger) == 'function' then - guard = debugger -else - guard = debugger.guard or debugger.call or debugger.wrap or debugger.run or (function(fn) - return fn() - end) +do + local debugger + if args.debugger == "nil" then + debugger = { } + else + debugger = require(args.debugger or 'error_handling') + end + local guard + if type(debugger) == 'function' then + guard = debugger + else + guard = debugger.guard or debugger.call or debugger.wrap or debugger.run or (function(fn) + return fn() + end) + end + return guard(run) end -return guard(run) |
