-! Copyright (C) 2007, 2009 Eduardo Cavazos, Slava Pestov.
+! Copyright (C) 2007, 2010 Eduardo Cavazos, Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: namespaces make sequences io io.files io.pathnames kernel
 assocs words vocabs definitions parser continuations hashtables

M: vocab-link (load-vocab)
    vocab-name (load-vocab) ;

M: string (load-vocab)
    [ check-vocab-hook get call( vocab -- ) ]
    [ create-vocab (load-vocab) ]
    bi ;

PRIVATE>



SYMBOL: load-help?

! Defined by vocabs.metadata
SYMBOL: check-vocab-hook

check-vocab-hook [ [ drop ] ] initialize

<PRIVATE

: load-source ( vocab -- )
    dup check-vocab-hook get call( vocab -- )
    [
        +parsing+ >>source-loaded?
        dup vocab-source-path [ parse-file ] [ [ ] ] if*
