tools.scaffold: generating docs for obj/f was broken.
parent
52043e60d5
commit
59205b0399
|
@ -25,3 +25,8 @@ IN: tools.scaffold.tests
|
|||
{ sequence t } [ "newseq" lookup-type ] unit-test
|
||||
{ { $maybe sequence } t } [ "seq/f" lookup-type ] unit-test
|
||||
{ f f } [ "foo" lookup-type ] unit-test
|
||||
|
||||
|
||||
: test-maybe ( obj -- obj/f ) ;
|
||||
|
||||
[ ] [ \ test-maybe (help.) ] unit-test
|
|
@ -146,7 +146,13 @@ ERROR: vocab-name-contains-dot path ;
|
|||
{ "url" url }
|
||||
} at* [ swap [ \ $maybe swap 2array ] when ] dip ;
|
||||
|
||||
: add-using ( object -- )
|
||||
GENERIC: add-using ( object -- )
|
||||
|
||||
M: array add-using [ add-using ] each ;
|
||||
|
||||
M: string add-using drop ;
|
||||
|
||||
M: object add-using ( object -- )
|
||||
vocabulary>> using get [ adjoin ] [ drop ] if* ;
|
||||
|
||||
: 4bl ( -- )
|
||||
|
@ -160,7 +166,7 @@ ERROR: vocab-name-contains-dot path ;
|
|||
dup array? [ first ] when
|
||||
dup lookup-type [
|
||||
[ unparse write bl ]
|
||||
[ [ pprint ] [ dup string? [ drop ] [ add-using ] if ] bi ] bi*
|
||||
[ [ pprint ] [ add-using ] bi ] bi*
|
||||
] [
|
||||
drop unparse write bl null pprint
|
||||
null add-using
|
||||
|
|
Loading…
Reference in New Issue