From e962e17f42b79768f8ded729a37d43d48fcb2e13 Mon Sep 17 00:00:00 2001 From: Koichi Nakamura Date: Fri, 15 Jan 2021 14:34:39 +0900 Subject: [PATCH] Add "marker" --- bootstrap.fs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/bootstrap.fs b/bootstrap.fs index 49742dd..a5029c7 100644 --- a/bootstrap.fs +++ b/bootstrap.fs @@ -2466,6 +2466,17 @@ need-defined (read) word throw included ; +( === Forget === ) + +\ Define a word "name". The word forgets itself and everything +\ defined after when executed. +: marker ( "name" -- ) + create + latest name>link , \ save latest + does> + @ &latest ! +; + ( === Primitive Instructions === ) : insn:docol docol ; @@ -2548,7 +2559,7 @@ need-defined (read) ( \ c@ c! c, @ ! , - word find >cfa >dfa + word find >cfa >dfa marker bye execute exit here latest end-update-dictionary ; execute