factor/library/help/syntax.factor

15 lines
370 B
Factor

IN: !syntax
USING: arrays help kernel parser sequences syntax words ;
: HELP:
scan-word bootstrap-word dup [
>array uncons* >r "stack-effect" set-word-prop r>
"help" set-word-prop
] [ ] ; parsing
: ARTICLE:
[ >array [ first2 2 ] keep tail add-article ] [ ] ; parsing
: GLOSSARY:
[ >array [ first 1 ] keep tail add-term ] [ ] ; parsing