Skip to content

Commit 0e515bc

Browse files
committed
Floating docstrings are also extra text
git-svn-id: http://caml.inria.fr/svn/ocaml/version/4.02@16161 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1 parent 779f8d0 commit 0e515bc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

parsing/lexer.mll

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -708,13 +708,17 @@ and skip_sharp_bang = parse
708708
set_pre_extra_docstrings pre_pos (List.rev a)
709709
| Before(a, f, b), (NoLine | NewLine) ->
710710
set_post_docstrings post_pos (List.rev a);
711-
set_post_extra_docstrings post_pos (List.rev b);
711+
set_post_extra_docstrings post_pos
712+
(List.rev_append f (List.rev b));
712713
set_floating_docstrings pre_pos (List.rev f);
713714
set_pre_extra_docstrings pre_pos (List.rev a);
714715
set_pre_docstrings pre_pos b
715716
| Before(a, f, b), BlankLine ->
716717
set_post_docstrings post_pos (List.rev a);
717-
set_floating_docstrings pre_pos (List.rev_append f (List.rev b));
718+
set_post_extra_docstrings post_pos
719+
(List.rev_append f (List.rev b));
720+
set_floating_docstrings pre_pos
721+
(List.rev_append f (List.rev b));
718722
set_pre_extra_docstrings pre_pos (List.rev a)
719723
in
720724
let rec loop lines docs lexbuf =

0 commit comments

Comments
 (0)