diff options
author | Damien Doligez <damien.doligez-inria.fr> | 2012-02-10 09:08:02 +0000 |
---|---|---|
committer | Damien Doligez <damien.doligez-inria.fr> | 2012-02-10 09:08:02 +0000 |
commit | f2831338755aae920d79d29a1f16661c9b5cc63f (patch) | |
tree | 7085a30569aabb5fb40b793d28688f9104634908 /stdlib/lexing.mli | |
parent | b392c77aa664f9b12488175f250e170fc38303ea (diff) |
PR#5159: better documentation of type "position"
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12144 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'stdlib/lexing.mli')
-rw-r--r-- | stdlib/lexing.mli | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/stdlib/lexing.mli b/stdlib/lexing.mli index 6008e127b..2591b5c18 100644 --- a/stdlib/lexing.mli +++ b/stdlib/lexing.mli @@ -26,9 +26,12 @@ type position = { (** A value of type [position] describes a point in a source file. [pos_fname] is the file name; [pos_lnum] is the line number; [pos_bol] is the offset of the beginning of the line (number - of characters between the beginning of the file and the beginning + of characters between the beginning of the lexbuf and the beginning of the line); [pos_cnum] is the offset of the position (number of - characters between the beginning of the file and the position). + characters between the beginning of the lexbuf and the position). + The difference between [pos_cnum] and [pos_bol] is the character + offset within the line (i.e. the column number, assuming each + character is one column wide). See the documentation of type [lexbuf] for information about how the lexing engine will manage positions. |