From 69e4987d1a6cde59838f308d826766d11c04e022 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 13 Dec 2022 14:36:38 +0100 Subject: [PATCH] support newlines --- lexer.mll | 1 + 1 file changed, 1 insertion(+) diff --git a/lexer.mll b/lexer.mll index bcf7eb4..670e97e 100644 --- a/lexer.mll +++ b/lexer.mll @@ -43,6 +43,7 @@ and comment = parse and read_string buffer = parse | '"' { Lstr (Buffer.contents buffer) } + | '\\' 'n' { Buffer.add_string buffer "\\n"; read_string buffer lexbuf } | [^ '"' '\\']+ { Buffer.add_string buffer (Lexing.lexeme lexbuf) ; read_string buffer lexbuf }