(&mut self)
| 551 | } |
| 552 | |
| 553 | fn match_pattern(&mut self) { |
| 554 | let m = self.open(); |
| 555 | |
| 556 | match self.nth(0) { |
| 557 | CaseKwd => { |
| 558 | self.expect(CaseKwd); |
| 559 | self.expect(Identifier); |
| 560 | if self.at(LeftParen) { |
| 561 | self.expect(LeftParen); |
| 562 | self.expect(Identifier); |
| 563 | if self.at(Colon) { |
| 564 | self.expect(Colon); |
| 565 | let _ = self.expr(); |
| 566 | } |
| 567 | self.expect(RightParen); |
| 568 | } |
| 569 | } |
| 570 | Equal | NotEqual | IsaKwd => { |
| 571 | self.advance(); // comparison operator |
| 572 | let _ = self.expr(); |
| 573 | } |
| 574 | Less | LessEqual | Greater | GreaterEqual => { |
| 575 | self.advance(); // relational operator |
| 576 | let _ = self.expr(); |
| 577 | } |
| 578 | _ => self.advance_with_error(MatchPattern), |
| 579 | } |
| 580 | |
| 581 | self.close(m, MatchPattern); |
| 582 | } |
| 583 | |
| 584 | fn stmt_while(&mut self) { |
| 585 | assert!(self.at(WhileKwd)); |
no test coverage detected