Skip to content

Instantly share code, notes, and snippets.

@aga5tya
Created October 7, 2016 20:46
Show Gist options
  • Save aga5tya/176099a913ebed9b81565699cf58bd2e to your computer and use it in GitHub Desktop.
Save aga5tya/176099a913ebed9b81565699cf58bd2e to your computer and use it in GitHub Desktop.
<?php
class Twig_Node_Do extends Twig_Node
{
public function __construct(Twig_Node_Expression $expr, $lineno, $tag = null)
{
parent::__construct
(array('expr' => $expr),
array(), $lineno, $tag);
}
public function compile(Twig_Compiler $compiler)
{
$compiler
->addDebugInfo($this)
->write('')
->subcompile($this->getNode('expr'))
->raw(";\n")
;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment