From e028209adff0fb8f93871b38ec4f8e4718e535a5 Mon Sep 17 00:00:00 2001 From: Kistaro Windrider Date: Sun, 1 Jan 2023 14:11:11 -0800 Subject: [PATCH] assert on unrecognized directive saves four tokens and is more diagnostic. --- chameleonic.p8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chameleonic.p8 b/chameleonic.p8 index 95b65e8..30b30c6 100644 --- a/chameleonic.p8 +++ b/chameleonic.p8 @@ -62,7 +62,7 @@ function fmt(f, ...) elseif m == "!" then out ..= tostring(p) else - out ..= "(?!:"..m..":"..tostring(p)..")" + assert(false, tostr(m).."is not a formatting directive") end end out ..=sub(s,2)