support newlines
This commit is contained in:
parent
5a30902cdb
commit
69e4987d1a
1 changed files with 1 additions and 0 deletions
|
@ -43,6 +43,7 @@ and comment = parse
|
||||||
|
|
||||||
and read_string buffer = parse
|
and read_string buffer = parse
|
||||||
| '"' { Lstr (Buffer.contents buffer) }
|
| '"' { Lstr (Buffer.contents buffer) }
|
||||||
|
| '\\' 'n' { Buffer.add_string buffer "\\n"; read_string buffer lexbuf }
|
||||||
| [^ '"' '\\']+ { Buffer.add_string buffer (Lexing.lexeme lexbuf)
|
| [^ '"' '\\']+ { Buffer.add_string buffer (Lexing.lexeme lexbuf)
|
||||||
; read_string buffer lexbuf
|
; read_string buffer lexbuf
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue