Handbook
Glossary
vocab
Factor handbook
»
The implementation
»
Vocabularies
Prev:
dictionary
Next:
vocab? ( object -- ? )
Vocabulary
vocabs
Class description
Instances represent vocabularies.
Definition
USING:
kernel
;
IN:
vocabs
TUPLE:
vocab
<
identity-tuple
name words main help source-loaded? docs-loaded?
;
Methods
USING:
accessors
kernel
vocabs
vocabs.loader.private
;
M:
vocab
(require)
dup
source-loaded?>>
+parsing+
eq?
[
dup
source-loaded?>>
[
dup
load-source
]
unless
dup
docs-loaded?>>
[
dup
load-docs
]
unless
]
unless
drop
;
USING:
kernel
tools.scaffold.private
vocabs
;
M:
vocab
add-using
drop
;
USING:
definitions.icons
kernel
vocabs
;
M:
vocab
definition-icon
drop
"open-vocab"
definition-icon-path
;
USING:
vocabs
vocabs.loader
xmode.highlight
;
M:
vocab
highlight.
vocab-source-path
highlight.
;
USING:
accessors
help.lint.coverage.private
kernel
vocabs
;
M:
vocab
loaded-vocab?
source-loaded?>>
+done+
=
;
USING:
vocabs
;
M:
vocab
lookup-vocab
;
USING:
accessors
vocabs
;
M:
vocab
require
name>>
require
;
USING:
tools.scaffold
vocabs
;
M:
vocab
scaffold-docs
vocab-name
scaffold-docs
;
USING:
accessors
assocs
kernel
make
math.parser
summary
vocabs
vocabs.metadata
;
M:
vocab
summary
[
dup
vocab-in-root-summary
%
" ("
%
words>>
assoc-size
#
" words)"
%
]
""
make
;
USING:
accessors
kernel
vocabs
vocabs.parser.private
;
M:
vocab
update
dup
name>>
lookup-vocab
eq?
;
USING:
accessors
vocabs
;
M:
vocab
vocab-help
help>>
;
USING:
accessors
vocabs
;
M:
vocab
vocab-main
main>>
;
USING:
accessors
vocabs
;
M:
vocab
vocab-name
name>>
;
USING:
kernel
tools.scaffold.private
vocabs
;
M:
vocab
vocab-root?
drop
f
;
USING:
accessors
vocabs
;
M:
vocab
vocab-words-assoc
words>>
;