Chromium Code Reviews| 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 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 549 /** | 549 /** |
| 550 * Use the given [visitor] to visit all of the children of this node. The | 550 * Use the given [visitor] to visit all of the children of this node. The |
| 551 * children will be visited in lexical order. | 551 * children will be visited in lexical order. |
| 552 */ | 552 */ |
| 553 void visitChildren(AstVisitor visitor); | 553 void visitChildren(AstVisitor visitor); |
| 554 } | 554 } |
| 555 | 555 |
| 556 /** | 556 /** |
| 557 * An object that can be used to visit an AST structure. | 557 * An object that can be used to visit an AST structure. |
| 558 * | 558 * |
| 559 * Clients may extend or implement this class. | 559 * Clients may not extend, implement or mix-in this class. |
|
Paul Berry
2017/01/09 17:36:51
Consider adding a reference to ThrowingAstVisitor
Brian Wilkerson
2017/01/09 18:08:07
Done
| |
| 560 */ | 560 */ |
| 561 abstract class AstVisitor<R> { | 561 abstract class AstVisitor<R> { |
| 562 R visitAdjacentStrings(AdjacentStrings node); | 562 R visitAdjacentStrings(AdjacentStrings node); |
| 563 | 563 |
| 564 R visitAnnotation(Annotation node); | 564 R visitAnnotation(Annotation node); |
| 565 | 565 |
| 566 R visitArgumentList(ArgumentList node); | 566 R visitArgumentList(ArgumentList node); |
| 567 | 567 |
| 568 R visitAsExpression(AsExpression node); | 568 R visitAsExpression(AsExpression node); |
| 569 | 569 |
| (...skipping 6303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6873 /** | 6873 /** |
| 6874 * Return the 'yield' keyword. | 6874 * Return the 'yield' keyword. |
| 6875 */ | 6875 */ |
| 6876 Token get yieldKeyword; | 6876 Token get yieldKeyword; |
| 6877 | 6877 |
| 6878 /** | 6878 /** |
| 6879 * Return the 'yield' keyword to the given [token]. | 6879 * Return the 'yield' keyword to the given [token]. |
| 6880 */ | 6880 */ |
| 6881 void set yieldKeyword(Token token); | 6881 void set yieldKeyword(Token token); |
| 6882 } | 6882 } |
| OLD | NEW |