Remove the new yield nodes

This commit is contained in:
Fabien Potencier
2024-01-05 19:12:23 +01:00
parent 3b6cbf98d8
commit 15879406c8
22 changed files with 61 additions and 213 deletions
+8 -2
View File
@@ -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")
;