public static function read(&$context, $name) {
        $isPB = ($name === '@partial-block');
        $context['usedFeature']['partial']++;

        if (isset($context['usedPartial'][$name])) {
            return;
        }

        $cnt = static::resolve($context, $name);

        if ($cnt !== null) {
            $context['usedPartial'][$name] = SafeString::escapeTemplate($cnt);
            return static::compileDynamic($context, $name);
        }

        if (!$context['flags']['skippartial'] && !$isPB) {
            $context['error'][] = "Can not find partial for '$name', you should provide partials or partialresolver in options";
        }
    }