src/Luminous/Utils/SassParser.php
public function nextSequence($sequence, $ignore = array())
    {
        $i = $this->index+1;
        $len = count($this->tokens);
        $seqLen = count($sequence);
        $seq = 0;
        $seqStart = 0;
        while ($i < $len) {
            $tok = $this->tokens[$i][0];
            if ($tok === $sequence[$seq]) {
                if ($seq === 0) {
                    $seqStart = $i;
                }
                $seq++;
                $i++;
                if ($seq === $seqLen) {
                    return $seqStart;
                }
            } else {
                if (in_array($tok, $ignore)) {
                } else {
                    $seq = 0;
                }
                $i++;
            }
        }
        return $len;
    }
public function nextSequence($sequence, $ignore = array())
    {
        $i = $this->index+1;
        $len = count($this->tokens);
        $seqLen = count($sequence);
        $seq = 0;
        $seqStart = 0;
        while ($i < $len) {
            $tok = $this->tokens[$i][0];
            if ($tok === $sequence[$seq]) {
                if ($seq === 0) {
                    $seqStart = $i;
                }
                $seq++;
                $i++;
                if ($seq === $seqLen) {
                    return $seqStart;
                }
            } else {
                if (in_array($tok, $ignore)) {
                } else {
                    $seq = 0;
                }
                $i++;
            }
        }
        return $len;
    }
public function nextSequence ( $ sequence , $ ignore = array ( ) ) { $ i = $ this -> index + 1 ; $ len = count ( $ this -> tokens ) ; $ seqLen = count ( $ sequence ) ; $ seq = 0 ; $ seqStart = 0 ; while ( $ i < $ len ) { $ tok = $ this -> tokens [ $ i ] [ 0 ] ; if ( $ tok === $ sequence [ $ seq ] ) { if ( $ seq === 0 ) { $ seqStart = $ i ; } $ seq ++ ; $ i ++ ; if ( $ seq === $ seqLen ) { return $ seqStart ; } } else { if ( in_array ( $ tok , $ ignore ) ) { } else { $ seq = 0 ; } $ i ++ ; } } return $ len ; }
Returns the index of the next match of the sequence of tokens
given, optionally ignoring ertain tokens
Returns the index of the next match of the sequence of tokens given optionally ignoring ertain tokens