]> gitweb.factorcode.org Git - factor.git/commitdiff
help.syntax: allow HELP: to have optional stack effect.
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 19 Oct 2011 02:14:53 +0000 (19:14 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 19 Oct 2011 02:14:53 +0000 (19:14 -0700)
basis/help/syntax/syntax.factor

index af4b9e5e1222f74f3410cca7f3f14c35d8537301..7f7bee1fe2edc0619dc87ba75b63e5c6a445511c 100644 (file)
@@ -1,13 +1,19 @@
 ! Copyright (C) 2005, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors arrays kernel parser sequences words help
-help.topics namespaces vocabs definitions compiler.units
-vocabs.parser ;
+USING: accessors arrays compiler.units definitions effects help
+help.topics kernel namespaces parser sequences vocabs
+vocabs.parser words ;
 IN: help.syntax
 
 SYNTAX: HELP:
     scan-word bootstrap-word
-    [ >link save-location ] [ [ \ ; parse-until >array ] dip set-word-help ] bi ;
+    [ >link save-location ]
+    [
+        [
+            \ ; parse-until
+            dup ?first effect? [ rest ] when >array
+        ] dip set-word-help
+    ] bi ;
 
 SYNTAX: ARTICLE:
     location [