summaryrefslogtreecommitdiff
path: root/parsing/lexer.mll
diff options
context:
space:
mode:
Diffstat (limited to 'parsing/lexer.mll')
-rw-r--r--parsing/lexer.mll4
1 files changed, 2 insertions, 2 deletions
diff --git a/parsing/lexer.mll b/parsing/lexer.mll
index a081d7c34c..b1179ed920 100644
--- a/parsing/lexer.mll
+++ b/parsing/lexer.mll
@@ -670,8 +670,8 @@ and skip_sharp_bang = parse
last_comments := (s, comment_loc) :: !last_comments;
token lexbuf
| DOC(_, loc) | FLOATING_DOC(_, loc) as tok ->
- Location.last_doc_token_loc := loc;
- tok
+ if !Location.keep_doc_token loc then tok
+ else token lexbuf
| tok ->
tok
let comments () = List.rev !last_comments