FOF30\Less\Parser\Parser::unit PHP Method

unit() protected method

[unit description]
protected unit ( &$unit ) : boolean
return boolean
    protected function unit(&$unit)
    {
        // Speed shortcut
        if (isset($this->buffer[$this->count])) {
            $char = $this->buffer[$this->count];
            if (!ctype_digit($char) && $char != ".") {
                return false;
            }
        }
        if ($this->match('([0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)([%a-zA-Z]+)?', $m)) {
            $unit = array("number", $m[1], empty($m[2]) ? "" : $m[2]);
            return true;
        }
        return false;
    }