MCPcopy Create free account
hub / github.com/GPPVM-Project/SkyLC / synchronize

Method synchronize

crates/skyl-parser/src/parser.rs:1606–1634  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

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();

Callers 2

parseMethod · 0.80
parse_scopeMethod · 0.80

Calls 3

is_at_endMethod · 0.45
peekMethod · 0.45
advanceMethod · 0.45

Tested by

no test coverage detected