Paste: sto

Author: dharmatech
Mode: factor
Date: Tue, 4 Nov 2008 22:54:53
Plain Text |
USING: kernel lexer parser words quotations compiler.units ;

IN: sto

: sto
  \ 1quotation parsed
  scan
    current-vocab create
    dup set-word
    dup "t" "val" set-word-prop
  literalize parsed
  \ swap parsed
  [ define ] parsed
  \ with-compilation-unit parsed ;                              parsing

Annotation: sto v0.2?

Author: pmw
Mode: factor
Date: Sat, 8 Nov 2008 18:07:06
Plain Text |
USING: kernel lexer parser words quotations compiler.units fry ;

IN: sto

: get-create-word ( str -- word )
    current-vocab create
    [ set-word ] keep ;

: call-parsed
    parsed \ call parsed ; inline

: sto
    scan get-create-word 
    '[ 1quotation _ swap [ define ] with-compilation-unit ] call-parsed ; parsing

New Annotation

Summary:
Author:
Mode:
Body: