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


##########
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:
   It seems that the idea of "context-depending tokenizer without token 
cloning" is not compatible with the possibility to have an iterator. I'll try 
to consider another solution to our problem.



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