From 25286c5883a199cb8493d95a39d601f0f890727f Mon Sep 17 00:00:00 2001 From: notin Date: Mon, 13 Aug 2007 12:19:44 +0000 Subject: Correction (partielle) bug #1052 (coqdoc supprime les fins de ligne après un commentaire) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10074 85f007b7-540e-0410-9357-904b9bb8a0f7 --- tools/coqdoc/pretty.mll | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/coqdoc/pretty.mll b/tools/coqdoc/pretty.mll index b5098e6918..2763cb1810 100644 --- a/tools/coqdoc/pretty.mll +++ b/tools/coqdoc/pretty.mll @@ -388,7 +388,9 @@ rule coq_bol = parse coq_bol lexbuf } | space* "(*" { let eol = comment lexbuf in - if eol then coq_bol lexbuf else coq lexbuf } + if eol + then begin line_break(); coq_bol lexbuf end + else coq lexbuf } | eof { () } | _ @@ -580,7 +582,7 @@ and comments = parse (*s Skip comments *) and comment = parse - | "(*" { ignore (comment lexbuf); comment lexbuf } + | "(*" { comment lexbuf } | "*)" space* '\n'+ { true } | "*)" { false } | eof { false } @@ -605,7 +607,9 @@ and body = parse | '.' space* '\n' | '.' space* eof { char '.'; line_break(); true } | '.' space+ { char '.'; char ' '; false } | "(*" { let eol = comment lexbuf in - if eol then body_bol lexbuf else body lexbuf } + if eol + then begin line_break(); body_bol lexbuf end + else body lexbuf } | identifier { let s = lexeme lexbuf in ident s (lexeme_start lexbuf); -- cgit v1.2.3