method print_comments_before =
                  fun loc f ->
                    match mode with
                    | `comments ->
                        do_print_comments_before loc
                          (fun c _ -> pp f "%s@ " c)
                          (CommentFilter.take_stream comment_filter)
                    | `loc_and_comments ->
                        let () = pp f "(*loc: %a*)@ " Loc.dump loc
                        in
                          do_print_comments_before loc
                            (fun s -> pp f "%s(*comm_loc: %a*)@ " s Loc.dump)
                            (CommentFilter.take_stream comment_filter)
                    | _ -> ()