diff --git a/src/grace.art b/src/grace.art index aa6212c..bb42d95 100644 --- a/src/grace.art +++ b/src/grace.art @@ -39,18 +39,26 @@ doSth: function [n][ executeCode: function [inp][ Got: null - - unless null? err: <= try.verbose [ - unless null? err: <= try.verbose to :block inp -> - return #[ok: false, content: to :string err] - - StackSize: size stack - - if StackSize > 0 -> Got: unstack 1 - unless null? Got -> return #[ok: true, content: render.once "|Got|"] - - return #[ok: true, content: null] - ] -> return #[ok: false, content: to :string err] + RES: null + + (not? null? err: <= try [ + (not? null? err: <= try to :block inp)?[ + RES: #[ok: false, content: to :string err] + ][ + StackSize: size stack + if StackSize > 0 -> Got: unstack 1 + (null? Got)?[ + RES: #[ok: true, content: null] + ][ + RES: #[ok: true, content: to :string Got] + ] + ] + + ])? [ + return #[ok: false, content: to :string err] + ][ + return RES + ] ] export module [