public function moveToNext($type, callable $callback = NULL)
	{
		$delim = (array)$type;

		while($this->valid())
		{
			$token = $this->current();

			if($token->isOneOf($delim))
			{
				return $token;
			}

			if($callback !== NULL)
			{
				$callback($token);
			}

			$this->next();
		}
	}
public function moveToNext($type, callable $callback = NULL)
	{
		$delim = (array)$type;

		while($this->valid())
		{
			$token = $this->current();

			if($token->isOneOf($delim))
			{
				return $token;
			}

			if($callback !== NULL)
			{
				$callback($token);
			}

			$this->next();
		}
	}
public function moveToNext ( $ type , callable $ callback = NULL ) { $ delim = ( array ) $ type ; while ( $ this -> valid ( ) ) { $ token = $ this -> current ( ) ; if ( $ token -> isOneOf ( $ delim ) ) { return $ token ; } if ( $ callback !== NULL ) { $ callback ( $ token ) ; } $ this -> next ( ) ; } }
Move the cursor to the next occurance if the given token type.

@param mixed $type The target token type.
@param callable $callback Is invoked once for every skipped token.
@return AbstractToken or <code>NULL</code> if no token was found.
Move the cursor to the next occurance if the given token type .