]> gitweb.factorcode.org Git - factor.git/commitdiff
Revert "parser: split parse-file into (parse-file)."
authorJohn Benediktsson <mrjbq7@gmail.com>
Sat, 15 Aug 2015 23:05:41 +0000 (16:05 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sat, 15 Aug 2015 23:05:41 +0000 (16:05 -0700)
This reverts commit 18bbe6292afc9fa1add305c09ac58644e74e4fc4.

core/parser/parser.factor

index 20c1dd5fdb8cf4d145be23dbfdb327be0ae51beb..1bda0e48f7113dce89a4f1a46bb519ccf2e593de 100644 (file)
@@ -222,17 +222,12 @@ print-use-hook [ [ ] ] initialize
 : parse-file-restarts ( path -- restarts )
     "Load " " again" surround t 2array 1array ;
 
-: (parse-file) ( path -- quot )
-    [
-        dup [
-            utf8 file-lines dup parse-fresh
-            [ nip ] [ finish-parsing ] 2bi
-            forget-smudged
-        ] with-source-file
-    ] with-compilation-unit ;
-
 : parse-file ( path -- quot )
-    [ (parse-file) ] [
+    [
+        [ parsing-file ] keep
+        [ utf8 <file-reader> ] keep
+        parse-stream
+    ] [
         over parse-file-restarts rethrow-restarts
         drop parse-file
     ] recover ;