tools.scaffold: fix scaffold-docs generating $var-decsription for classes
parent
ef29e0947f
commit
6834f93ad1
|
@ -20,6 +20,14 @@ IN: tools.scaffold.tests
|
||||||
[ \ undocumented-word (help.) ] with-string-writer
|
[ \ undocumented-word (help.) ] with-string-writer
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
|
{
|
||||||
|
"HELP: iota-tuple
|
||||||
|
{ $class-description \"\" } ;
|
||||||
|
" }
|
||||||
|
[
|
||||||
|
[ \ iota-tuple (help.) ] with-string-writer
|
||||||
|
] unit-test
|
||||||
|
|
||||||
{ sequence t } [ "seq" lookup-type ] unit-test
|
{ sequence t } [ "seq" lookup-type ] unit-test
|
||||||
{ sequence t } [ "seq'" lookup-type ] unit-test
|
{ sequence t } [ "seq'" lookup-type ] unit-test
|
||||||
{ sequence t } [ "newseq" lookup-type ] unit-test
|
{ sequence t } [ "newseq" lookup-type ] unit-test
|
||||||
|
|
|
@ -185,6 +185,10 @@ M: object add-using ( object -- )
|
||||||
] if
|
] if
|
||||||
] when* ;
|
] when* ;
|
||||||
|
|
||||||
|
: class-description. ( word -- )
|
||||||
|
drop
|
||||||
|
"{ $class-description \"\" } ;" print ;
|
||||||
|
|
||||||
: symbol-description. ( word -- )
|
: symbol-description. ( word -- )
|
||||||
drop
|
drop
|
||||||
"{ $var-description \"\" } ;" print ;
|
"{ $var-description \"\" } ;" print ;
|
||||||
|
@ -194,11 +198,11 @@ M: object add-using ( object -- )
|
||||||
"{ $description \"\" } ;" print ;
|
"{ $description \"\" } ;" print ;
|
||||||
|
|
||||||
: docs-body. ( word/symbol -- )
|
: docs-body. ( word/symbol -- )
|
||||||
dup symbol? [
|
{
|
||||||
symbol-description.
|
{ [ dup class? ] [ class-description. ] }
|
||||||
] [
|
{ [ dup symbol? ] [ symbol-description. ] }
|
||||||
[ $values. ] [ $description. ] bi
|
[ [ $values. ] [ $description. ] bi ]
|
||||||
] if ;
|
} cond ;
|
||||||
|
|
||||||
: docs-header. ( word -- )
|
: docs-header. ( word -- )
|
||||||
"HELP: " write name>> print ;
|
"HELP: " write name>> print ;
|
||||||
|
|
Loading…
Reference in New Issue