exception T of string
-let exn ~pos ~msg =
+let exn ~pos msg =
let msg = Printf.sprintf "Error: %s. In %s." msg (Pos.to_string pos) in
raise (T msg)
exception T of string
-val exn : pos:Tiger_position.t -> msg:string -> 'a
+val exn : pos:Tiger_position.t -> string -> 'a
program:
| exp EOF { $1 }
- | error {Tiger_error.exn ~pos:(pos ()) ~msg:"invalid syntax"}
+ | error {Tiger_error.exn "invalid syntax" ~pos:(pos ())}
;
exp: