public function skipTypes($tokenTypes, $direction = self::DIR_FORWARD)
    {
        return $this->safeMove(function () use ($tokenTypes, $direction) {
            $this->moveWithCondition(function () use ($tokenTypes) {
                return in_array($this->current()->getType(), $tokenTypes);
            }, $direction);

            return $this;
        });
    }
public function skipTypes($tokenTypes, $direction = self::DIR_FORWARD)
    {
        return $this->safeMove(function () use ($tokenTypes, $direction) {
            $this->moveWithCondition(function () use ($tokenTypes) {
                return in_array($this->current()->getType(), $tokenTypes);
            }, $direction);

            return $this;
        });
    }
public function skipTypes ( $ tokenTypes , $ direction = self :: DIR_FORWARD ) { return $ this -> safeMove ( function ( ) use ( $ tokenTypes , $ direction ) { $ this -> moveWithCondition ( function ( ) use ( $ tokenTypes ) { return in_array ( $ this -> current ( ) -> getType ( ) , $ tokenTypes ) ; } , $ direction ) ; return $ this ; } ) ; }
Traverse the token tree passing any ignored types.

@param array $tokenTypes
@param int   $direction

@return mixed
Traverse the token tree passing any ignored types .