Leafo\ScssPhp\Parser::func PHP Метод

func() защищенный Метод

Parse function call
protected func ( &$func ) : boolean
Результат boolean
    protected function func(&$func)
    {
        $s = $this->seek();
        if ($this->keyword($name, false) && $this->literal('(')) {
            if ($name === 'alpha' && $this->argumentList($args)) {
                $func = [Type::T_FUNCTION, $name, [Type::T_STRING, '', $args]];
                return true;
            }
            if ($name !== 'expression' && !preg_match('/^(-[a-z]+-)?calc$/', $name)) {
                $ss = $this->seek();
                if ($this->argValues($args) && $this->literal(')')) {
                    $func = [Type::T_FUNCTION_CALL, $name, $args];
                    return true;
                }
                $this->seek($ss);
            }
            if (($this->openString(')', $str, '(') || true) && $this->literal(')')) {
                $args = [];
                if (!empty($str)) {
                    $args[] = [null, [Type::T_STRING, '', [$str]]];
                }
                $func = [Type::T_FUNCTION_CALL, $name, $args];
                return true;
            }
        }
        $this->seek($s);
        return false;
    }