Skip to content

Commit

Permalink
refactor(pkg): buffer string reading (#11301)
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <[email protected]>
  • Loading branch information
rgrinberg authored Feb 4, 2025
1 parent f493a87 commit 9108dd7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vendor/opam-file-format/opamLexer.mll
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ rule token = parse

and string b = parse
| '\"' { () }
| [^ '\\' '"' '\r' '\n']+ as s { Buffer.add_string b s; string b lexbuf }
| eol { newline lexbuf ;
Buffer.add_char b '\n' ; string b lexbuf }
| '\\' { (match escape lexbuf with
Expand All @@ -161,6 +162,7 @@ and string b = parse

and string_triple b = parse
| "\"\"\"" { () }
| [^ '\\' '"' '\r' '\n']+ as s { Buffer.add_string b s; string_triple b lexbuf }
| eol { newline lexbuf ;
Buffer.add_char b '\n' ; string_triple b lexbuf }
| '\\' { (match escape lexbuf with
Expand Down

0 comments on commit 9108dd7

Please sign in to comment.