home
/
code
/
tiger.ml.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Centralize error message construction
[tiger.ml.git]
/
compiler
/
src
/
lib
/
tiger
/
tiger_position.ml
diff --git
a/compiler/src/lib/tiger/tiger_position.ml
b/compiler/src/lib/tiger/tiger_position.ml
index
01c230c
..
217de6b
100644
(file)
--- a/
compiler/src/lib/tiger/tiger_position.ml
+++ b/
compiler/src/lib/tiger/tiger_position.ml
@@
-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.028426 seconds
and
4
git commands to generate.