summaryrefslogtreecommitdiff
path: root/ocamltest/tsl_lexer.mll
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez@inria.fr>2021-01-13 13:22:54 +0100
committerDamien Doligez <damien.doligez@inria.fr>2021-04-28 17:45:22 +0200
commitebddee737b3f532eb77b127450598c2eb1afd75c (patch)
tree9f0c4fe512289a9afae6b084d632a66608b36f4b /ocamltest/tsl_lexer.mll
parent85c201202138709fd31e6fcb2faab5f1d5679708 (diff)
downloadocaml-ebddee737b3f532eb77b127450598c2eb1afd75c.tar.gz
ocamltest: allow TEST block at end of file
Diffstat (limited to 'ocamltest/tsl_lexer.mll')
-rw-r--r--ocamltest/tsl_lexer.mll2
1 files changed, 2 insertions, 0 deletions
diff --git a/ocamltest/tsl_lexer.mll b/ocamltest/tsl_lexer.mll
index 21a2038dcf..e099336609 100644
--- a/ocamltest/tsl_lexer.mll
+++ b/ocamltest/tsl_lexer.mll
@@ -36,6 +36,8 @@ rule token = parse
| "*/" { TSL_END_C_STYLE }
| "(*" blank* "TEST" { TSL_BEGIN_OCAML_STYLE }
| "*)" { TSL_END_OCAML_STYLE }
+ | _ * "(*" blank* "TEST" { TSL_BEGIN_OCAML_STYLE_AT_EOF }
+ | "*)" (blank | newline) * eof { TSL_END_OCAML_STYLE_AT_EOF }
| "," { COMMA }
| '*'+ { TEST_DEPTH (String.length (Lexing.lexeme lexbuf)) }
| "+=" { PLUSEQUAL }