(&mut self)
| 452 | // ── DELETE FROM ARRAY ──────────────────────────────────────── |
| 453 | |
| 454 | pub(super) fn parse_delete(&mut self) -> Result<DeleteArrayAst> { |
| 455 | let name = self.expect_ident()?; |
| 456 | self.expect_kw("WHERE")?; |
| 457 | self.expect_kw("COORDS")?; |
| 458 | self.expect_kw("IN")?; |
| 459 | self.expect(&Tok::LParen)?; |
| 460 | let mut coords = Vec::new(); |
| 461 | loop { |
| 462 | self.expect(&Tok::LParen)?; |
| 463 | let mut row = Vec::new(); |
| 464 | loop { |
| 465 | row.push(self.parse_coord_literal()?); |
| 466 | if !self.match_token(&Tok::Comma) { |
| 467 | break; |
| 468 | } |
| 469 | } |
| 470 | self.expect(&Tok::RParen)?; |
| 471 | coords.push(row); |
| 472 | if !self.match_token(&Tok::Comma) { |
| 473 | break; |
| 474 | } |
| 475 | } |
| 476 | self.expect(&Tok::RParen)?; |
| 477 | if !self.at_end() { |
| 478 | return Err(self.err(format!( |
| 479 | "trailing tokens after DELETE FROM ARRAY: {:?}", |
| 480 | self.peek() |
| 481 | ))); |
| 482 | } |
| 483 | Ok(DeleteArrayAst { name, coords }) |
| 484 | } |
| 485 | } |
| 486 | |
| 487 | fn default_domain_bounds(dtype: ArrayDimType) -> (ArrayDomainBound, ArrayDomainBound) { |
no test coverage detected