aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar notin <notin@85f007b7-540e-0410-9357-904b9bb8a0f7>2006-03-27 17:02:49 +0000
committerGravatar notin <notin@85f007b7-540e-0410-9357-904b9bb8a0f7>2006-03-27 17:02:49 +0000
commitea9ccff8b51832dd7c1d9400d73e859f05806273 (patch)
tree40388627a727572abc212a1f8a5476553d4f22c2 /tools
parent7ae6a2ab344aa0d46572535ec2e0abb5251b3184 (diff)
Correction d'un bug dans Coqdoc (indentation & mots clés)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@8666 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'tools')
-rw-r--r--tools/coqdoc/pretty.mll21
1 files changed, 13 insertions, 8 deletions
diff --git a/tools/coqdoc/pretty.mll b/tools/coqdoc/pretty.mll
index 096e64a81..e9fd9c65e 100644
--- a/tools/coqdoc/pretty.mll
+++ b/tools/coqdoc/pretty.mll
@@ -325,17 +325,22 @@ rule coq_bol = parse
skip_to_dot lexbuf;
coq_bol lexbuf
end else begin
- indentation (count_spaces s);
- ident s (lexeme_start lexbuf);
- let eol= body lexbuf in
- if eol then coq_bol lexbuf else coq lexbuf
+ let s = lexeme lexbuf in
+ let nbsp = count_spaces s in
+ indentation nbsp;
+ let s = String.sub s nbsp (String.length s - nbsp) in
+ ident s (lexeme_start lexbuf + nbsp);
+ let eol= body lexbuf in
+ if eol then coq_bol lexbuf else coq lexbuf
end }
| space* gallina_kw
{ let s = lexeme lexbuf in
- indentation (count_spaces s);
- ident s (lexeme_start lexbuf);
- let eol= body lexbuf in
- if eol then coq_bol lexbuf else coq lexbuf }
+ let nbsp = count_spaces s in
+ indentation nbsp;
+ let s = String.sub s nbsp (String.length s - nbsp) in
+ ident s (lexeme_start lexbuf + nbsp);
+ let eol= body lexbuf in
+ if eol then coq_bol lexbuf else coq lexbuf }
| space* "(**" space+ "printing" space+ (identifier | token) space+
{ let tok = lexeme lexbuf in
let s = printing_token lexbuf in