public function enterNode(Node
$node, Environment
$env): Node
{ if ($node instanceof ModuleNode
) { $this->inAModule = true;
$this->tags =
[];
$this->filters =
[];
$this->functions =
[];
return $node;
} elseif ($this->inAModule
) { // look for tags
if ($node->
getNodeTag() && !
isset($this->tags
[$node->
getNodeTag()])) { $this->tags
[$node->
getNodeTag()] =
$node;
} // look for filters
if ($node instanceof FilterExpression && !
isset($this->filters
[$node->
getNode('filter'
)->
getAttribute('value'
)])) { $this->filters
[$node->
getNode('filter'
)->
getAttribute('value'
)] =
$node;
} // look for functions
if ($node instanceof FunctionExpression && !
isset($this->functions
[$node->
getAttribute('name'
)])) { $this->functions
[$node->
getAttribute('name'
)] =
$node;
}