$var], ['global' => $global], $var->getTemplateLine()); } public function compile(Compiler $compiler): void { /** @var TemplateVariable $var */ $var = $this->nodes['var']; $compiler ->addDebugInfo($this) ->write('$macros[') ->string($var->getName($compiler)) ->raw('] = ') ; if ($this->getAttribute('global')) { $compiler ->raw('$this->macros[') ->string($var->getName($compiler)) ->raw('] = ') ; } } }