(&mut self)
| 1604 | } |
| 1605 | |
| 1606 | fn synchronize(&mut self) { |
| 1607 | while !self.is_at_end() { |
| 1608 | match self.peek().kind { |
| 1609 | TokenKind::Punctuation( |
| 1610 | PunctuationKind::SemiColon |
| 1611 | | PunctuationKind::Hash |
| 1612 | | PunctuationKind::RightBrace |
| 1613 | | PunctuationKind::RightParen, |
| 1614 | ) => { |
| 1615 | return; |
| 1616 | } |
| 1617 | |
| 1618 | TokenKind::Keyword( |
| 1619 | KeywordKind::Def |
| 1620 | | KeywordKind::Type |
| 1621 | | KeywordKind::For |
| 1622 | | KeywordKind::If |
| 1623 | | KeywordKind::Let |
| 1624 | | KeywordKind::While, |
| 1625 | ) => return, |
| 1626 | |
| 1627 | TokenKind::EndOfFile => return, |
| 1628 | |
| 1629 | _ => { |
| 1630 | self.advance(); |
| 1631 | } |
| 1632 | } |
| 1633 | } |
| 1634 | } |
| 1635 | |
| 1636 | fn parse_destructure_variables(&mut self) -> Result<Statement, ParseError> { |
| 1637 | let mut names: Vec<Token> = Vec::new(); |
no test coverage detected