askalt commented on code in PR #2184:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/2184#discussion_r2773732242


##########
src/tokenizer.rs:
##########
@@ -856,6 +856,26 @@ pub struct Tokenizer<'a> {
     unescape: bool,
 }
 
+/// Passed into [`Tokenizer::next_token`] as in some situations tokenization
+/// is context dependent. The separate enum is used to be able to not clone
+/// the previous token during [`TokenWithLocationIter`] iteration.
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+enum PrevTokenKind {

Review Comment:
   Did it to avoid token cloning, as it may be noticeable when a long SQL like 
`insert into values ... many strings` is parsed.



-- 
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]

Reply via email to