Auto-generate error index in handbook

darcs
slava 2006-12-17 21:28:41 +00:00
parent 37a6761a17
commit c7a84b796f
3 changed files with 7 additions and 39 deletions

View File

@ -4,7 +4,6 @@
- error popup obscures input area
- ui docs
- test factor on linux/ppc
- auto-generate error-index
+ 0.88:

View File

@ -66,44 +66,7 @@ ARTICLE: "primitive-index" "Primitive index"
{ $outliner [ all-words [ primitive? ] subset ] } ;
ARTICLE: "error-index" "Error index"
{ $subsection alien-callback-error }
{ $subsection alien-invoke-error }
{ $subsection assert }
{ $subsection bad-escape }
{ $subsection bounds-error }
{ $subsection c-stream-error }
{ $subsection c-string-error. }
{ $subsection callstack-overflow. }
{ $subsection check-closed }
{ $subsection check-create }
{ $subsection check-method }
{ $subsection check-ptr }
{ $subsection check-tuple }
{ $subsection check-vocab }
{ $subsection condition }
{ $subsection datastack-overflow. }
{ $subsection datastack-underflow. }
{ $subsection divide-by-zero-error. }
{ $subsection empty-queue }
{ $subsection expired-error. }
{ $subsection ffi-error. }
{ $subsection heap-scan-error. }
{ $subsection inference-error }
{ $subsection io-error. }
{ $subsection negative-array-size-error. }
{ $subsection no-article }
{ $subsection no-cond }
{ $subsection no-math-method }
{ $subsection no-method }
{ $subsection parse-error }
{ $subsection retainstack-overflow. }
{ $subsection retainstack-underflow. }
{ $subsection signal-error. }
{ $subsection slice-error }
{ $subsection type-check-error. }
{ $subsection undefined-symbol-error. }
{ $subsection undefined-word-error. }
{ $subsection user-interrupt. } ;
{ $outliner [ all-errors ] } ;
ARTICLE: "type-index" "Type index"
{ $outliner [ builtins get [ ] subset ] } ;

View File

@ -35,6 +35,12 @@ M: f article-content drop \ f article-content ;
articles get hash-keys
all-words [ word-help ] subset append ;
: error? ( word -- ? )
\ $error-description swap word-help elements empty? not ;
: all-errors ( -- seq )
all-words [ error? ] subset natural-sort ;
GENERIC: elements* ( elt-type element -- )
: elements ( elt-type element -- seq ) [ elements* ] { } make ;