FOF30\Less\Parser\Parser::literal PHP Method

literal() protected method

[literal description]
protected literal ( [type] $what, [type] $eatWhitespace = null ) : boolean
$what [type]
$eatWhitespace [type]
return boolean
    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;
                }
            } else {
                return false;
            }
        }
        if (!isset(self::$literalCache[$what])) {
            self::$literalCache[$what] = Less::preg_quote($what);
        }
        return $this->match(self::$literalCache[$what], $m, $eatWhitespace);
    }