alamb commented on code in PR #2075:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/2075#discussion_r2588828833
##########
src/tokenizer.rs:
##########
@@ -2188,27 +2289,71 @@ impl<'a> Tokenizer<'a> {
}
}
- fn parse_quoted_ident(&self, chars: &mut State, quote_end: char) ->
(String, Option<char>) {
+ fn parse_quoted_ident(
+ &self,
+ chars: &mut State<'a>,
+ quote_end: char,
+ ) -> Result<(String, Option<char>), TokenizerError> {
+ let (cow, last_char) = self.parse_quoted_ident_borrowed(chars,
quote_end)?;
+ Ok((cow.into_owned(), last_char))
+ }
+
+ /// Parse quoted identifier, returning borrowed slice when possible.
+ /// Returns `(Cow<'a, str>, Option<char>)` where the `Option<char>` is the
closing quote.
Review Comment:
🎉
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]