Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From e32217d0c441364bf69ed5c9edbf88cea850a036 Mon Sep 17 00:00:00 2001
- From: =?UTF-8?q?Gr=C3=A9goire=20Henry?=
- <gregoire.henry@pps.univ-paris-diderot.fr>
- Date: Wed, 24 Jul 2013 12:05:20 +0200
- Subject: [PATCH] ocamldoc: better error message for 'Desc' token. Fix #6069.
- ---
- ocamldoc/odoc_lexer.mll | 5 +++++
- ocamldoc/odoc_messages.ml | 1 +
- 2 files changed, 6 insertions(+)
- diff --git a/ocamldoc/odoc_lexer.mll b/ocamldoc/odoc_lexer.mll
- index cabcfc2..e4f6174 100644
- --- a/ocamldoc/odoc_lexer.mll
- +++ b/ocamldoc/odoc_lexer.mll
- @@ -294,6 +294,11 @@ and elements = parse
- print_DEBUG2 "newline";
- elements lexbuf }
- + | "@"
- + {
- + raise (Failure (Odoc_messages.should_escape_at_sign))
- + }
- +
- | "@"lowercase+
- {
- let s = Lexing.lexeme lexbuf in
- diff --git a/ocamldoc/odoc_messages.ml b/ocamldoc/odoc_messages.ml
- index 1d80e88..92482a3 100644
- --- a/ocamldoc/odoc_messages.ml
- +++ b/ocamldoc/odoc_messages.ml
- @@ -171,6 +171,7 @@ let no_toc = "\tDo not generate table of contents "^latex_only
- let sort_modules = "\tSort the list of top modules before generating the documentation"
- let no_stop = "\tDo not stop at (**/**) comments"
- let no_custom_tags = "\n\t\tDo not allow custom @-tags"
- +let should_escape_at_sign = "\n\t\tThe character @ has a special meaning in ocamldoc comments, for commands such as @raise or @since. If you want to write a single @, you must escape it as \\@."
- let remove_stars = "\tRemove beginning blanks of comment lines, until the first '*'"
- let keep_code = "\tAlways keep code when available"
- let inverse_merge_ml_mli = "\n\t\tInverse implementations and interfaces when merging"
- --
- 1.7.10.4
Add Comment
Please, Sign In to add comment