hansott commented on code in PR #1705:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/1705#discussion_r2094095237


##########
src/tokenizer.rs:
##########
@@ -1229,14 +1229,26 @@ impl<'a> Tokenizer<'a> {
                 // operators
                 '-' => {
                     chars.next(); // consume the '-'
+
                     match chars.peek() {
                         Some('-') => {
-                            chars.next(); // consume the second '-', starting 
a single-line comment
-                            let comment = 
self.tokenize_single_line_comment(chars);
-                            
Ok(Some(Token::Whitespace(Whitespace::SingleLineComment {
-                                prefix: "--".to_owned(),
-                                comment,
-                            })))
+                            let mut is_comment = true;
+                            if 
self.dialect.requires_single_line_comment_whitespace() {
+                                is_comment = Some(' ') == 
chars.peekable.clone().nth(1);

Review Comment:
   Yes, that's right!
   
   It was still on my planning to create a follow-up PR... I was doing more 
research but then the PR got merged



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