]> gitweb.factorcode.org Git - factor.git/blob - basis/help/syntax/syntax.factor
74c14e1f87acd2667f45292464dd3b4c4a6a7543
[factor.git] / basis / help / syntax / syntax.factor
1 ! Copyright (C) 2005, 2009 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors arrays compiler.units definitions help
4 help.topics kernel math parser sequences vocabs.parser words ;
5 IN: help.syntax
6
7 SYNTAX: HELP:
8     scan-word bootstrap-word
9     [ >link save-location ]
10     [ [ \ ; parse-until >array ] dip set-word-help ]
11     bi ;
12
13 ERROR: article-expects-name-and-title got ;
14
15 SYNTAX: ARTICLE:
16     location [
17         \ ; parse-until >array
18         dup length 2 < [ article-expects-name-and-title ] when
19         [ first2 ] [ 2 tail ] bi <article>
20         over add-article >link
21     ] dip remember-definition ;
22
23 SYNTAX: ABOUT:
24     current-vocab scan-object >>help changed-definition ;