aharpervc commented on code in PR #1809:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/1809#discussion_r2052788247
##########
src/parser/mod.rs:
##########
@@ -15064,6 +15117,38 @@ impl<'a> Parser<'a> {
}))
}
+ /// Parse [Statement::Go]
+ fn parse_go(&mut self) -> Result<Statement, ParserError> {
+ self.expect_previously_only_whitespace_until_newline()?;
+
+ let count = loop {
+ // using this peek function because we want to halt this statement
parsing upon newline
Review Comment:
Done 👍
##########
src/parser/mod.rs:
##########
@@ -4055,6 +4070,44 @@ impl<'a> Parser<'a> {
)
}
+ /// Look backwards in the token stream and expect that there was only
whitespace tokens until the previous newline
+ pub fn expect_previously_only_whitespace_until_newline(&mut self) ->
Result<(), ParserError> {
Review Comment:
Done 👍
--
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]