From 3fbc89273dbebadf5e70197a51ddfae3131202c4 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 11 Jan 2018 04:38:46 -0800 Subject: Removed some dead code and streamlined the API a bit. Also added training wheels for ease of transitions. --- lib/utils.nom | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/utils.nom') diff --git a/lib/utils.nom b/lib/utils.nom index a7d4941..8ed196d 100644 --- a/lib/utils.nom +++ b/lib/utils.nom @@ -1,16 +1,16 @@ use "lib/metaprogramming.nom" # Error functions -action [error!, panic!, fail!, abort!]: +action [barf!]: nomsu "error" [] -action [error %msg]: +action [barf %msg]: nomsu "error"[%msg] -compile [assert %condition %msg] to code: ".." +compile [assume %condition or barf %msg] to code: ".." if not (\(%condition as lua)) then nomsu:error(\(%msg as lua)); end -parse [assert %condition] as: assert %condition (nil) +parse [assume %condition] as: assume %condition or barf (nil) # Text functions action [join %strs with glue %glue]: -- cgit v1.2.3