]> gitweb.factorcode.org Git - factor.git/commitdiff
vocabs: support qualified lookups in no-word restarts.
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 29 Mar 2016 19:37:24 +0000 (12:37 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 29 Mar 2016 20:03:59 +0000 (13:03 -0700)
core/vocabs/vocabs.factor

index 66f706eac72c9489b9f83549eb822f53f30c2b36..29530f89968025206c39971042803539dd2c891e 100644 (file)
@@ -100,9 +100,12 @@ ERROR: no-vocab name ;
     dictionary get values [ vocab-words ] map concat ;
 
 : words-named ( str -- seq )
-    dictionary get values
-    [ vocab-words-assoc at ] with map
-    sift ;
+    dictionary get
+    [ values [ vocab-words-assoc at ] with map sift ]
+    [
+        [ ":" split1 swap ] dip at
+        [ vocab-words-assoc at suffix ] [ drop ] if*
+    ] 2bi ;
 
 : child-vocab? ( prefix name -- ? )
     swap [ drop t ] [