From d3d6674b5475590bd89c123a54635cc3da6e958c Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez Date: Wed, 13 Nov 2024 15:13:19 +0100 Subject: [PATCH] basic: remove the macroexpand special form --- impls/basic/step8_macros.in.bas | 11 ----------- impls/basic/step9_try.in.bas | 11 ----------- impls/basic/stepA_mal.in.bas | 11 ----------- 3 files changed, 33 deletions(-) diff --git a/impls/basic/step8_macros.in.bas b/impls/basic/step8_macros.in.bas index 416be89347..1455fad0d1 100755 --- a/impls/basic/step8_macros.in.bas +++ b/impls/basic/step8_macros.in.bas @@ -279,7 +279,6 @@ SUB EVAL IF A$="quote" THEN GOTO EVAL_QUOTE IF A$="quasiquote" THEN GOTO EVAL_QUASIQUOTE IF A$="defmacro!" THEN GOTO EVAL_DEFMACRO - IF A$="macroexpand" THEN GOTO EVAL_MACROEXPAND IF A$="do" THEN GOTO EVAL_DO IF A$="if" THEN GOTO EVAL_IF IF A$="fn*" THEN GOTO EVAL_FN @@ -396,16 +395,6 @@ SUB EVAL K=A1:C=R:GOSUB ENV_SET GOTO EVAL_RETURN - EVAL_MACROEXPAND: - REM PRINT "macroexpand" - R=Z%(Z%(A+1)+2) - A=R:CALL MACROEXPAND - R=A - - REM since we are returning it unevaluated, inc the ref cnt - GOSUB INC_REF_R - GOTO EVAL_RETURN - EVAL_IF: GOSUB EVAL_GET_A1: REM set A1 GOSUB PUSH_A: REM push/save A diff --git a/impls/basic/step9_try.in.bas b/impls/basic/step9_try.in.bas index a54dc2d43a..a9dba052d0 100755 --- a/impls/basic/step9_try.in.bas +++ b/impls/basic/step9_try.in.bas @@ -279,7 +279,6 @@ SUB EVAL IF A$="quote" THEN GOTO EVAL_QUOTE IF A$="quasiquote" THEN GOTO EVAL_QUASIQUOTE IF A$="defmacro!" THEN GOTO EVAL_DEFMACRO - IF A$="macroexpand" THEN GOTO EVAL_MACROEXPAND IF A$="try*" THEN GOTO EVAL_TRY IF A$="do" THEN GOTO EVAL_DO IF A$="if" THEN GOTO EVAL_IF @@ -397,16 +396,6 @@ SUB EVAL K=A1:C=R:GOSUB ENV_SET GOTO EVAL_RETURN - EVAL_MACROEXPAND: - REM PRINT "macroexpand" - R=Z%(Z%(A+1)+2) - A=R:CALL MACROEXPAND - R=A - - REM since we are returning it unevaluated, inc the ref cnt - GOSUB INC_REF_R - GOTO EVAL_RETURN - EVAL_TRY: REM PRINT "try*" GOSUB EVAL_GET_A1: REM set A1 diff --git a/impls/basic/stepA_mal.in.bas b/impls/basic/stepA_mal.in.bas index 460abf4853..d8bb60f5bd 100755 --- a/impls/basic/stepA_mal.in.bas +++ b/impls/basic/stepA_mal.in.bas @@ -279,7 +279,6 @@ SUB EVAL IF A$="quote" THEN GOTO EVAL_QUOTE IF A$="quasiquote" THEN GOTO EVAL_QUASIQUOTE IF A$="defmacro!" THEN GOTO EVAL_DEFMACRO - IF A$="macroexpand" THEN GOTO EVAL_MACROEXPAND IF A$="try*" THEN GOTO EVAL_TRY IF A$="do" THEN GOTO EVAL_DO IF A$="if" THEN GOTO EVAL_IF @@ -397,16 +396,6 @@ SUB EVAL K=A1:C=R:GOSUB ENV_SET GOTO EVAL_RETURN - EVAL_MACROEXPAND: - REM PRINT "macroexpand" - R=Z%(Z%(A+1)+2) - A=R:CALL MACROEXPAND - R=A - - REM since we are returning it unevaluated, inc the ref cnt - GOSUB INC_REF_R - GOTO EVAL_RETURN - EVAL_TRY: REM PRINT "try*" GOSUB EVAL_GET_A1: REM set A1