rename :REPLACE to :FINALIZE since prior word must be deferred

This commit is contained in:
Jesse D. McDonald 2020-10-31 11:58:07 -05:00
parent abedc84f1a
commit 9fe916db16
1 changed files with 4 additions and 4 deletions

View File

@ -1849,9 +1849,9 @@ BOOTSTRAP-GET-ORDER SET-ORDER
\ Hide the named word: HIDE <name> \ Hide the named word: HIDE <name>
: HIDE ( "<spaces>ccc" -- ) ' (HIDE) ; : HIDE ( "<spaces>ccc" -- ) ' (HIDE) ;
\ Begin a new colon definition; hide & redirect the previous word \ Begin a new colon definition; hide & redirect the previous
\ with the same name to the new definition \ (deferred) word with the same name to the new definition
: :REPLACE ( "<spaces>ccc" -- ) : :FINALIZE ( "<spaces>ccc" -- )
: LATEST DUP >NAME FIND-OR-THROW DROP DUP (HIDE) DEFER! ; : LATEST DUP >NAME FIND-OR-THROW DROP DUP (HIDE) DEFER! ;
\ Produce the size or alignment of the subsequent type descriptor as a literal \ 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 \ 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 \ Return TRUE if the parse area was refilled, or FALSE otherwise
\ REFILL always fails if the current source is a string (from EVALUATE) \ 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 SOURCE-ID 0< IF FALSE EXIT THEN
\ Shift any leftover characters after the previous line to the start of the buffer \ Shift any leftover characters after the previous line to the start of the buffer
TIB-LEFTOVER 2@ TERMINAL-BUFFER SWAP DUP >R CMOVE TIB-LEFTOVER 2@ TERMINAL-BUFFER SWAP DUP >R CMOVE