(&mut self)
| 4519 | } |
| 4520 | |
| 4521 | fn parse_create_cluster(&mut self) -> Result<Statement<Raw>, ParserError> { |
| 4522 | let name = self.parse_identifier()?; |
| 4523 | // For historical reasons, the parentheses around the options can be |
| 4524 | // omitted. |
| 4525 | let paren = self.consume_token(&Token::LParen); |
| 4526 | let options = self.parse_comma_separated(Parser::parse_cluster_option)?; |
| 4527 | if paren { |
| 4528 | self.expect_token(&Token::RParen)?; |
| 4529 | } |
| 4530 | |
| 4531 | let features = if self.parse_keywords(&[FEATURES]) { |
| 4532 | self.expect_token(&Token::LParen)?; |
| 4533 | let features = self.parse_comma_separated(Parser::parse_cluster_feature)?; |
| 4534 | self.expect_token(&Token::RParen)?; |
| 4535 | features |
| 4536 | } else { |
| 4537 | Vec::new() |
| 4538 | }; |
| 4539 | |
| 4540 | Ok(Statement::CreateCluster(CreateClusterStatement { |
| 4541 | name, |
| 4542 | options, |
| 4543 | features, |
| 4544 | })) |
| 4545 | } |
| 4546 | |
| 4547 | fn parse_cluster_option_name(&mut self) -> Result<ClusterOptionName, ParserError> { |
| 4548 | let option = self.expect_one_of_keywords(&[ |
no test coverage detected