summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ocamldoc/odoc_lexer.mll6
-rw-r--r--ocamldoc/odoc_ocamlhtml.mll4
-rw-r--r--ocamldoc/odoc_text_lexer.mll6
3 files changed, 12 insertions, 4 deletions
diff --git a/ocamldoc/odoc_lexer.mll b/ocamldoc/odoc_lexer.mll
index 7f06d933a..acf7b4bd3 100644
--- a/ocamldoc/odoc_lexer.mll
+++ b/ocamldoc/odoc_lexer.mll
@@ -216,9 +216,11 @@ and special_comment = parse
description := remove_blanks s;
reset_string_buffer ();
let len = String.length (Lexing.lexeme lexbuf) in
- lexbuf.Lexing.lex_abs_pos <- lexbuf.Lexing.lex_abs_pos - len;
lexbuf.Lexing.lex_curr_pos <- lexbuf.Lexing.lex_curr_pos - len;
- lexbuf.Lexing.lex_last_pos <- lexbuf.Lexing.lex_last_pos - len;
+ lexbuf.Lexing.lex_curr_p <-
+ { lexbuf.Lexing.lex_curr_p with
+ pos_cnum = lexbuf.Lexing.lex_curr_p.pos_cnum - len
+ } ;
(* we don't increment the Odoc_comments_global.nb_chars *)
special_comment_part2 lexbuf
}
diff --git a/ocamldoc/odoc_ocamlhtml.mll b/ocamldoc/odoc_ocamlhtml.mll
index 72b26960d..12f8af370 100644
--- a/ocamldoc/odoc_ocamlhtml.mll
+++ b/ocamldoc/odoc_ocamlhtml.mll
@@ -346,6 +346,10 @@ rule token = parse
}
| "*)"
{ lexbuf.Lexing.lex_curr_pos <- lexbuf.Lexing.lex_curr_pos - 1;
+ lexbuf.Lexing.lex_curr_p <-
+ { lexbuf.Lexing.lex_curr_p with
+ pos_cnum = lexbuf.Lexing.lex_curr_p.pos_cnum - 1
+ } ;
print (Lexing.lexeme lexbuf) ;
token lexbuf
}
diff --git a/ocamldoc/odoc_text_lexer.mll b/ocamldoc/odoc_text_lexer.mll
index 6602a9868..b141c914a 100644
--- a/ocamldoc/odoc_text_lexer.mll
+++ b/ocamldoc/odoc_text_lexer.mll
@@ -671,9 +671,11 @@ rule main = parse
| end_shortcut_list
{
incr_cpts lexbuf ;
- lexbuf.Lexing.lex_abs_pos <- lexbuf.Lexing.lex_abs_pos - 1;
lexbuf.Lexing.lex_curr_pos <- lexbuf.Lexing.lex_curr_pos - 1;
- lexbuf.Lexing.lex_last_pos <- lexbuf.Lexing.lex_last_pos - 1;
+ lexbuf.Lexing.lex_curr_p <-
+ { lexbuf.Lexing.lex_curr_p with
+ pos_cnum = lexbuf.Lexing.lex_curr_p.pos_cnum - 1 ;
+ } ;
decr line_number ;
if !shortcut_list_mode then
(