Loading set-compsem.fs +8 −6 Original line number Original line Diff line number Diff line Loading @@ -25,14 +25,16 @@ \ :noname ." compiling" ; \ :noname ." compiling" ; \ : foo ." interpreting" ; set-compsem \ : foo ." interpreting" ; set-compsem : intsem: ( xt "name" -- ) : intsem: ( -- ) \G defines a word, which has a special compilation semantics \G changes the current semantics to be the non-default compilation \G provided as @var{xt} on the stack \G semantics, and adds another interpretation semantics to the last [n:d nip ['] execute ;] >r \G definition : r> set->comp ; [: ['] execute ;] set->comp int-[: [: nip >r vt, wrap! r> [n:d nip ;] set->int ;] colon-sys-xt-offset stick ; \ silly example: \ silly example: \ :noname ." compiling" ; intsem: foo ." interpreting" ; \ : foo ." compiling" ; intsem: ." interpreting" ; : compsem: ( -- ) : compsem: ( -- ) \G adds a non default compilation semantics to the last \G adds a non default compilation semantics to the last Loading Loading
set-compsem.fs +8 −6 Original line number Original line Diff line number Diff line Loading @@ -25,14 +25,16 @@ \ :noname ." compiling" ; \ :noname ." compiling" ; \ : foo ." interpreting" ; set-compsem \ : foo ." interpreting" ; set-compsem : intsem: ( xt "name" -- ) : intsem: ( -- ) \G defines a word, which has a special compilation semantics \G changes the current semantics to be the non-default compilation \G provided as @var{xt} on the stack \G semantics, and adds another interpretation semantics to the last [n:d nip ['] execute ;] >r \G definition : r> set->comp ; [: ['] execute ;] set->comp int-[: [: nip >r vt, wrap! r> [n:d nip ;] set->int ;] colon-sys-xt-offset stick ; \ silly example: \ silly example: \ :noname ." compiling" ; intsem: foo ." interpreting" ; \ : foo ." compiling" ; intsem: ." interpreting" ; : compsem: ( -- ) : compsem: ( -- ) \G adds a non default compilation semantics to the last \G adds a non default compilation semantics to the last Loading