Leafo\ScssPhp\Compiler::evalSelectorPart PHP Method

evalSelectorPart() protected method

Evaluate selector part; replaces all the interpolates, stripping quotes
protected evalSelectorPart ( array $part ) : array
$part array
return array
    protected function evalSelectorPart($part)
    {
        foreach ($part as &$p) {
            if (is_array($p) && ($p[0] === Type::T_INTERPOLATE || $p[0] === Type::T_STRING)) {
                $p = $this->compileValue($p);
                // force re-evaluation
                if (strpos($p, '&') !== false || strpos($p, ',') !== false) {
                    $this->shouldEvaluate = true;
                }
            } elseif (is_string($p) && strlen($p) >= 2 && ($first = $p[0]) && ($first === '"' || $first === "'") && substr($p, -1) === $first) {
                $p = substr($p, 1, -1);
            }
        }
        return $this->flattenSelectorSingle($part);
    }
Compiler