Handbook
Glossary
use-vocab ( vocab -- )
Factor handbook
»
The language
»
Parsing words
»
Reflection support for vocabulary search path
Prev:
manifest
Next:
unuse-vocab ( vocab -- )
Vocabulary
vocabs
.
parser
Inputs
vocab
a vocabulary specifier
Outputs
None
Word description
Adds a vocabulary to the current manifest.
Notes
This word is used to implement
USE:
.
Definition
USING:
accessors
kernel
namespaces
parser.notes
sequences
sets
vocabs
;
IN:
vocabs.parser
:
use-vocab
( vocab -- )
dup
using-vocab?
[
vocab-name
"Already using '"
"' vocabulary"
surround
note.
]
[
manifest
get
[
[
?load-vocab
]
dip
search-vocabs>>
push
]
[
[
vocab-name
]
dip
search-vocab-names>>
adjoin
]
2bi
]
if
;