Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1328)

Unified Diff: pkg/analyzer/lib/src/dart/ast/utilities.dart

Issue 2722033002: Add an AST factory method for fieldDeclaration with all optional named parameters. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/dart/ast/ast_factory.dart ('k') | pkg/analyzer/lib/src/generated/parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/ast/utilities.dart
diff --git a/pkg/analyzer/lib/src/dart/ast/utilities.dart b/pkg/analyzer/lib/src/dart/ast/utilities.dart
index 9e370a1df241e6e6a0fb525fbe47c8a3c8493215..920e58556a42b6f6101441a81235e00bb327672a 100644
--- a/pkg/analyzer/lib/src/dart/ast/utilities.dart
+++ b/pkg/analyzer/lib/src/dart/ast/utilities.dart
@@ -432,12 +432,13 @@ class AstCloner implements AstVisitor<AstNode> {
@override
FieldDeclaration visitFieldDeclaration(FieldDeclaration node) =>
- astFactory.fieldDeclaration(
- cloneNode(node.documentationComment),
- cloneNodeList(node.metadata),
- cloneToken(node.staticKeyword),
- cloneNode(node.fields),
- cloneToken(node.semicolon));
+ astFactory.fieldDeclaration2(
+ comment: cloneNode(node.documentationComment),
+ metadata: cloneNodeList(node.metadata),
+ covariantKeyword: cloneToken(node.covariantKeyword),
+ staticKeyword: cloneToken(node.staticKeyword),
+ fieldList: cloneNode(node.fields),
+ semicolon: cloneToken(node.semicolon));
@override
FieldFormalParameter visitFieldFormalParameter(FieldFormalParameter node) =>
@@ -3171,12 +3172,13 @@ class IncrementalAstCloner implements AstVisitor<AstNode> {
@override
FieldDeclaration visitFieldDeclaration(FieldDeclaration node) =>
- astFactory.fieldDeclaration(
- _cloneNode(node.documentationComment),
- _cloneNodeList(node.metadata),
- _mapToken(node.staticKeyword),
- _cloneNode(node.fields),
- _mapToken(node.semicolon));
+ astFactory.fieldDeclaration2(
+ comment: _cloneNode(node.documentationComment),
+ metadata: _cloneNodeList(node.metadata),
+ covariantKeyword: _mapToken(node.covariantKeyword),
+ staticKeyword: _mapToken(node.staticKeyword),
+ fieldList: _cloneNode(node.fields),
+ semicolon: _mapToken(node.semicolon));
@override
FieldFormalParameter visitFieldFormalParameter(FieldFormalParameter node) =>
« no previous file with comments | « pkg/analyzer/lib/src/dart/ast/ast_factory.dart ('k') | pkg/analyzer/lib/src/generated/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698