Registers a Node Visitor.
Twig_NodeVisitorInterface $visitor A Twig_NodeVisitorInterface instance:
public function addNodeVisitor(Twig_NodeVisitorInterface $visitor) {
if ($this->extensionInitialized) {
throw new LogicException('Unable to add a node visitor as extensions have already been initialized.', $extension
->getName());
}
$this->staging
->addNodeVisitor($visitor);
}