git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7155 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Michel Mauny 2005-10-21 15:51:42 +00:00
parent ddb16a8326
commit f0e54ce934
1 changed files with 6 additions and 6 deletions

View File

@ -83,9 +83,9 @@ value wrap f shfn lb =
lb.lex_curr_pos := lb.lex_curr_pos + 1;
Some c
}
})
in
try f cs with
}) in
let parse_fun = f lb.lex_curr_p in
try parse_fun cs with
[ Exc_located _ (Sys.Break as x) -> raise x
| End_of_file as x -> raise x
| x ->
@ -108,7 +108,7 @@ value wrap f shfn lb =
value first_phrase = ref True;
value toplevel_phrase cs =
value toplevel_phrase pos cs =
do {
if Sys.interactive.val && first_phrase.val then do {
first_phrase.val := False;
@ -121,7 +121,7 @@ value toplevel_phrase cs =
}
;
value use_file cs =
value use_file pos cs =
let v = Pcaml.input_file.val in
let (bolpos,lnum,fname) = Pcaml.position.val in
let restore =
@ -132,7 +132,7 @@ value use_file cs =
} in
do {
Pcaml.input_file.val := Toploop.input_name.val;
bolpos.val := 0; lnum.val := 1; fname.val := Toploop.input_name.val;
bolpos.val := pos.pos_bol; lnum.val := pos.pos_lnum; fname.val := Toploop.input_name.val;
try
let (pl0, eoi) =
loop () where rec loop () =