master
Ondřej Hruška 3 years ago
parent 41c152718b
commit 4efe5ffa86
  1. 4
      README.md
  2. 2
      src/fh_runtime.c
  3. 5
      testfiles/combinedtest.f

@ -55,7 +55,7 @@ HERE HOLD I IF IMMEDIATE INVERT J LEAVE LITERAL LOOP LSHIFT M* MAX MIN MOD MOVE
REPEAT ROT RSHIFT S>D S" SIGN SM/REM SOURCE SPACE SPACES STATE SWAP THEN TYPE U. U< UNTIL UM* UM/MOD UNLOOP VARIABLE WHILE WORD XOR [ ['] [CHAR] ] REPEAT ROT RSHIFT S>D S" SIGN SM/REM SOURCE SPACE SPACES STATE SWAP THEN TYPE U. U< UNTIL UM* UM/MOD UNLOOP VARIABLE WHILE WORD XOR [ ['] [CHAR] ]
CORE-EXT: CORE-EXT:
.( .R :NONAME 0<> 0> 2>R 2R> 2R@ <> ?DO ACTION-OF AGAIN BUFFER: C" CASE COMPILE, DEFER DEFER! DEFER@ ENDCASE ENDOF ERASE FALSE HEX HOLDS IS MARKER NIP OF PAD PARSE PARSE-NAME PICK RESTORE-INPUT SAVE-INPUT ROLL S\" TO TRUE TUCK U.R U> UNUSED VALUE WITHIN .( .R :NONAME 0<> 0> 2>R 2R> 2R@ <> ?DO ACTION-OF AGAIN BUFFER: C" CASE COMPILE, DEFER DEFER! DEFER@ ENDCASE ENDOF ERASE FALSE HEX HOLDS IS MARKER NIP OF PAD PARSE PARSE-NAME PICK REFILL RESTORE-INPUT SAVE-INPUT SOURCE-ID ROLL S\" TO TRUE TUCK U.R U> UNUSED VALUE WITHIN
\ \
Other sets: Other sets:
@ -69,7 +69,7 @@ CORE:
ACCEPT KEY ACCEPT KEY
CORE-EXT: CORE-EXT:
REFILL SOURCE-ID [COMPILE] [COMPILE]
``` ```
. .

@ -64,7 +64,7 @@ void fh_drop_to_interactive(struct fh_thread_s *fh) {
} }
void fh_quit(struct fh_thread_s *fh) { void fh_quit(struct fh_thread_s *fh) {
if (fh_globals.interactive) { if (fh_globals.interactive || fh_globals.rescue) {
fh_drop_to_interactive(fh); fh_drop_to_interactive(fh);
fh_setstate(fh, FH_STATE_QUIT, 0); fh_setstate(fh, FH_STATE_QUIT, 0);
} else { } else {

@ -25,6 +25,9 @@ VARIABLE VERBOSE
VARIABLE #ERRORS 0 #ERRORS ! VARIABLE #ERRORS 0 #ERRORS !
: ERROR TYPE QUIT ;
0 [if]
: ERROR \ ( C-ADDR U -- ) DISPLAY AN ERROR MESSAGE FOLLOWED BY : ERROR \ ( C-ADDR U -- ) DISPLAY AN ERROR MESSAGE FOLLOWED BY
\ THE LINE THAT HAD THE ERROR. \ THE LINE THAT HAD THE ERROR.
CR TYPE SOURCE TYPE \ DISPLAY LINE CORRESPONDING TO ERROR CR TYPE SOURCE TYPE \ DISPLAY LINE CORRESPONDING TO ERROR
@ -32,6 +35,7 @@ VARIABLE #ERRORS 0 #ERRORS !
#ERRORS @ 1 + #ERRORS ! #ERRORS @ 1 + #ERRORS !
\ QUIT \ *** Uncomment this line to QUIT on an error \ QUIT \ *** Uncomment this line to QUIT on an error
; ;
[then]
VARIABLE ACTUAL-DEPTH \ STACK RECORD VARIABLE ACTUAL-DEPTH \ STACK RECORD
CREATE ACTUAL-RESULTS 20 CELLS ALLOT CREATE ACTUAL-RESULTS 20 CELLS ALLOT
@ -1798,6 +1802,7 @@ TESTING S\" (Forth 2012 compilation mode)
\ interpretation semantics. S\" in interpretation mode is tested in the tests on \ interpretation semantics. S\" in interpretation mode is tested in the tests on
\ the File-Access word set \ the File-Access word set
1 debug
T{ : SSQ1 S\" abc" S" abc" S= ; -> }T \ No escapes T{ : SSQ1 S\" abc" S" abc" S= ; -> }T \ No escapes
T{ SSQ1 -> TRUE }T T{ SSQ1 -> TRUE }T
T{ : SSQ2 S\" " ; SSQ2 SWAP DROP -> 0 }T \ Empty string T{ : SSQ2 S\" " ; SSQ2 SWAP DROP -> 0 }T \ Empty string

Loading…
Cancel
Save