Put cut around string parsing
This commit is contained in:
parent
a9afb6d24e
commit
2ba0fb4869
@ -842,7 +842,14 @@ fn bare_string_literal(input: Span) -> ParseResult<String> {
|
||||
alt((value("\\", tag("\\")), value("\"", tag("\"")), value("\n", tag("n")), value("\t", tag("t"))));
|
||||
alt((
|
||||
map(tag(r#""""#), |_| String::new()),
|
||||
delimited(char('"'), escaped_transform(none_of(r#""\"#), '\\', string_escape_transforms), char('"')),
|
||||
preceded(
|
||||
peek(char('"')),
|
||||
cut(delimited(
|
||||
char('"'),
|
||||
escaped_transform(none_of(r#""\"#), '\\', string_escape_transforms),
|
||||
char('"'),
|
||||
)),
|
||||
),
|
||||
))(input)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user