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> {
|
||||
println!("BARE STRING: {}", input.fragment());
|
||||
let string_escape_transforms =
|
||||
alt((value("\\", tag("\\")), value("\"", tag("\"")), value("\n", tag("n")), value("\t", tag("t"))));
|
||||
alt((
|
||||
map(tag(r#""""#), |_| String::new()),
|
||||
map(
|
||||
tuple((
|
||||
char('"'),
|
||||
escaped_transform(none_of(r#""\"#), '\\', string_escape_transforms),
|
||||
char('"'),
|
||||
)),
|
||||
|(_, s, _)| s,
|
||||
),
|
||||
delimited(char('"'), escaped_transform(none_of(r#""\"#), '\\', string_escape_transforms), char('"'))
|
||||
))(input)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user