Closed gaoqiangz closed 1 year ago
Consider fix solution:
while let Some(c) = iter.next() {
match c {
'"' => return Ok(PartialToken::Token(Token::String(result))),
'\\' => result.push(parse_escape_sequence(&mut iter)?),
c => result.push(c),
}
}
Err(EvalexprError::UnmatchDoubleQuote)
Thanks for the report! I'll try out your fix.
String parsing needs check ending quote:
https://github.com/ISibboI/evalexpr/blob/bcc6a07879c983a4ef34e762626639ead23146ba/src/token/mod.rs#L252-L260
Test case: