diff options
| author | notin | 2007-08-13 12:19:44 +0000 |
|---|---|---|
| committer | notin | 2007-08-13 12:19:44 +0000 |
| commit | 25286c5883a199cb8493d95a39d601f0f890727f (patch) | |
| tree | d5deac38764274423b08354ae40765d9594479aa | |
| parent | 81b56c42726e6e6c2e1707029f3f9d9913a595d0 (diff) | |
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
| -rw-r--r-- | tools/coqdoc/pretty.mll | 10 |
1 files changed, 7 insertions, 3 deletions
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); |
