FOF30\Less\Parser\Parser::value PHP Method

value() protected method

a single value
protected value ( &$value ) : boolean
return boolean
    protected function value(&$value)
    {
        $s = $this->seek();
        // Speed shortcut
        if (isset($this->buffer[$this->count]) && $this->buffer[$this->count] == "-") {
            // Negation
            if ($this->literal("-", false) && ($this->variable($inner) && ($inner = array("variable", $inner)) || $this->unit($inner) || $this->parenValue($inner))) {
                $value = array("unary", "-", $inner);
                return true;
            } else {
                $this->seek($s);
            }
        }
        if ($this->parenValue($value)) {
            return true;
        }
        if ($this->unit($value)) {
            return true;
        }
        if ($this->color($value)) {
            return true;
        }
        if ($this->func($value)) {
            return true;
        }
        if ($this->string($value)) {
            return true;
        }
        if ($this->keyword($word)) {
            $value = array('keyword', $word);
            return true;
        }
        // Try a variable
        if ($this->variable($var)) {
            $value = array('variable', $var);
            return true;
        }
        // Unquote string (should this work on any type?
        if ($this->literal("~") && $this->string($str)) {
            $value = array("escape", $str);
            return true;
        } else {
            $this->seek($s);
        }
        // Css hack: \0
        if ($this->literal('\\') && $this->match('([0-9]+)', $m)) {
            $value = array('keyword', '\\' . $m[1]);
            return true;
        } else {
            $this->seek($s);
        }
        return false;
    }