From 6afa71d67843c2c0624240d90f6ec2a268a5d300 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 17 Jul 2018 16:15:44 -0700 Subject: [PATCH] Removing minor change. --- nomsu.lua | 30 ++++++++++++++---------------- nomsu.moon | 12 +++++------- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/nomsu.lua b/nomsu.lua index 3ca85b5..621d448 100644 --- a/nomsu.lua +++ b/nomsu.lua @@ -323,20 +323,18 @@ say ".." end end 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) +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) diff --git a/nomsu.moon b/nomsu.moon index 82cdada..29c49e3 100755 --- a/nomsu.moon +++ b/nomsu.moon @@ -218,10 +218,8 @@ say ".." elseif not ok Errhand.print_error ret - -do - debugger = if args.debugger == "nil" then {} - else require(args.debugger or 'error_handling') - guard = if type(debugger) == 'function' then debugger - else debugger.guard or debugger.call or debugger.wrap or debugger.run or ((fn)->fn()) - guard(run) +debugger = if args.debugger == "nil" then {} +else require(args.debugger or 'error_handling') +guard = if type(debugger) == 'function' then debugger +else debugger.guard or debugger.call or debugger.wrap or debugger.run or ((fn)->fn()) +guard(run)