Skip to content

Commit 455e164

Browse files
author
aleksei.p
committed
update
1 parent 190b44a commit 455e164

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/dialect/snowflake.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -644,11 +644,7 @@ pub fn parse_create_stage(
644644
// [ comment ]
645645
if parser.parse_keyword(Keyword::COMMENT) {
646646
parser.expect_token(&Token::Eq)?;
647-
comment = Some(match parser.next_token().token {
648-
Token::SingleQuotedString(word) => Ok(word),
649-
Token::DollarQuotedString(word) => Ok(word.value),
650-
_ => parser.expected("a comment statement", parser.peek_token()),
651-
}?)
647+
comment = Some(parser.parse_comment_value()?);
652648
}
653649

654650
Ok(Statement::CreateStage {

src/parser/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6933,7 +6933,7 @@ impl<'a> Parser<'a> {
69336933
Ok(comment)
69346934
}
69356935

6936-
fn parse_comment_value(&mut self) -> Result<String, ParserError> {
6936+
pub fn parse_comment_value(&mut self) -> Result<String, ParserError> {
69376937
let next_token = self.next_token();
69386938
let value = match next_token.token {
69396939
Token::SingleQuotedString(str) => str,

0 commit comments

Comments
 (0)