• Home
  • Raw
  • Download

Lines Matching full:children

42      *  actually have any user data.  ANTLR v3 uses a list of children approach
44 * an empty node whose children represent the list. An empty, but
60 * as there are no fields other than the children list, which cannot
61 * be copied as the children are not considered part of this node.
69 * Get the children internal List; note that if you directly mess with
73 public virtual IList<ITree> Children property in Antlr.Runtime.Tree.BaseTree
92 if ( Children == null )
95 return Children.Count;
174 if ( Children == null || i >= Children.Count ) in GetChild()
177 return Children[i]; in GetChild()
182 foreach ( ITree child in Children ) in GetFirstChildWithType()
194 * Warning: if t has no children, but child does
195 * and child isNil then this routine moves children to t via
196 * t.children = child.children; i.e., without copying the array.
202 //System.out.println("existing children: "+children); in AddChild()
209 // t is an empty node possibly with children in AddChild()
211 … if ( childTree != null && this.Children != null && this.Children == childTree.Children ) in AddChild()
215 // just add all of childTree's children to this in AddChild()
218 if ( this.Children != null || childTree == null ) in AddChild()
220 if ( this.Children == null ) in AddChild()
221 this.Children = CreateChildrenList(); in AddChild()
223 // must copy, this has children already in AddChild()
228 this.Children.Add( c ); in AddChild()
231 c.ChildIndex = Children.Count - 1; in AddChild()
236 // no children for this but t is a BaseTree with children; in AddChild()
238 this.Children = childTree.Children; in AddChild()
245 // child is not nil (don't care about children) in AddChild()
246 if ( Children == null ) in AddChild()
248 Children = CreateChildrenList(); // create children list on demand in AddChild()
250 Children.Add( t ); in AddChild()
252 t.ChildIndex = Children.Count - 1; in AddChild()
254 // System.out.println("now children are: "+children); in AddChild()
257 /** <summary>Add all elements of kids list as children of this node</summary> */
280 if ( Children == null ) in SetChild()
282 Children = CreateChildrenList(); in SetChild()
284 Children[i] = t; in SetChild()
289 /** Insert child t at child position i (0..n-1) by shifting children
306 Children.Insert(i, t); in InsertChild()
320 if ( Children == null ) in DeleteChild()
323 ITree killed = Children[i]; in DeleteChild()
324 Children.RemoveAt( i ); in DeleteChild()
331 * Delete children from start to stop and replace with t even if t is
332 * a list (nil-root tree). num of children can increase or decrease.
333 * For huge child lists, inserting children can force walking rest of
334 * children to set their childindex; could be slow.
353 if ( Children == null ) in ReplaceChildren()
355 throw new ArgumentException( "indexes invalid; no children in list" ); in ReplaceChildren()
361 // normalize to a list of children to add: newChildren in ReplaceChildren()
365 if ( baseTree != null && baseTree.Children != null ) in ReplaceChildren()
367 newChildren = baseTree.Children; in ReplaceChildren()
388 int j = 0; // index into new children in ReplaceChildren()
392 Children[i] = child; in ReplaceChildren()
401 // set children and then delete extra in ReplaceChildren()
404 Children[startChildIndex + j] = newChildren[j]; in ReplaceChildren()
410 Children.RemoveAt( indexToDelete ); in ReplaceChildren()
417 // fill in as many children as we can (replacingHowMany) w/o moving data in ReplaceChildren()
420 Children[startChildIndex + j] = newChildren[j]; in ReplaceChildren()
425 Children.Insert( startChildIndex + j, newChildren[j] ); in ReplaceChildren()
432 /** <summary>Override in a subclass to change the impl of children list</summary> */
541 if ( Children == null || Children.Count == 0 ) in ToStringTree()
552 for ( int i = 0; Children != null && i < Children.Count; i++ ) in ToStringTree()
554 ITree t = Children[i]; in ToStringTree()