diff options
author | Damien Doligez <damien.doligez@inria.fr> | 2021-01-13 13:22:54 +0100 |
---|---|---|
committer | Damien Doligez <damien.doligez@inria.fr> | 2021-04-28 17:45:22 +0200 |
commit | ebddee737b3f532eb77b127450598c2eb1afd75c (patch) | |
tree | 9f0c4fe512289a9afae6b084d632a66608b36f4b /ocamltest/tsl_lexer.mll | |
parent | 85c201202138709fd31e6fcb2faab5f1d5679708 (diff) | |
download | ocaml-ebddee737b3f532eb77b127450598c2eb1afd75c.tar.gz |
ocamltest: allow TEST block at end of file
Diffstat (limited to 'ocamltest/tsl_lexer.mll')
-rw-r--r-- | ocamltest/tsl_lexer.mll | 2 |
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 } |