Kahlan\Jit\TokenStream::_skip PHP Method

_skip() protected method

Skips elements until an element doesn't match the elements in the passed array.
protected _skip ( array $skips ) : The
$skips array The elements array to skip.
return The skipped string.
    protected function _skip($skips)
    {
        $skipped = '';
        $count = $this->count();
        while ($this->_current < $count) {
            if (!isset($skips[$this->_data[$this->_current][0]])) {
                break;
            }
            $skipped .= $this->_data[$this->_current][1];
            $this->_current++;
        }
        return $skipped;
    }