xitep commented on code in PR #2077:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/2077#discussion_r2564977717
##########
src/tokenizer.rs:
##########
@@ -449,29 +449,6 @@ impl Word {
}
}
-#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
-#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
-#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
-pub enum Whitespace {
- Space,
- Newline,
- Tab,
- SingleLineComment { comment: String, prefix: String },
- MultiLineComment(String),
-}
Review Comment:
hello, I thought i can contribute some insight from my side:
> I still think it would be important for any kind of comment to be
preserved as tokens
i agree; one real world use-case are surely the (not yet supported) oracle
optimiser hints:
https://docs.oracle.com/cd/B13789_01/server.101/b10752/hintsref.htm
> They [comments] just should not exist in the form of whitespace.
:+1: yes, they should not! (in fact i had to introduce another type to
expose them as "comments" :confused: #2107 )
> ... can be also useful if you want to implement a formatting mechanism
that preserves comments ...
that's precisely my challenge
--
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]