]> gitweb.factorcode.org Git - factor.git/commitdiff
effects.parser: allow generic methods not in current vocabs.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 31 Mar 2016 00:21:58 +0000 (17:21 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 31 Mar 2016 00:21:58 +0000 (17:21 -0700)
core/effects/parser/parser.factor
core/parser/parser-tests.factor

index 7fd84c0ec963af0965fdbaadf78c9c3dc31e801e..398d4af5a14d7b61768ba6e62c8b9d7f65c5d137 100644 (file)
@@ -1,7 +1,8 @@
 ! Copyright (C) 2008, 2010 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: arrays combinators continuations effects kernel lexer
-make parser sequences sets splitting vocabs.parser words ;
+USING: accessors arrays combinators continuations effects kernel
+lexer make namespaces parser sequences sets splitting
+vocabs.parser words ;
 IN: effects.parser
 
 DEFER: parse-effect
@@ -57,11 +58,11 @@ CONSTANT: in-definition HS{ }
 ERROR: can't-nest-definitions word ;
 
 : set-in-definition ( -- )
-    current-vocab in-definition ?adjoin
+    manifest get current-vocab>> t or in-definition ?adjoin
     [ last-word can't-nest-definitions ] unless ;
 
 : unset-in-definition ( -- )
-    current-vocab in-definition delete ;
+    manifest get current-vocab>> t or in-definition delete ;
 
 : with-definition ( quot -- )
     [ set-in-definition ] prepose [ unset-in-definition ] [ ] cleanup ; inline
index 301225cdbb7e10b55a4c4b2aa4dd1ea4b0682347..e60333519c90e4a7e344f3394b659cb8b4df70c1 100644 (file)
@@ -251,7 +251,7 @@ DEFER: foo
 ] unit-test
 
 { } [
-    "IN: azz2 USE: azz M: my-class a-generic ;"
+    "USE: azz M: my-class a-generic ;"
     <string-reader> "azz-2" parse-stream drop
 ] unit-test
 
@@ -261,7 +261,7 @@ DEFER: foo
 ] unit-test
 
 { } [
-    "IN: azz-2 USE: azz USE: math M: integer a-generic ;"
+    "USE: azz USE: math M: integer a-generic ;"
     <string-reader> "azz-2" parse-stream drop
 ] unit-test