File tree 2 files changed +2
-6
lines changed
2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -644,11 +644,7 @@ pub fn parse_create_stage(
644
644
// [ comment ]
645
645
if parser. parse_keyword ( Keyword :: COMMENT ) {
646
646
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 ( ) ?) ;
652
648
}
653
649
654
650
Ok ( Statement :: CreateStage {
Original file line number Diff line number Diff line change @@ -6933,7 +6933,7 @@ impl<'a> Parser<'a> {
6933
6933
Ok(comment)
6934
6934
}
6935
6935
6936
- fn parse_comment_value(&mut self) -> Result<String, ParserError> {
6936
+ pub fn parse_comment_value(&mut self) -> Result<String, ParserError> {
6937
6937
let next_token = self.next_token();
6938
6938
let value = match next_token.token {
6939
6939
Token::SingleQuotedString(str) => str,
You can’t perform that action at this time.
0 commit comments