Lines Matching refs:elements
1 /** A generic list of elements tracked in an alternative to be used in
6 * Once you start next()ing, do not try to add more elements. It will
16 * which bumps it to 1 meaning no more elements.
35 this.elements = el;
44 * not consumed any of its elements. Elements themselves are untouched.
57 if ( this.elements ) { // if in list, just add
58 this.elements.push(el);
61 if ( !org.antlr.lang.isValue(this.singleElement) ) { // no elements yet, track w/o list
66 this.elements = [];
67 this.elements.push(this.singleElement);
69 this.elements.push(el);
72 /** Return the next element in the stream. If out of elements, throw
73 * an exception unless size()==1. If size is 1, then return elements[0].
74 * Return a duplicate node/subtree if stream is out of elements and
81 // if out of elements and size is 1, dup
93 * if the stream is empty or we're out of elements and size>1.
101 if ( this.cursor>= n) { // out of elements?
105 // out of elements and size was not 1, so we can't dup
108 // we have elements
113 // must have more than one in list, pull from elements
114 var o = this.toTree(this.elements[this.cursor]);
131 (this.elements && this.cursor < this.elements.length);
139 if ( this.elements ) {
140 return this.elements.length;