Fixes
This commit is contained in:
parent
7ae7eaa07b
commit
8365690860
@ -689,19 +689,11 @@ fn string_literal(input: Span) -> ParseResult<ExpressionKind> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn bare_string_literal(input: Span) -> ParseResult<String> {
|
fn bare_string_literal(input: Span) -> ParseResult<String> {
|
||||||
println!("BARE STRING: {}", input.fragment());
|
|
||||||
let string_escape_transforms =
|
let string_escape_transforms =
|
||||||
alt((value("\\", tag("\\")), value("\"", tag("\"")), value("\n", tag("n")), value("\t", tag("t"))));
|
alt((value("\\", tag("\\")), value("\"", tag("\"")), value("\n", tag("n")), value("\t", tag("t"))));
|
||||||
alt((
|
alt((
|
||||||
map(tag(r#""""#), |_| String::new()),
|
map(tag(r#""""#), |_| String::new()),
|
||||||
map(
|
delimited(char('"'), escaped_transform(none_of(r#""\"#), '\\', string_escape_transforms), char('"'))
|
||||||
tuple((
|
|
||||||
char('"'),
|
|
||||||
escaped_transform(none_of(r#""\"#), '\\', string_escape_transforms),
|
|
||||||
char('"'),
|
|
||||||
)),
|
|
||||||
|(_, s, _)| s,
|
|
||||||
),
|
|
||||||
))(input)
|
))(input)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user