Remove label from error raising helper
authorSiraaj Khandkar <siraaj@khandkar.net>
Tue, 11 Sep 2018 16:32:26 +0000 (12:32 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Tue, 11 Sep 2018 16:32:26 +0000 (12:32 -0400)
compiler/src/lib/tiger/tiger_error.ml
compiler/src/lib/tiger/tiger_error.mli
compiler/src/lib/tiger/tiger_parser.mly

index eb2c177..9e0d16a 100644 (file)
@@ -2,6 +2,6 @@ module Pos = Tiger_position
 
 exception T of string
 
 
 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)
   let msg = Printf.sprintf "Error: %s. In %s." msg (Pos.to_string pos) in
   raise (T msg)
index 25072b4..1f0d0ce 100644 (file)
@@ -1,3 +1,3 @@
 exception T of string
 
 exception T of string
 
-val exn : pos:Tiger_position.t -> msg:string -> 'a
+val exn : pos:Tiger_position.t -> string -> 'a
index 78d56a0..f4fbff9 100644 (file)
@@ -75,7 +75,7 @@
 
 program:
   | exp EOF { $1 }
 
 program:
   | exp EOF { $1 }
-  | error {Tiger_error.exn ~pos:(pos ()) ~msg:"invalid syntax"}
+  | error {Tiger_error.exn "invalid syntax" ~pos:(pos ())}
   ;
 
 exp:
   ;
 
 exp:
This page took 0.020867 seconds and 4 git commands to generate.