Commit effe70f2 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2005-01-18 14:34:15 by afrisch] Error location with --stdin

Original author: afrisch
Date: 2005-01-18 14:34:15+00:00
parent b476d92f
......@@ -151,11 +151,10 @@ let rec compile verbose name id src =
check_loop id;
protect_op "Compile external file";
let ic =
if src = "" then stdin
if src = "" then (Location.push_source `Stream; stdin)
try open_in src
try Location.push_source (`File src); open_in src
with Sys_error _ -> raise (CannotOpen src) in
Location.push_source (`File src);
let input = Stream.of_channel ic in
let p =
try Parser.prog input
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment