Lines Matching refs:node

41     protected function doEnterNode(Node $node, Environment $env)  argument
43 if ($node instanceof ModuleNode) {
49 return $node;
52 if ($node->getNodeTag() && !isset($this->tags[$node->getNodeTag()])) {
53 $this->tags[$node->getNodeTag()] = $node;
57 …if ($node instanceof FilterExpression && !isset($this->filters[$node->getNode('filter')->getAttrib…
58 $this->filters[$node->getNode('filter')->getAttribute('value')] = $node;
62 …if ($node instanceof FunctionExpression && !isset($this->functions[$node->getAttribute('name')])) {
63 $this->functions[$node->getAttribute('name')] = $node;
67 if ($node instanceof RangeBinary && !isset($this->functions['range'])) {
68 $this->functions['range'] = $node;
71 if ($node instanceof PrintNode) {
73 $this->wrapNode($node, 'expr');
76 if ($node instanceof SetNode && !$node->getAttribute('capture')) {
82 if ($node instanceof ConcatBinary) {
83 $this->wrapNode($node, 'left');
84 $this->wrapNode($node, 'right');
86 if ($node instanceof FilterExpression) {
87 $this->wrapNode($node, 'node');
88 $this->wrapArrayNode($node, 'arguments');
90 if ($node instanceof FunctionExpression) {
91 $this->wrapArrayNode($node, 'arguments');
96 return $node;
99 protected function doLeaveNode(Node $node, Environment $env) argument
101 if ($node instanceof ModuleNode) {
104 …$node->setNode('constructor_end', new Node([new CheckSecurityCallNode(), $node->getNode('construct…
105 …$node->setNode('class_end', new Node([new CheckSecurityNode($this->filters, $this->tags, $this->fu…
107 if ($node instanceof PrintNode || $node instanceof SetNode) {
112 return $node;
115 private function wrapNode(Node $node, string $name) argument
117 $expr = $node->getNode($name);
119 $node->setNode($name, new CheckToStringNode($expr));
123 private function wrapArrayNode(Node $node, string $name) argument
125 $args = $node->getNode($name);