Lines Matching refs:child
91 foreach ($ctx->children as $child) {
92 if ($child instanceof ErrorNode) {
93 $this->addErrorNode($child);
122 * Add a parse tree node to this as a child. Works for
131 public function addChild(ParseTree $child) : ParseTree
137 $this->children[] = $child;
139 return $child;
175 foreach ($this->children as $child) {
176 if ($child instanceof $type) {
178 return $child;
194 foreach ($this->children as $child) {
195 if ($child instanceof TerminalNode && $child->getSymbol()->getType() === $ttype) {
197 return $child;
217 foreach ($this->children as $child) {
218 if ($child instanceof TerminalNode && $child->getSymbol()->getType() === $ttype) {
219 $tokens[] = $child;
241 foreach ($this->children as $child) {
242 if ($child instanceof $ctxType) {
243 $contexts[] = $child;