src/Leevel/View/Compiler.php
public function assignNodeCompiler(array &$theme): void
    {
        $this->checkNode($theme);
        $attr = $this->getNodeAttribute($theme);

        $attr['name'] = $this->parseContent($attr['name'], false);

        if (null === $attr['value']) {
            $attr['value'] = 'null';
        } else {
            if ('$' === substr($attr['value'], 0, 1)) {
                $attr['value'] = $this->parseContent(substr($attr['value'], 1));
            } else {
                $attr['value'] = '\''.$attr['value'].'\'';
            }
        }

        // 编译
        $theme['content'] = $this->withPhpTag(
            $attr['name'].' = '.$attr['value'].';'
        );
    }
public function assignNodeCompiler(array &$theme): void
    {
        $this->checkNode($theme);
        $attr = $this->getNodeAttribute($theme);

        $attr['name'] = $this->parseContent($attr['name'], false);

        if (null === $attr['value']) {
            $attr['value'] = 'null';
        } else {
            if ('$' === substr($attr['value'], 0, 1)) {
                $attr['value'] = $this->parseContent(substr($attr['value'], 1));
            } else {
                $attr['value'] = '\''.$attr['value'].'\'';
            }
        }

        // 编译
        $theme['content'] = $this->withPhpTag(
            $attr['name'].' = '.$attr['value'].';'
        );
    }
assign.

@param array $theme