Index: pkg/analyzer/lib/src/generated/parser.dart |
diff --git a/pkg/analyzer/lib/src/generated/parser.dart b/pkg/analyzer/lib/src/generated/parser.dart |
index c785abefddc635c43f31218ce587c73ec549a26a..e8bc7dd5d908187636ff18c9c417df3423376aa7 100644 |
--- a/pkg/analyzer/lib/src/generated/parser.dart |
+++ b/pkg/analyzer/lib/src/generated/parser.dart |
@@ -1338,15 +1338,13 @@ class Parser { |
VariableDeclaration variable = astFactory.variableDeclaration( |
createSyntheticIdentifier(), null, null); |
List<VariableDeclaration> variables = <VariableDeclaration>[variable]; |
- FieldDeclarationImpl field = astFactory.fieldDeclaration( |
- commentAndMetadata.comment, |
- commentAndMetadata.metadata, |
- null, |
- astFactory.variableDeclarationList( |
+ return astFactory.fieldDeclaration2( |
+ comment: commentAndMetadata.comment, |
+ metadata: commentAndMetadata.metadata, |
+ covariantKeyword: modifiers.covariantKeyword, |
+ fieldList: astFactory.variableDeclarationList( |
null, null, keyword, null, variables), |
- _expect(TokenType.SEMICOLON)); |
- field.covariantKeyword = modifiers.covariantKeyword; |
- return field; |
+ semicolon: _expect(TokenType.SEMICOLON)); |
} |
_reportErrorForToken( |
ParserErrorCode.EXPECTED_CLASS_MEMBER, _currentToken); |
@@ -3584,14 +3582,13 @@ class Parser { |
TypeAnnotation type) { |
VariableDeclarationList fieldList = |
parseVariableDeclarationListAfterType(null, keyword, type); |
- FieldDeclarationImpl field = astFactory.fieldDeclaration( |
- commentAndMetadata.comment, |
- commentAndMetadata.metadata, |
- staticKeyword, |
- fieldList, |
- _expect(TokenType.SEMICOLON)); |
- field.covariantKeyword = covariantKeyword; |
- return field; |
+ return astFactory.fieldDeclaration2( |
+ comment: commentAndMetadata.comment, |
+ metadata: commentAndMetadata.metadata, |
+ covariantKeyword: covariantKeyword, |
+ staticKeyword: staticKeyword, |
+ fieldList: fieldList, |
+ semicolon: _expect(TokenType.SEMICOLON)); |
} |
/** |