Skip to content

Commit

Permalink
basic: remove the macroexpand special form
Browse files Browse the repository at this point in the history
  • Loading branch information
asarhaddon committed Nov 13, 2024
1 parent b7d5200 commit d3d6674
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 33 deletions.
11 changes: 0 additions & 11 deletions impls/basic/step8_macros.in.bas
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
11 changes: 0 additions & 11 deletions impls/basic/step9_try.in.bas
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
11 changes: 0 additions & 11 deletions impls/basic/stepA_mal.in.bas
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d3d6674

Please sign in to comment.