public function readSequenceToNext($type, $skipDelimiter = false)
	{
		$tokens = [];
		$delim = (array)$type;

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

			if($token->isOneOf($delim))
			{
				if(!$skipDelimiter)
				{
					$tokens[] = $token;
				}

				break;
			}

			$tokens[] = $token;

			$this->next();
		}

		return $this->createTokenSequence($tokens);
	}
public function readSequenceToNext($type, $skipDelimiter = false)
	{
		$tokens = [];
		$delim = (array)$type;

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

			if($token->isOneOf($delim))
			{
				if(!$skipDelimiter)
				{
					$tokens[] = $token;
				}

				break;
			}

			$tokens[] = $token;

			$this->next();
		}

		return $this->createTokenSequence($tokens);
	}
public function readSequenceToNext ( $ type , $ skipDelimiter = false ) { $ tokens = [ ] ; $ delim = ( array ) $ type ; while ( $ this -> valid ( ) ) { $ token = $ this -> current ( ) ; if ( $ token -> isOneOf ( $ delim ) ) { if ( ! $ skipDelimiter ) { $ tokens [ ] = $ token ; } break ; } $ tokens [ ] = $ token ; $ this -> next ( ) ; } return $ this -> createTokenSequence ( $ tokens ) ; }
Read tokens to the next occurance of the given token type and return a
token sequence containing all found tokens.

@param mixed $type
@param boolean $skipDelimiter
@return AbstractTokenSequence
Read tokens to the next occurance of the given token type and return a token sequence containing all found tokens .