Skip to content

Commit

Permalink
basic: implement DEBUG-EVAL
Browse files Browse the repository at this point in the history
  • Loading branch information
asarhaddon committed Nov 13, 2024
1 parent d3d6674 commit 972d561
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 16 deletions.
7 changes: 5 additions & 2 deletions impls/basic/step3_env.in.bas
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,11 @@ SUB EVAL

IF ER<>-2 THEN GOTO EVAL_RETURN

REM AZ=A:B=1:GOSUB PR_STR
REM PRINT "EVAL: "+R$+" [A:"+STR$(A)+", LV:"+STR$(LV)+"]"
B$="DEBUG-EVAL":CALL ENV_GET
IF R3=0 OR R=0 OR R=2 THEN GOTO DEBUG_EVAL_DONE
AZ=A:B=1:GOSUB PR_STR
PRINT "EVAL: "+R$+" [A:"+STR$(A)+", LV:"+STR$(LV)+"]"
DEBUG_EVAL_DONE:

GOSUB LIST_Q
IF R THEN GOTO APPLY_LIST
Expand Down
7 changes: 5 additions & 2 deletions impls/basic/step4_if_fn_do.in.bas
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,11 @@ SUB EVAL

IF ER<>-2 THEN GOTO EVAL_RETURN

REM AZ=A:B=1:GOSUB PR_STR
REM PRINT "EVAL: "+R$+" [A:"+STR$(A)+", LV:"+STR$(LV)+"]"
B$="DEBUG-EVAL":CALL ENV_GET
IF R3=0 OR R=0 OR R=2 THEN GOTO DEBUG_EVAL_DONE
AZ=A:B=1:GOSUB PR_STR
PRINT "EVAL: "+R$+" [A:"+STR$(A)+", LV:"+STR$(LV)+"]"
DEBUG_EVAL_DONE:

GOSUB LIST_Q
IF R THEN GOTO APPLY_LIST
Expand Down
7 changes: 5 additions & 2 deletions impls/basic/step5_tco.in.bas
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,11 @@ SUB EVAL

IF ER<>-2 THEN GOTO EVAL_RETURN

REM AZ=A:B=1:GOSUB PR_STR
REM PRINT "EVAL: "+R$+" [A:"+STR$(A)+", LV:"+STR$(LV)+"]"
B$="DEBUG-EVAL":CALL ENV_GET
IF R3=0 OR R=0 OR R=2 THEN GOTO DEBUG_EVAL_DONE
AZ=A:B=1:GOSUB PR_STR
PRINT "EVAL: "+R$+" [A:"+STR$(A)+", LV:"+STR$(LV)+"]"
DEBUG_EVAL_DONE:

GOSUB LIST_Q
IF R THEN GOTO APPLY_LIST
Expand Down
7 changes: 5 additions & 2 deletions impls/basic/step6_file.in.bas
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,11 @@ SUB EVAL

IF ER<>-2 THEN GOTO EVAL_RETURN

REM AZ=A:B=1:GOSUB PR_STR
REM PRINT "EVAL: "+R$+" [A:"+STR$(A)+", LV:"+STR$(LV)+"]"
B$="DEBUG-EVAL":CALL ENV_GET
IF R3=0 OR R=0 OR R=2 THEN GOTO DEBUG_EVAL_DONE
AZ=A:B=1:GOSUB PR_STR
PRINT "EVAL: "+R$+" [A:"+STR$(A)+", LV:"+STR$(LV)+"]"
DEBUG_EVAL_DONE:

GOSUB LIST_Q
IF R THEN GOTO APPLY_LIST
Expand Down
7 changes: 5 additions & 2 deletions impls/basic/step7_quote.in.bas
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,11 @@ SUB EVAL

IF ER<>-2 THEN GOTO EVAL_RETURN

REM AZ=A:B=1:GOSUB PR_STR
REM PRINT "EVAL: "+R$+" [A:"+STR$(A)+", LV:"+STR$(LV)+"]"
B$="DEBUG-EVAL":CALL ENV_GET
IF R3=0 OR R=0 OR R=2 THEN GOTO DEBUG_EVAL_DONE
AZ=A:B=1:GOSUB PR_STR
PRINT "EVAL: "+R$+" [A:"+STR$(A)+", LV:"+STR$(LV)+"]"
DEBUG_EVAL_DONE:

GOSUB LIST_Q
IF R THEN GOTO APPLY_LIST
Expand Down
7 changes: 5 additions & 2 deletions impls/basic/step8_macros.in.bas
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,11 @@ SUB EVAL

IF ER<>-2 THEN GOTO EVAL_RETURN

REM AZ=A:B=1:GOSUB PR_STR
REM PRINT "EVAL: "+R$+" [A:"+STR$(A)+", LV:"+STR$(LV)+"]"
B$="DEBUG-EVAL":CALL ENV_GET
IF R3=0 OR R=0 OR R=2 THEN GOTO DEBUG_EVAL_DONE
AZ=A:B=1:GOSUB PR_STR
PRINT "EVAL: "+R$+" [A:"+STR$(A)+", LV:"+STR$(LV)+"]"
DEBUG_EVAL_DONE:

GOSUB LIST_Q
IF R THEN GOTO APPLY_LIST
Expand Down
7 changes: 5 additions & 2 deletions impls/basic/step9_try.in.bas
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,11 @@ SUB EVAL

IF ER<>-2 THEN GOTO EVAL_RETURN

REM AZ=A:B=1:GOSUB PR_STR
REM PRINT "EVAL: "+R$+" [A:"+STR$(A)+", LV:"+STR$(LV)+"]"
B$="DEBUG-EVAL":CALL ENV_GET
IF R3=0 OR R=0 OR R=2 THEN GOTO DEBUG_EVAL_DONE
AZ=A:B=1:GOSUB PR_STR
PRINT "EVAL: "+R$+" [A:"+STR$(A)+", LV:"+STR$(LV)+"]"
DEBUG_EVAL_DONE:

GOSUB LIST_Q
IF R THEN GOTO APPLY_LIST
Expand Down
7 changes: 5 additions & 2 deletions impls/basic/stepA_mal.in.bas
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,11 @@ SUB EVAL

IF ER<>-2 THEN GOTO EVAL_RETURN

REM AZ=A:B=1:GOSUB PR_STR
REM PRINT "EVAL: "+R$+" [A:"+STR$(A)+", LV:"+STR$(LV)+"]"
B$="DEBUG-EVAL":CALL ENV_GET
IF R3=0 OR R=0 OR R=2 THEN GOTO DEBUG_EVAL_DONE
AZ=A:B=1:GOSUB PR_STR
PRINT "EVAL: "+R$+" [A:"+STR$(A)+", LV:"+STR$(LV)+"]"
DEBUG_EVAL_DONE:

GOSUB LIST_Q
IF R THEN GOTO APPLY_LIST
Expand Down

0 comments on commit 972d561

Please sign in to comment.