tools.scaffold: fix scaffold-docs generating $var-decsription for classes

char-rename
Alexander Iljin 2016-06-25 23:13:36 +03:00 committed by John Benediktsson
parent ef29e0947f
commit 6834f93ad1
2 changed files with 17 additions and 5 deletions

View File

@ -20,6 +20,14 @@ IN: tools.scaffold.tests
[ \ undocumented-word (help.) ] with-string-writer
] 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 } [ "newseq" lookup-type ] unit-test

View File

@ -185,6 +185,10 @@ M: object add-using ( object -- )
] if
] when* ;
: class-description. ( word -- )
drop
"{ $class-description \"\" } ;" print ;
: symbol-description. ( word -- )
drop
"{ $var-description \"\" } ;" print ;
@ -194,11 +198,11 @@ M: object add-using ( object -- )
"{ $description \"\" } ;" print ;
: docs-body. ( word/symbol -- )
dup symbol? [
symbol-description.
] [
[ $values. ] [ $description. ] bi
] if ;
{
{ [ dup class? ] [ class-description. ] }
{ [ dup symbol? ] [ symbol-description. ] }
[ [ $values. ] [ $description. ] bi ]
} cond ;
: docs-header. ( word -- )
"HELP: " write name>> print ;