Skip to content

Commit

Permalink
Factor out "CREATE.
Browse files Browse the repository at this point in the history
  • Loading branch information
larsbrinkhoff committed May 16, 2015
1 parent 7ae2b5b commit b3f9624
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion core.fth
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ drop
: dodoes_code [ ' dodoes >code @ ] literal ;
: does> [ ' (does>) ] literal compile, dodoes_code does, ; compile-only
: code, code! cell allot ;
: create parse-name header, dodoes_code code, reveal does> ;
: "create header, dodoes_code code, reveal does> ;
: create parse-name "create ;

: postpone, [ ' literal compile, ' compile, ] literal compile, ;
\ Same as: postpone literal postpone compile, ;
Expand Down
3 changes: 1 addition & 2 deletions targets/c/meta.fth
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,8 @@ defer number,
defer t-compile,
action-of number constant host-number

: (create) ( a u -- ) input>r string-input create r>input ;
: host-word ( xt a u -- ) get-current >r ['] target set-current
(create) , r> set-current does> @ t-compile, ;
"create , r> set-current does> @ t-compile, ;

: copy >in @ >r : r> >in ! ' compile, postpone ; ;
: immediate: copy immediate ;
Expand Down

0 comments on commit b3f9624

Please sign in to comment.