Centralize error message construction
[tiger.ml.git] / compiler / src / lib / tiger / tiger_position.ml
index 01c230c..217de6b 100644 (file)
@@ -19,3 +19,15 @@ let of_lexing_positions
     ; end_char   = ecnum - ebol
     ; end_line   = eline
     }
+
+let to_string
+  { file
+  ; start_char
+  ; start_line
+  ; end_char
+  ; end_line
+  }
+=
+  Printf.sprintf
+    "file: %S, between (line/char) %d/%d and %d/%d"
+    file start_line start_char end_line end_char
This page took 0.029163 seconds and 4 git commands to generate.