mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-20 06:29:03 +00:00
Remove the new yield nodes
This commit is contained in:
@@ -29,9 +29,15 @@ class PrintNode extends Node implements NodeOutputInterface
|
||||
|
||||
public function compile(Compiler $compiler): void
|
||||
{
|
||||
$compiler->addDebugInfo($this);
|
||||
|
||||
if ($compiler->getEnvironment()->useYield()) {
|
||||
$compiler->write('yield ');
|
||||
} else {
|
||||
$compiler->write('echo ');
|
||||
}
|
||||
|
||||
$compiler
|
||||
->addDebugInfo($this)
|
||||
->write('echo ')
|
||||
->subcompile($this->getNode('expr'))
|
||||
->raw(";\n")
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user