lessc_parser::match PHP Method

match() protected method

try to match something on head of buffer
protected match ( $regex, &$out, $eatWhitespace = null )
    protected function match($regex, &$out, $eatWhitespace = null)
    {
        if ($eatWhitespace === null) {
            $eatWhitespace = $this->eatWhiteDefault;
        }
        $r = '/' . $regex . ($eatWhitespace && !$this->writeComments ? '\\s*' : '') . '/Ais';
        if (preg_match($r, $this->buffer, $out, null, $this->count)) {
            $this->count += strlen($out[0]);
            if ($eatWhitespace && $this->writeComments) {
                $this->whitespace();
            }
            return true;
        }
        return false;
    }