make sure a vocab exists before trying to document it

db4
Doug Coleman 2008-09-04 01:34:01 -05:00
parent 6e8f5f50f1
commit 62235b3f7b
1 changed files with 6 additions and 0 deletions

View File

@ -13,6 +13,7 @@ SYMBOL: using
ERROR: not-a-vocab-root string ;
ERROR: vocab-name-contains-separator path ;
ERROR: vocab-name-contains-dot path ;
ERROR: no-vocab vocab ;
: root? ( string -- ? )
vocab-roots get member? ;
@ -183,10 +184,15 @@ PRIVATE>
: with-scaffold ( quot -- )
[ H{ } clone using ] dip with-variable ; inline
: check-vocab ( vocab -- vocab )
dup find-vocab-root [ no-vocab ] unless ;
PRIVATE>
: scaffold-help ( vocab-root string -- )
[
check-vocab
prepare-scaffold
[ "-docs.factor" scaffold-path ] dip
swap [ set-scaffold-help-file ] [ 2drop ] if