summaryrefslogtreecommitdiffstats
path: root/ocamldoc/odoc_lexer.mll
diff options
context:
space:
mode:
Diffstat (limited to 'ocamldoc/odoc_lexer.mll')
-rw-r--r--ocamldoc/odoc_lexer.mll6
1 files changed, 4 insertions, 2 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
}