diff options
-rw-r--r-- | Changes | 3 | ||||
-rw-r--r-- | lex/lexer.mll | 2 |
2 files changed, 4 insertions, 1 deletions
@@ -386,6 +386,9 @@ OCaml 5.1.0 used in any context where a character set is expected. (Nicolás Ojeda Bär, Martin Jambon, review by Sébastien Hinderer) +- #12147: ocamllex: Allow carriage returns at the end of line directives. + (SeungCheol Jung, review by Nicolás Ojeda Bär) + - #11718: ocamlyacc: OCaml-style comments are now supported, in addition to the C-style comments already supported. The syntax is the same as that used in OCaml code. diff --git a/lex/lexer.mll b/lex/lexer.mll index 83111badc1..ca6f170713 100644 --- a/lex/lexer.mll +++ b/lex/lexer.mll @@ -137,7 +137,7 @@ rule main = parse main lexbuf } | "#" [' ' '\t']* (['0'-'9']+ as num) [' ' '\t']* ('\"' ([^ '\010' '\013' '\"']* as name) '\"')? - [^ '\010' '\013']* '\010' + [^ '\010' '\013']* '\013'* '\010' { update_loc lexbuf name (int_of_string num); main lexbuf } |