Lines Matching refs:node

42     protected function doEnterNode(Node $node, Environment $env)  argument
44 if ($node instanceof ModuleNode) {
50 return $node;
53 if ($node->getNodeTag() && !isset($this->tags[$node->getNodeTag()])) {
54 $this->tags[$node->getNodeTag()] = $node;
58 …if ($node instanceof FilterExpression && !isset($this->filters[$node->getNode('filter')->getAttrib…
59 $this->filters[$node->getNode('filter')->getAttribute('value')] = $node;
63 …if ($node instanceof FunctionExpression && !isset($this->functions[$node->getAttribute('name')])) {
64 $this->functions[$node->getAttribute('name')] = $node;
68 if ($node instanceof RangeBinary && !isset($this->functions['range'])) {
69 $this->functions['range'] = $node;
72 if ($node instanceof PrintNode) {
74 $this->wrapNode($node, 'expr');
77 if ($node instanceof SetNode && !$node->getAttribute('capture')) {
83 if ($node instanceof ConcatBinary) {
84 $this->wrapNode($node, 'left');
85 $this->wrapNode($node, 'right');
87 if ($node instanceof FilterExpression) {
88 $this->wrapNode($node, 'node');
89 $this->wrapArrayNode($node, 'arguments');
91 if ($node instanceof FunctionExpression) {
92 $this->wrapArrayNode($node, 'arguments');
97 return $node;
100 protected function doLeaveNode(Node $node, Environment $env) argument
102 if ($node instanceof ModuleNode) {
105 …$node->setNode('constructor_end', new Node([new CheckSecurityNode($this->filters, $this->tags, $th…
107 if ($node instanceof PrintNode || $node instanceof SetNode) {
112 return $node;
115 private function wrapNode(Node $node, $name) argument
117 $expr = $node->getNode($name);
119 $node->setNode($name, new CheckToStringNode($expr));
123 private function wrapArrayNode(Node $node, $name) argument
125 $args = $node->getNode($name);