restarted modules vocab development

db4
Sam Anklesaria 2009-05-16 19:50:16 -05:00
parent 8a50d2f8fd
commit 4952fc6f9f
21 changed files with 5 additions and 5 deletions

View File

@ -1,7 +1,7 @@
! Copyright (C) 2007, 2009 Daniel Ehrenberg, Bruno Deferrari, ! Copyright (C) 2007, 2009 Daniel Ehrenberg, Bruno Deferrari,
! Slava Pestov. ! Slava Pestov.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: assocs hashtables kernel namespaces sequences USING: assocs fry hashtables kernel namespaces sequences
sets strings vocabs sorting accessors arrays ; sets strings vocabs sorting accessors arrays ;
IN: vocabs.parser IN: vocabs.parser
@ -57,3 +57,6 @@ SYMBOL: in
: set-in ( name -- ) : set-in ( name -- )
check-vocab-string dup in set create-vocab (use+) ; check-vocab-string dup in set create-vocab (use+) ;
: with-in ( vocab quot -- vocab ) over
[ '[ _ set-in @ ] in get swap dip set-in ] dip vocab ; inline

View File

@ -16,9 +16,6 @@ DEFER: get-words
[ remote-quot ] 2keep create-in -rot define-declared word make-inline [ remote-quot ] 2keep create-in -rot define-declared word make-inline
] with-compilation-unit ; ] with-compilation-unit ;
: with-in ( vocab quot -- vocab ) over
[ '[ _ set-in @ ] in get swap dip set-in ] dip vocab ; inline
: remote-vocab ( addrspec vocabspec -- vocab ) : remote-vocab ( addrspec vocabspec -- vocab )
dup "-remote" append [ dup "-remote" append [
[ (( -- words )) [ "get-words" remote-quot ] keep call-effect ] 2keep [ (( -- words )) [ "get-words" remote-quot ] keep call-effect ] 2keep