| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * Defines the AST model. The AST (Abstract Syntax Tree) model describes the | 6 * Defines the AST model. The AST (Abstract Syntax Tree) model describes the |
| 7 * syntactic (as opposed to semantic) structure of Dart code. The semantic | 7 * syntactic (as opposed to semantic) structure of Dart code. The semantic |
| 8 * structure of the code is modeled by the | 8 * structure of the code is modeled by the |
| 9 * [element model](../element/element.dart). | 9 * [element model](../element/element.dart). |
| 10 * | 10 * |
| (...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 /** | 529 /** |
| 530 * Return the first token included in this node's source range. | 530 * Return the first token included in this node's source range. |
| 531 */ | 531 */ |
| 532 Token get beginToken; | 532 Token get beginToken; |
| 533 | 533 |
| 534 /** | 534 /** |
| 535 * Return an iterator that can be used to iterate through all the entities | 535 * Return an iterator that can be used to iterate through all the entities |
| 536 * (either AST nodes or tokens) that make up the contents of this node, | 536 * (either AST nodes or tokens) that make up the contents of this node, |
| 537 * including doc comments but excluding other comments. | 537 * including doc comments but excluding other comments. |
| 538 */ | 538 */ |
| 539 Iterable/*<AstNode | Token>*/ get childEntities; | 539 Iterable /* AstNode | Token */ get childEntities; |
| 540 | 540 |
| 541 /** | 541 /** |
| 542 * Return the offset of the character immediately following the last character | 542 * Return the offset of the character immediately following the last character |
| 543 * of this node's source range. This is equivalent to | 543 * of this node's source range. This is equivalent to |
| 544 * `node.getOffset() + node.getLength()`. For a compilation unit this will be | 544 * `node.getOffset() + node.getLength()`. For a compilation unit this will be |
| 545 * equal to the length of the unit's source. For synthetic nodes this will be | 545 * equal to the length of the unit's source. For synthetic nodes this will be |
| 546 * equivalent to the node's offset (because the length is zero (0) by | 546 * equivalent to the node's offset (because the length is zero (0) by |
| 547 * definition). | 547 * definition). |
| 548 */ | 548 */ |
| 549 int get end; | 549 int get end; |
| (...skipping 5342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5892 * A list of AST nodes that have a common parent. | 5892 * A list of AST nodes that have a common parent. |
| 5893 * | 5893 * |
| 5894 * Clients may not extend, implement or mix-in this class. | 5894 * Clients may not extend, implement or mix-in this class. |
| 5895 */ | 5895 */ |
| 5896 abstract class NodeList<E extends AstNode> implements List<E> { | 5896 abstract class NodeList<E extends AstNode> implements List<E> { |
| 5897 /** | 5897 /** |
| 5898 * Initialize a newly created list of nodes such that all of the nodes that | 5898 * Initialize a newly created list of nodes such that all of the nodes that |
| 5899 * are added to the list will have their parent set to the given [owner]. The | 5899 * are added to the list will have their parent set to the given [owner]. The |
| 5900 * list will initially be populated with the given [elements]. | 5900 * list will initially be populated with the given [elements]. |
| 5901 */ | 5901 */ |
| 5902 factory NodeList(AstNode owner, [List<E> elements]) = NodeListImpl; | 5902 factory NodeList(AstNode owner, [List<E> elements]) => |
| 5903 new NodeListImpl<E>(owner as AstNodeImpl, elements); |
| 5903 | 5904 |
| 5904 /** | 5905 /** |
| 5905 * Return the first token included in this node list's source range, or `null` | 5906 * Return the first token included in this node list's source range, or `null` |
| 5906 * if the list is empty. | 5907 * if the list is empty. |
| 5907 */ | 5908 */ |
| 5908 Token get beginToken; | 5909 Token get beginToken; |
| 5909 | 5910 |
| 5910 /** | 5911 /** |
| 5911 * Return the last token included in this node list's source range, or `null` | 5912 * Return the last token included in this node list's source range, or `null` |
| 5912 * if the list is empty. | 5913 * if the list is empty. |
| (...skipping 2179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8092 /** | 8093 /** |
| 8093 * Return the 'yield' keyword. | 8094 * Return the 'yield' keyword. |
| 8094 */ | 8095 */ |
| 8095 Token get yieldKeyword; | 8096 Token get yieldKeyword; |
| 8096 | 8097 |
| 8097 /** | 8098 /** |
| 8098 * Return the 'yield' keyword to the given [token]. | 8099 * Return the 'yield' keyword to the given [token]. |
| 8099 */ | 8100 */ |
| 8100 void set yieldKeyword(Token token); | 8101 void set yieldKeyword(Token token); |
| 8101 } | 8102 } |
| OLD | NEW |