-
-
Save lsparrish/255196 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
: append ( $$-$ ) | |
swap | |
here push | |
here over getLength dup allot copy | |
here over getLength dup allot copy | |
0 , pop ; | |
: paren-wrap s" (" swap append s" )" append ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
: keephere ( $- ) | |
here over getLength | |
dup allot | |
copy 0 , ; | |
: :create ( $- ) | |
here last dup @ , ! ( Make entry and link it to previous. ) | |
['] .data , ( Put .data in the class field. ) | |
here push 0 , ( Put 0 in the XT field. ) | |
keephere ( Copy the name to the name field. ) | |
here pop ! ; ( Replace the XT with pointer to HERE.) | |
: t s" test" :create ; | |
t words |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment