]> gitweb.factorcode.org Git - factor.git/commitdiff
locals.parser: use with-variables instead of with-scope.
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 6 Dec 2016 00:00:37 +0000 (16:00 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 6 Dec 2016 00:00:37 +0000 (16:00 -0800)
basis/locals/parser/parser.factor

index 8f963cc4bc7da3b7eb7536cd7adb6a914f2472cb..9cd29f28d009c12ad4f8ac9226b90381d0cd7f82 100644 (file)
@@ -32,11 +32,12 @@ ERROR: invalid-local-name name ;
 SINGLETON: lambda-parser
 
 : with-lambda-scope ( assoc reader-quot: ( -- quot ) -- quot )
-    '[
-        in-lambda? on
-        lambda-parser quotation-parser set
+    H{
+        { in-lambda? t }
+        { quotation-parser lambda-parser }
+    } swap '[
         [ use-words @ ] [ unuse-words ] bi
-    ] with-scope ; inline
+    ] with-variables ; inline
 
 : (parse-lambda) ( assoc -- quot )
     [ \ ] parse-until >quotation ] with-lambda-scope ;