Skip to content

Commit

Permalink
Fixed bug ocaml#3776
Browse files Browse the repository at this point in the history
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7155 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
  • Loading branch information
Michel Mauny authored and Michel Mauny committed Oct 21, 2005
1 parent ddb16a8 commit f0e54ce
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions camlp4/top/camlp4_top.ml
Expand Up @@ -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 ->
Expand All @@ -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;
Expand All @@ -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 =
Expand All @@ -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 () =
Expand Down

0 comments on commit f0e54ce

Please sign in to comment.