lessc_parser::literal PHP Method

literal() protected method

* raw parsing functions
protected literal ( $what, $eatWhitespace = null )
    protected function literal($what, $eatWhitespace = null)
    {
        if ($eatWhitespace === null) {
            $eatWhitespace = $this->eatWhiteDefault;
        }
        // shortcut on single letter
        if (!isset($what[1]) && isset($this->buffer[$this->count])) {
            if ($this->buffer[$this->count] == $what) {
                if (!$eatWhitespace) {
                    $this->count++;
                    return true;
                }
                // goes below...
            } else {
                return false;
            }
        }
        if (!isset(self::$literalCache[$what])) {
            self::$literalCache[$what] = Beans_Lessc::preg_quote($what);
        }
        return $this->match(self::$literalCache[$what], $m, $eatWhitespace);
    }