summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
authorArmaël Guéneau <armael.gueneau@ens-lyon.fr>2018-10-07 11:47:38 +0200
committerArmaël Guéneau <armael.gueneau@ens-lyon.fr>2018-10-19 23:38:25 +0200
commitf954160614f348bb81b43b751889cbfb99e06f48 (patch)
treec657face62d17dd197aa667f62b2745381254bb2 /driver
parentce17ca1d52499a2c83d952dae3ff54d3e027975a (diff)
downloadocaml-f954160614f348bb81b43b751889cbfb99e06f48.tar.gz
Add source highlighting for errors & warnings in batch mode
Diffstat (limited to 'driver')
-rw-r--r--driver/pparse.ml1
1 files changed, 1 insertions, 0 deletions
diff --git a/driver/pparse.ml b/driver/pparse.ml
index 54f498f848..0b08b8c801 100644
--- a/driver/pparse.ml
+++ b/driver/pparse.ml
@@ -184,6 +184,7 @@ let file_aux ~tool_name inputfile (type a) parse_fun invariant_fun
seek_in ic 0;
let lexbuf = Lexing.from_channel ic in
Location.init lexbuf inputfile;
+ Location.input_lexbuf := Some lexbuf;
Profile.record_call "parser" (fun () -> parse_fun lexbuf)
end
with x -> close_in ic; raise x