public function macroInput(MacroNode $node, PhpWriter $writer)
{
$class = get_class($this);
$words = $node->tokenizer->fetchWords();
if (!$words) {
throw new CompileException("Missing name in {{$node->name}}.");
}
$name = array_shift($words);
return $writer->write(($name[0] === '$' ? '$_input = is_object(%0.word) ? %0.word : $_form[%0.word];' : '$_input = $_form[%0.word];') . 'echo ' . $class . '::input($_input->%1.raw->addAttributes(%node.array), $_input, %2.var)', $name, $words ? 'getControlPart(' . implode(', ', array_map([$writer, 'formatWord'], $words)) . ')' : 'getControl()', (bool) $words);
}