Chromium Code Reviews| Index: pkg/analyzer/lib/src/generated/ast.dart |
| diff --git a/pkg/analyzer/lib/src/generated/ast.dart b/pkg/analyzer/lib/src/generated/ast.dart |
| index 909400d3a8e3f151dd3f1f576165795b7b1769ed..94e89eb02a7ffe342b37ec6810725970282236d6 100644 |
| --- a/pkg/analyzer/lib/src/generated/ast.dart |
| +++ b/pkg/analyzer/lib/src/generated/ast.dart |
| @@ -1612,8 +1612,7 @@ class AstCloner implements AstVisitor<AstNode> { |
| @override |
| VariableDeclaration visitVariableDeclaration(VariableDeclaration node) => |
| - new VariableDeclaration(null, cloneNodeList(node.metadata), |
| - cloneNode(node.name), cloneToken(node.equals), |
| + new VariableDeclaration(cloneNode(node.name), cloneToken(node.equals), |
| cloneNode(node.initializer)); |
| @override |
| @@ -10177,8 +10176,7 @@ class IncrementalAstCloner implements AstVisitor<AstNode> { |
| @override |
| VariableDeclaration visitVariableDeclaration(VariableDeclaration node) => |
| - new VariableDeclaration(null, _cloneNodeList(node.metadata), |
| - _cloneNode(node.name), _mapToken(node.equals), |
| + new VariableDeclaration(_cloneNode(node.name), _mapToken(node.equals), |
| _cloneNode(node.initializer)); |
| @override |
| @@ -19568,6 +19566,10 @@ class UriValidationCode { |
| * |
| * > variableDeclaration ::= |
| * > [SimpleIdentifier] ('=' [Expression])? |
| + * |
| + * TODO(paulberry): a VariableDeclaration can never be associated with a |
| + * comment or metadata. Consider changing the class hierarchy so that |
| + * [VariableDeclaration] does not extend [Declaration]. |
|
Brian Wilkerson
2015/04/14 18:02:36
I don't understand why we would disallow associati
Paul Berry
2015/04/14 18:47:13
To clarify, we aren't disallowing comments, we're
Brian Wilkerson
2015/04/14 19:00:23
Not really. I already understood that. I just don'
|
| */ |
| class VariableDeclaration extends Declaration { |
| /** |
| @@ -19588,14 +19590,12 @@ class VariableDeclaration extends Declaration { |
| Expression _initializer; |
| /** |
| - * Initialize a newly created variable declaration. Either or both of the |
| - * [comment] and [metadata] can be `null` if the declaration does not have the |
| - * corresponding attribute. The [equals] and [initializer] can be `null` if |
| - * there is no initializer. |
| + * Initialize a newly created variable declaration. The [equals] and |
| + * [initializer] can be `null` if there is no initializer. |
| */ |
| - VariableDeclaration(Comment comment, List<Annotation> metadata, |
| + VariableDeclaration( |
| SimpleIdentifier name, this.equals, Expression initializer) |
| - : super(comment, metadata) { |
| + : super(null, null) { |
| _name = _becomeParentOf(name); |
| _initializer = _becomeParentOf(initializer); |
| } |