support newlines

This commit is contained in:
Mylloon 2022-12-13 14:36:38 +01:00
parent 5a30902cdb
commit 69e4987d1a
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -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
}