diff options
-rw-r--r-- | ocamldoc/odoc_lexer.mll | 4 | ||||
-rw-r--r-- | ocamldoc/odoc_messages.ml | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/ocamldoc/odoc_lexer.mll b/ocamldoc/odoc_lexer.mll index bb86f59f3..998d31bd1 100644 --- a/ocamldoc/odoc_lexer.mll +++ b/ocamldoc/odoc_lexer.mll @@ -293,6 +293,10 @@ and elements = parse incr Odoc_comments_global.nb_chars; print_DEBUG2 "newline"; elements lexbuf } + | "@" + { + raise (Failure (Odoc_messages.should_escape_at_sign)) + } | "@"lowercase+ { diff --git a/ocamldoc/odoc_messages.ml b/ocamldoc/odoc_messages.ml index 1d80e88b3..2d6327bba 100644 --- a/ocamldoc/odoc_messages.ml +++ b/ocamldoc/odoc_messages.ml @@ -246,6 +246,7 @@ let file_not_found_in_paths paths name = (String.concat "\n" paths) let tag_not_handled tag = "Tag @"^tag^" not handled by this generator" +let should_escape_at_sign = "The 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 bad_tree = "Incorrect tree structure." let not_a_valid_tag s = s^" is not a valid tag." let fun_without_param f = "Function "^f^" has no parameter.";; |