If current token matches any of the types, consume and return True.
(self, *types: TokenType)
| 175 | return self.current().type == token_type |
| 176 | |
| 177 | def match(self, *types: TokenType) -> bool: |
| 178 | """If current token matches any of the types, consume and return True.""" |
| 179 | for token_type in types: |
| 180 | if self.check(token_type): |
| 181 | self.advance() |
| 182 | return True |
| 183 | return False |
| 184 | |
| 185 | def advance(self) -> Token: |
| 186 | """Consume and return the current token.""" |
no test coverage detected