protected function parseConstKey($key, $curBlock)
    {
        $key = str_replace('\\\\', '\\', $key);

        if ($this->securityPolicy !== null && $this->securityPolicy->getConstantHandling() === SecurityPolicy::CONST_DISALLOW) {
            return 'null';
        }

        if ($curBlock !== 'root') {
            return '(defined("' . $key . '") ? ' . $key . ' : null)';
        }

        return $key;
    }