aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorKarl Palmskog2020-01-13 14:59:22 -0600
committerKarl Palmskog2020-01-14 07:20:18 -0600
commit6b05ae1c447680cd4ed1332c0c8b4f0e24b33f03 (patch)
treeed16a233ba03902ac92f6799dfb539bd1398967a /tools
parent507141cb978ae9383b79e4a6af6ab968cb8d540e (diff)
[coqdoc] Fix #11353: coqdoc -g omits all sentences with decorations
Diffstat (limited to 'tools')
-rw-r--r--tools/coqdoc/cpretty.mll8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/coqdoc/cpretty.mll b/tools/coqdoc/cpretty.mll
index a44ddf7467..13913cabc3 100644
--- a/tools/coqdoc/cpretty.mll
+++ b/tools/coqdoc/cpretty.mll
@@ -547,6 +547,9 @@ rule coq_bol = parse
comment lexbuf
end else skipped_comment lexbuf in
if eol then coq_bol lexbuf else coq lexbuf }
+ | space* "#[" {
+ let eol = begin backtrack lexbuf; body_bol lexbuf end
+ in if eol then coq_bol lexbuf else coq lexbuf }
| eof
{ () }
| _
@@ -643,6 +646,11 @@ and coq = parse
Output.ident s None;
let eol = body lexbuf in
if eol then coq_bol lexbuf else coq lexbuf }
+ | "#["
+ { ignore(lexeme lexbuf);
+ Output.char '#'; Output.char '[';
+ let eol = body lexbuf in
+ if eol then coq_bol lexbuf else coq lexbuf }
| space+ { Output.char ' '; coq lexbuf }
| eof
{ () }