(
escaped: bool,
)
| 589 | } |
| 590 | |
| 591 | pub fn quoted_string<'a>( |
| 592 | escaped: bool, |
| 593 | ) -> impl Parser<'a, ParserInput<'a>, String, ParserError<'a>> { |
| 594 | choice(( |
| 595 | multi_quoted_string(&'"', escaped), |
| 596 | multi_quoted_string(&'\'', escaped), |
| 597 | )) |
| 598 | .map(|chars| chars.into_iter().collect()) |
| 599 | } |
| 600 | |
| 601 | // Helper function to parse escape sequences |
| 602 | // Takes the input and the quote character, returns the escaped character |