Latte\Macros\CoreMacros::macroWhile PHP Method

macroWhile() public method

..}
public macroWhile ( MacroNode $node, PhpWriter $writer )
$node Latte\MacroNode
$writer Latte\PhpWriter
    public function macroWhile(MacroNode $node, PhpWriter $writer)
    {
        if ($node->modifiers) {
            throw new CompileException('Modifiers are not allowed in ' . $node->getNotation());
        }
        if ($node->data->do = $node->args === '') {
            return 'do {';
        }
        return $writer->write('while (%node.args) {');
    }