]> gitweb.factorcode.org Git - factor.git/commitdiff
lexer: change with-lexer to use with-variable.
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 30 Jun 2015 02:29:45 +0000 (19:29 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 30 Jun 2015 02:31:24 +0000 (19:31 -0700)
core/lexer/lexer.factor

index 1dbcb0e2d3a4821595c8353ef45f75cbc2447a56..55ae061633b9e3d3eaf0da6dc5aa20d078ebe01c 100644 (file)
@@ -178,4 +178,5 @@ M: lexer-error error-line [ error>> error-line ] [ line>> ] bi or ;
     [ last parsing-word-lexer-dump ] if-empty ;
 
 : with-lexer ( lexer quot -- newquot )
-    [ lexer set ] dip [ <lexer-error> rethrow ] recover ; inline
+    [ [ <lexer-error> rethrow ] recover ] curry
+    [ lexer ] dip with-variable ; inline