]> gitweb.factorcode.org Git - factor.git/commitdiff
help.syntax: short circuit earlier when search returns f.
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 15 Dec 2020 17:19:35 +0000 (09:19 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 15 Dec 2020 17:19:35 +0000 (09:19 -0800)
basis/help/syntax/syntax.factor

index e71d383c1f1f0cbc8f19f5190ece6e6cb86eb7d8..f6bce7d90f4a8d6a9f9f03a22961797ce9a61750 100644 (file)
@@ -10,11 +10,12 @@ IN: help.syntax
 
 :: parse-help-token ( end -- str/obj/f )
     ?scan-token dup search {
+        { [ dup not ] [ drop ] }
         { [ dup end eq? ] [ 2drop f ] }
         { [ dup parsing-word? ] [
             nip V{ } clone swap execute-parsing first
             dup wrapper? [ wrapped>> \ $link swap 2array ] when ] }
-        { [ dup [ vocabulary>> "help.markup" = ] when ] [ nip ] }
+        { [ dup vocabulary>> "help.markup" = ] [ nip ] }
         [ drop ]
     } cond ;