src/Luminous/Utils/SassParser.php
public function nextIs($tokenName, $ignoreWhitespace = false)
    {
        $i = $this->index+1;
        $len = count($this->tokens);
        while ($i < $len) {
            $tok = $this->tokens[$i][0];
            if ($ignoreWhitespace && $tok === 'WHITESPACE') {
                $i++;
            } else {
                return $tok === $tokenName;
            }
        }
        return false;
    }
public function nextIs($tokenName, $ignoreWhitespace = false)
    {
        $i = $this->index+1;
        $len = count($this->tokens);
        while ($i < $len) {
            $tok = $this->tokens[$i][0];
            if ($ignoreWhitespace && $tok === 'WHITESPACE') {
                $i++;
            } else {
                return $tok === $tokenName;
            }
        }
        return false;
    }
public function nextIs ( $ tokenName , $ ignoreWhitespace = false ) { $ i = $ this -> index + 1 ; $ len = count ( $ this -> tokens ) ; while ( $ i < $ len ) { $ tok = $ this -> tokens [ $ i ] [ 0 ] ; if ( $ ignoreWhitespace && $ tok === 'WHITESPACE' ) { $ i ++ ; } else { return $ tok === $ tokenName ; } } return false ; }
Returns true if the next token is the given token name
optionally skipping whitespace
Returns true if the next token is the given token name optionally skipping whitespace