From 9fe916db16af9661cfd0f850a703188cdd4296a5 Mon Sep 17 00:00:00 2001 From: Jesse McDonald Date: Sat, 31 Oct 2020 11:58:07 -0500 Subject: [PATCH] rename :REPLACE to :FINALIZE since prior word must be deferred --- startup.4th | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/startup.4th b/startup.4th index 68bbd76..bfbb9f6 100644 --- a/startup.4th +++ b/startup.4th @@ -1849,9 +1849,9 @@ BOOTSTRAP-GET-ORDER SET-ORDER \ Hide the named word: HIDE : HIDE ( "ccc" -- ) ' (HIDE) ; -\ Begin a new colon definition; hide & redirect the previous word -\ with the same name to the new definition -: :REPLACE ( "ccc" -- ) +\ Begin a new colon definition; hide & redirect the previous +\ (deferred) word with the same name to the new definition +: :FINALIZE ( "ccc" -- ) : LATEST DUP >NAME FIND-OR-THROW DROP DUP (HIDE) DEFER! ; \ Produce the size or alignment of the subsequent type descriptor as a literal @@ -1886,7 +1886,7 @@ NULL 0 TIB-LEFTOVER 2! \ Attempt to replace the parse area with the next line from the current source \ Return TRUE if the parse area was refilled, or FALSE otherwise \ REFILL always fails if the current source is a string (from EVALUATE) -:REPLACE REFILL ( -- flag ) +:FINALIZE REFILL ( -- flag ) SOURCE-ID 0< IF FALSE EXIT THEN \ Shift any leftover characters after the previous line to the start of the buffer TIB-LEFTOVER 2@ TERMINAL-BUFFER SWAP DUP >R CMOVE