def METHOD_NAME(self, type: TokenType, *, reject: bool = False) -> Optional[Token]:
    if self.current.type is type:
        token = self.current
        if token.type is not TokenType.EOF:
            self.current = next(self.tokens)
        return token
    if reject:
        self.reject((type,))
    return None