scaffold-help now prints $var-description for symbols
parent
7ed56a3cef
commit
b8f24a303a
|
@ -5,7 +5,7 @@ io.encodings.utf8 hashtables kernel namespaces sequences
|
||||||
vocabs.loader io combinators calendar accessors math.parser
|
vocabs.loader io combinators calendar accessors math.parser
|
||||||
io.streams.string ui.tools.operations quotations strings arrays
|
io.streams.string ui.tools.operations quotations strings arrays
|
||||||
prettyprint words vocabs sorting sets classes math alien urls
|
prettyprint words vocabs sorting sets classes math alien urls
|
||||||
splitting ascii combinators.short-circuit ;
|
splitting ascii combinators.short-circuit alarms words.symbol ;
|
||||||
IN: tools.scaffold
|
IN: tools.scaffold
|
||||||
|
|
||||||
SYMBOL: developer-name
|
SYMBOL: developer-name
|
||||||
|
@ -116,6 +116,7 @@ ERROR: no-vocab vocab ;
|
||||||
{ "ch" "a character" }
|
{ "ch" "a character" }
|
||||||
{ "word" word }
|
{ "word" word }
|
||||||
{ "array" array }
|
{ "array" array }
|
||||||
|
{ "alarm" alarm }
|
||||||
{ "duration" duration }
|
{ "duration" duration }
|
||||||
{ "path" "a pathname string" }
|
{ "path" "a pathname string" }
|
||||||
{ "vocab" "a vocabulary specifier" }
|
{ "vocab" "a vocabulary specifier" }
|
||||||
|
@ -162,15 +163,26 @@ ERROR: no-vocab vocab ;
|
||||||
] if
|
] if
|
||||||
] when* ;
|
] when* ;
|
||||||
|
|
||||||
|
: symbol-description. ( word -- )
|
||||||
|
drop
|
||||||
|
"{ $var-description \"\" } ;" print ;
|
||||||
|
|
||||||
: $description. ( word -- )
|
: $description. ( word -- )
|
||||||
drop
|
drop
|
||||||
"{ $description \"\" } ;" print ;
|
"{ $description \"\" } ;" print ;
|
||||||
|
|
||||||
|
: docs-body. ( word/symbol -- )
|
||||||
|
dup symbol? [
|
||||||
|
symbol-description.
|
||||||
|
] [
|
||||||
|
[ $values. ] [ $description. ] bi
|
||||||
|
] if ;
|
||||||
|
|
||||||
: docs-header. ( word -- )
|
: docs-header. ( word -- )
|
||||||
"HELP: " write name>> print ;
|
"HELP: " write name>> print ;
|
||||||
|
|
||||||
: (help.) ( word -- )
|
: (help.) ( word -- )
|
||||||
[ docs-header. ] [ $values. ] [ $description. ] tri ;
|
[ docs-header. ] [ docs-body. ] bi ;
|
||||||
|
|
||||||
: interesting-words ( vocab -- array )
|
: interesting-words ( vocab -- array )
|
||||||
words
|
words
|
||||||
|
|
Loading…
Reference in New Issue