| OLD | NEW |
| 1 | 1 |
| 2 /** | 2 /** |
| 3 * Instances of the class {@code NodeList} represent a list of AST nodes that ha
ve a common parent. | 3 * Instances of the class {@code NodeList} represent a list of AST nodes that ha
ve a common parent. |
| 4 */ | 4 */ |
| 5 class NodeList<E extends ASTNode> extends Object with ListMixin<E> { | 5 class NodeList<E extends ASTNode> extends Object with ListMixin<E> { |
| 6 /** | 6 /** |
| 7 * Create an empty list with the given owner. This is a convenience method tha
t allows the | 7 * Create an empty list with the given owner. This is a convenience method tha
t allows the |
| 8 * compiler to determine the correct value of the type argument [E] without ne
eding to | 8 * compiler to determine the correct value of the type argument [E] without ne
eding to |
| 9 * explicitly specify it. | 9 * explicitly specify it. |
| 10 * | 10 * |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 return removedNode; | 110 return removedNode; |
| 111 } | 111 } |
| 112 void operator[]=(int index, E node) { | 112 void operator[]=(int index, E node) { |
| 113 if (index < 0 || index >= _elements.length) { | 113 if (index < 0 || index >= _elements.length) { |
| 114 throw new RangeError("Index: ${index}, Size: ${_elements.length}"); | 114 throw new RangeError("Index: ${index}, Size: ${_elements.length}"); |
| 115 } | 115 } |
| 116 owner.becomeParentOf(node); | 116 owner.becomeParentOf(node); |
| 117 _elements[index] = node; | 117 _elements[index] = node; |
| 118 } | 118 } |
| 119 int get length => _elements.length; | 119 int get length => _elements.length; |
| 120 void set length(int value) { |
| 121 throw new UnsupportedError("Cannot resize NodeList."); |
| 122 } |
| 120 } | 123 } |
| OLD | NEW |