Skip to content

Instantly share code, notes, and snippets.

@lsparrish
Forked from crcx/non-parsing create
Created December 13, 2009 01:25
Show Gist options
  • Save lsparrish/255196 to your computer and use it in GitHub Desktop.
Save lsparrish/255196 to your computer and use it in GitHub Desktop.
: 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 ;
: 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