Source

ocaml-indent / lexer.mll

Diff from to

File lexer.mll

   | "(*"
       { comment_start_loc := [Location.curr lexbuf];
         comment lexbuf;
-        token lexbuf }
+        (* token lexbuf *) }
   | "(*)"
       { let loc = Location.curr lexbuf in
         Location.prerr_warning loc Warnings.Comment_start;
         comment_start_loc := [Location.curr lexbuf];
         comment lexbuf;
-        token lexbuf
+        (* token lexbuf *)
       }
   | "*)"
       { let loc = Location.curr lexbuf in
   | "*)"
       { match !comment_start_loc with
         | [] -> assert false
-        | [x] -> comment_start_loc := [];
+        | [x] -> comment_start_loc := []; lexbuf.lex_start_p <- x.Location.loc_start; COMMENT
         | _ :: l -> comment_start_loc := l;
                     comment lexbuf;
        }