Skip to content

Commit 9108dd7

Browse files
authored
refactor(pkg): buffer string reading (#11301)
Signed-off-by: Rudi Grinberg <[email protected]>
1 parent f493a87 commit 9108dd7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

vendor/opam-file-format/opamLexer.mll

+2
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ rule token = parse
150150

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

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

0 commit comments

Comments
 (0)