summaryrefslogtreecommitdiff
path: root/ocamldoc/odoc_text_lexer.mll
diff options
context:
space:
mode:
Diffstat (limited to 'ocamldoc/odoc_text_lexer.mll')
-rw-r--r--ocamldoc/odoc_text_lexer.mll37
1 files changed, 34 insertions, 3 deletions
diff --git a/ocamldoc/odoc_text_lexer.mll b/ocamldoc/odoc_text_lexer.mll
index f21ec9ae39..f0c3738a6f 100644
--- a/ocamldoc/odoc_text_lexer.mll
+++ b/ocamldoc/odoc_text_lexer.mll
@@ -160,8 +160,8 @@ let begin_clt_ref = "{!classtype:"blank_nl | "{!classtype:"
let begin_att_ref = "{!attribute:"blank_nl | "{!attribute:"
let begin_met_ref = "{!method:"blank_nl | "{!method:"
let begin_sec_ref = "{!section:"blank_nl | "{!section:"
-
-
+let begin_mod_list_ref = "{!modules:"blank_nl | "{!modules:"
+let index_list = "{!indexlist}"
let begin_superscript = "{^"blank_nl | "{^"
let begin_subscript = "{_"blank_nl | "{_"
@@ -641,6 +641,34 @@ rule main = parse
)
}
+| begin_mod_list_ref
+ {
+ incr_cpts lexbuf ;
+ if !verb_mode or !latex_mode or !code_pre_mode or !open_brackets >= 1 then
+ Char (Lexing.lexeme lexbuf)
+ else
+ if not !ele_ref_mode then
+ (
+ ele_ref_mode := true;
+ MOD_LIST_REF
+ )
+ else
+ (
+ Char (Lexing.lexeme lexbuf)
+ )
+ }
+
+| index_list
+ {
+ incr_cpts lexbuf ;
+ if !verb_mode or !latex_mode or !code_pre_mode or !open_brackets >= 1 then
+ Char (Lexing.lexeme lexbuf)
+ else
+ if not !ele_ref_mode then
+ INDEX_LIST
+ else
+ Char (Lexing.lexeme lexbuf)
+ }
| begin_verb
{
@@ -708,7 +736,10 @@ rule main = parse
END_SHORTCUT_LIST
)
else
- BLANK_LINE
+ if !latex_mode or (!open_brackets >= 1) or !code_pre_mode or !ele_ref_mode or !verb_mode then
+ Char (Lexing.lexeme lexbuf)
+ else
+ BLANK_LINE
}
| eof { EOF }