iffyio commented on code in PR #2348:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/2348#discussion_r3283077780


##########
src/parser/mod.rs:
##########
@@ -12184,6 +12184,15 @@ impl<'a> Parser<'a> {
                         after_newline = true;
                         self.next_token_no_skip();
                     }
+                    // Tokenizer includes the newline in the single line 
comment
+                    // so we need to check for it specifically here, otherwise 
the newline will
+                    // not be consumed as a separate token.
+                    Token::Whitespace(Whitespace::SingleLineComment { comment, 
.. }) => {

Review Comment:
   I'm wondering would it make sense to strip out the newline from the 
tokenizer instead? thinking that feels more like expected behavior for folks 
that rely on the content of a single line 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]

Reply via email to