parser: split parse-file into (parse-file).
parent
7711c2720f
commit
18bbe6292a
|
@ -222,12 +222,17 @@ print-use-hook [ [ ] ] initialize
|
||||||
: parse-file-restarts ( path -- restarts )
|
: parse-file-restarts ( path -- restarts )
|
||||||
"Load " " again" surround t 2array 1array ;
|
"Load " " again" surround t 2array 1array ;
|
||||||
|
|
||||||
: parse-file ( path -- quot )
|
: (parse-file) ( path -- quot )
|
||||||
[
|
[
|
||||||
[ parsing-file ] keep
|
dup [
|
||||||
[ utf8 <file-reader> ] keep
|
utf8 file-lines dup parse-fresh
|
||||||
parse-stream
|
[ nip ] [ finish-parsing ] 2bi
|
||||||
] [
|
forget-smudged
|
||||||
|
] with-source-file
|
||||||
|
] with-compilation-unit ;
|
||||||
|
|
||||||
|
: parse-file ( path -- quot )
|
||||||
|
[ (parse-file) ] [
|
||||||
over parse-file-restarts rethrow-restarts
|
over parse-file-restarts rethrow-restarts
|
||||||
drop parse-file
|
drop parse-file
|
||||||
] recover ;
|
] recover ;
|
||||||
|
|
Loading…
Reference in New Issue