From 98d58232259ef56c21654aa3f8280a4428dff61d Mon Sep 17 00:00:00 2001 From: Alexandre Dumont Date: Sun, 27 Feb 2022 01:21:55 +0100 Subject: [PATCH] Forth: rewrite simpler defword macro --- forth.s | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/forth.s b/forth.s index 7856e86..6c5118a 100644 --- a/forth.s +++ b/forth.s @@ -34,19 +34,11 @@ __word_0 = 0 .ident (.sprintf("__word_%u", __word_last + 1)): .addr .ident(.sprintf("__word_%u", __word_last)) - ; this ifblank cascading can probably be enhanced... + .ifnblank strname - .ifnblank flags - CString strname, flags - .else - CString strname - .endif + CString strname, flags .else - .ifnblank flags - CString label, flags - .else - CString label - .endif + CString label, flags .endif __word_last .set __word_last + 1