Lines Matching refs:tree
18 public function walk(ParseTreeListener $listener, ParseTree $tree) : void
20 if ($tree instanceof ErrorNode) {
21 $listener->visitErrorNode($tree);
26 if ($tree instanceof TerminalNode) {
27 $listener->visitTerminal($tree);
32 if (!$tree instanceof RuleNode) {
33 throw new \RuntimeException('Unexpected tree type.');
36 $this->enterRule($listener, $tree);
38 $count = $tree->getChildCount();
41 $child = $tree->getChild($i);
48 $this->exitRule($listener, $tree);