Commit 17f60feb authored by Bernd Paysan's avatar Bernd Paysan

merged

parents 6cfcfe9b 15b9e470
Pipeline #868 passed with stage
in 10 minutes
...@@ -26,9 +26,12 @@ ...@@ -26,9 +26,12 @@
\ : foo ." interpreting" ; set-compsem \ : foo ." interpreting" ; set-compsem
: intsem: ( -- ) : intsem: ( -- )
\G changes the current semantics to be the non-default compilation \G The current definition's compilation semantics are changed to
\G semantics, and adds another interpretation semantics to the last \G perform its execution semantics (the word becomes immediate).
\G definition \G Then its interpretation semantics are changed to perform the
\G definition starting at the @code{intsem:}. Note that if you
\G then call @code{immediate}, the compilation semantics are
\G changed to perform the word's new interpretation semantics.
[: ['] execute ;] set->comp [: ['] execute ;] set->comp
int-[: [: nip >r vt, wrap! r> [n:d nip ;] set->int ;] int-[: [: nip >r vt, wrap! r> [n:d nip ;] set->int ;]
colon-sys-xt-offset stick ; colon-sys-xt-offset stick ;
...@@ -37,8 +40,8 @@ ...@@ -37,8 +40,8 @@
\ : foo ." compiling" ; intsem: ." interpreting" ; \ : foo ." compiling" ; intsem: ." interpreting" ;
: compsem: ( -- ) : compsem: ( -- )
\G adds a non default compilation semantics to the last \G Changes the compilation semantics of the current definition to
\G definition \G perform the definition starting at the @code{compsem:}.
int-[: [: nip >r vt, wrap! r> set-compsem ;] colon-sys-xt-offset stick ; int-[: [: nip >r vt, wrap! r> set-compsem ;] colon-sys-xt-offset stick ;
\ silly example \ silly example
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment