@@ 45-57 (lines=13) @@ | ||
42 | $compiler->addDebugInfo($node); |
|
43 | ||
44 | $compiler->isTemplateName = true; |
|
45 | if ($node->getNode('expr') instanceof Twig_Node_Expression_Constant) { |
|
46 | $compiler |
|
47 | ->write("(new ") |
|
48 | ->subcompile($node->getNode('expr')) |
|
49 | ->raw("(this.env_)).render_(sb, ") |
|
50 | ; |
|
51 | } else { |
|
52 | $compiler |
|
53 | ->write("(new ") |
|
54 | ->subcompile($node->getNode('expr')) |
|
55 | ->raw("(this.env_)).render_(sb, ") |
|
56 | ; |
|
57 | } |
|
58 | $compiler->isTemplateName = false; |
|
59 | ||
60 | if (false === $node->getAttribute('only')) { |
@@ 78-90 (lines=13) @@ | ||
75 | ->raw(" = new twig.Markup(sb.toString());\n") |
|
76 | ->write("sb = $captureStringBuffer") |
|
77 | ; |
|
78 | } else { |
|
79 | $compiler->raw(' = '); |
|
80 | ||
81 | if ($node->getAttribute('safe')) { |
|
82 | $compiler |
|
83 | ->raw("new twig.Markup(") |
|
84 | ->subcompile($node->getNode('values')) |
|
85 | ->raw(")") |
|
86 | ; |
|
87 | } else { |
|
88 | $compiler->subcompile($node->getNode('values')); |
|
89 | } |
|
90 | } |
|
91 | ||
92 | $compiler->raw(";\n"); |
|
93 | $this->count = $count; |