| Index: pkg/analyzer/test/generated/parser_test.dart
|
| diff --git a/pkg/analyzer/test/generated/parser_test.dart b/pkg/analyzer/test/generated/parser_test.dart
|
| index ad1ceaaf75d27fa7c019f3576e55b39127eff75f..6ce609fc7fa4c46f32b9503f453d05735baeccca 100644
|
| --- a/pkg/analyzer/test/generated/parser_test.dart
|
| +++ b/pkg/analyzer/test/generated/parser_test.dart
|
| @@ -5,7 +5,6 @@
|
| library analyzer.test.generated.parser_test;
|
|
|
| import 'package:analyzer/dart/ast/ast.dart';
|
| -import 'package:analyzer/dart/ast/standard_ast_factory.dart';
|
| import 'package:analyzer/dart/ast/token.dart';
|
| import 'package:analyzer/dart/ast/visitor.dart';
|
| import 'package:analyzer/error/error.dart';
|
| @@ -5067,7 +5066,7 @@ class SimpleParserTest extends ParserTestCase {
|
| void test_parseAssignableSelector_none() {
|
| createParser(';');
|
| Expression expression =
|
| - parser.parseAssignableSelector(astFactory.simpleIdentifier(null), true);
|
| + parser.parseAssignableSelector(new SimpleIdentifier(null), true);
|
| expectNotNullIfNoErrors(expression);
|
| listener.assertNoErrors();
|
| expect(expression, new isInstanceOf<SimpleIdentifier>());
|
| @@ -9424,9 +9423,8 @@ void''');
|
| }
|
|
|
| void test_parseFunctionDeclaration_function() {
|
| - Comment comment = astFactory.documentationComment(new List<Token>(0));
|
| - TypeName returnType =
|
| - astFactory.typeName(astFactory.simpleIdentifier(null), null);
|
| + Comment comment = Comment.createDocumentationComment(new List<Token>(0));
|
| + TypeName returnType = new TypeName(new SimpleIdentifier(null), null);
|
| createParser('f() {}');
|
| FunctionDeclaration declaration = parser.parseFunctionDeclaration(
|
| commentAndMetadata(comment), null, returnType);
|
| @@ -9444,9 +9442,8 @@ void''');
|
| }
|
|
|
| void test_parseFunctionDeclaration_functionWithTypeParameters() {
|
| - Comment comment = astFactory.documentationComment(new List<Token>(0));
|
| - TypeName returnType =
|
| - astFactory.typeName(astFactory.simpleIdentifier(null), null);
|
| + Comment comment = Comment.createDocumentationComment(new List<Token>(0));
|
| + TypeName returnType = new TypeName(new SimpleIdentifier(null), null);
|
| createParser('f<E>() {}');
|
| FunctionDeclaration declaration = parser.parseFunctionDeclaration(
|
| commentAndMetadata(comment), null, returnType);
|
| @@ -9465,9 +9462,8 @@ void''');
|
|
|
| void test_parseFunctionDeclaration_functionWithTypeParameters_comment() {
|
| enableGenericMethodComments = true;
|
| - Comment comment = astFactory.documentationComment(new List<Token>(0));
|
| - TypeName returnType =
|
| - astFactory.typeName(astFactory.simpleIdentifier(null), null);
|
| + Comment comment = Comment.createDocumentationComment(new List<Token>(0));
|
| + TypeName returnType = new TypeName(new SimpleIdentifier(null), null);
|
| createParser('f/*<E>*/() {}');
|
| FunctionDeclaration declaration = parser.parseFunctionDeclaration(
|
| commentAndMetadata(comment), null, returnType);
|
| @@ -9485,9 +9481,8 @@ void''');
|
| }
|
|
|
| void test_parseFunctionDeclaration_getter() {
|
| - Comment comment = astFactory.documentationComment(new List<Token>(0));
|
| - TypeName returnType =
|
| - astFactory.typeName(astFactory.simpleIdentifier(null), null);
|
| + Comment comment = Comment.createDocumentationComment(new List<Token>(0));
|
| + TypeName returnType = new TypeName(new SimpleIdentifier(null), null);
|
| createParser('get p => 0;');
|
| FunctionDeclaration declaration = parser.parseFunctionDeclaration(
|
| commentAndMetadata(comment), null, returnType);
|
| @@ -9505,9 +9500,8 @@ void''');
|
| }
|
|
|
| void test_parseFunctionDeclaration_setter() {
|
| - Comment comment = astFactory.documentationComment(new List<Token>(0));
|
| - TypeName returnType =
|
| - astFactory.typeName(astFactory.simpleIdentifier(null), null);
|
| + Comment comment = Comment.createDocumentationComment(new List<Token>(0));
|
| + TypeName returnType = new TypeName(new SimpleIdentifier(null), null);
|
| createParser('set p(v) {}');
|
| FunctionDeclaration declaration = parser.parseFunctionDeclaration(
|
| commentAndMetadata(comment), null, returnType);
|
| @@ -9596,9 +9590,8 @@ void''');
|
| }
|
|
|
| void test_parseGetter_nonStatic() {
|
| - Comment comment = astFactory.documentationComment(new List<Token>(0));
|
| - TypeName returnType =
|
| - astFactory.typeName(astFactory.simpleIdentifier(null), null);
|
| + Comment comment = Comment.createDocumentationComment(new List<Token>(0));
|
| + TypeName returnType = new TypeName(new SimpleIdentifier(null), null);
|
| createParser('get a;');
|
| MethodDeclaration method =
|
| parser.parseGetter(commentAndMetadata(comment), null, null, returnType);
|
| @@ -9616,10 +9609,9 @@ void''');
|
| }
|
|
|
| void test_parseGetter_static() {
|
| - Comment comment = astFactory.documentationComment(new List<Token>(0));
|
| + Comment comment = Comment.createDocumentationComment(new List<Token>(0));
|
| Token staticKeyword = TokenFactory.tokenFromKeyword(Keyword.STATIC);
|
| - TypeName returnType =
|
| - astFactory.typeName(astFactory.simpleIdentifier(null), null);
|
| + TypeName returnType = new TypeName(new SimpleIdentifier(null), null);
|
| createParser('get a => 42;');
|
| MethodDeclaration method = parser.parseGetter(
|
| commentAndMetadata(comment), null, staticKeyword, returnType);
|
| @@ -9868,10 +9860,9 @@ void''');
|
| }
|
|
|
| void test_parseInitializedIdentifierList_type() {
|
| - Comment comment = astFactory.documentationComment(new List<Token>(0));
|
| + Comment comment = Comment.createDocumentationComment(new List<Token>(0));
|
| Token staticKeyword = TokenFactory.tokenFromKeyword(Keyword.STATIC);
|
| - TypeName type =
|
| - astFactory.typeName(astFactory.simpleIdentifier(null), null);
|
| + TypeName type = new TypeName(new SimpleIdentifier(null), null);
|
| createParser("a = 1, b, c = 3;");
|
| FieldDeclaration declaration = parser.parseInitializedIdentifierList(
|
| commentAndMetadata(comment), staticKeyword, null, type);
|
| @@ -9888,7 +9879,7 @@ void''');
|
| }
|
|
|
| void test_parseInitializedIdentifierList_var() {
|
| - Comment comment = astFactory.documentationComment(new List<Token>(0));
|
| + Comment comment = Comment.createDocumentationComment(new List<Token>(0));
|
| Token staticKeyword = TokenFactory.tokenFromKeyword(Keyword.STATIC);
|
| Token varKeyword = TokenFactory.tokenFromKeyword(Keyword.VAR);
|
| createParser('a = 1, b, c = 3;');
|
| @@ -11080,9 +11071,8 @@ void''');
|
| }
|
|
|
| void test_parseOperator() {
|
| - Comment comment = astFactory.documentationComment(new List<Token>(0));
|
| - TypeName returnType =
|
| - astFactory.typeName(astFactory.simpleIdentifier(null), null);
|
| + Comment comment = Comment.createDocumentationComment(new List<Token>(0));
|
| + TypeName returnType = new TypeName(new SimpleIdentifier(null), null);
|
| createParser('operator +(A a);');
|
| MethodDeclaration method =
|
| parser.parseOperator(commentAndMetadata(comment), null, returnType);
|
| @@ -11739,9 +11729,8 @@ void''');
|
| }
|
|
|
| void test_parseSetter_nonStatic() {
|
| - Comment comment = astFactory.documentationComment(new List<Token>(0));
|
| - TypeName returnType =
|
| - astFactory.typeName(astFactory.simpleIdentifier(null), null);
|
| + Comment comment = Comment.createDocumentationComment(new List<Token>(0));
|
| + TypeName returnType = new TypeName(new SimpleIdentifier(null), null);
|
| createParser('set a(var x);');
|
| MethodDeclaration method =
|
| parser.parseSetter(commentAndMetadata(comment), null, null, returnType);
|
| @@ -11760,10 +11749,9 @@ void''');
|
| }
|
|
|
| void test_parseSetter_static() {
|
| - Comment comment = astFactory.documentationComment(new List<Token>(0));
|
| + Comment comment = Comment.createDocumentationComment(new List<Token>(0));
|
| Token staticKeyword = TokenFactory.tokenFromKeyword(Keyword.STATIC);
|
| - TypeName returnType =
|
| - astFactory.typeName(astFactory.simpleIdentifier(null), null);
|
| + TypeName returnType = new TypeName(new SimpleIdentifier(null), null);
|
| createParser('set a(var x) {}');
|
| MethodDeclaration method = parser.parseSetter(
|
| commentAndMetadata(comment), null, staticKeyword, returnType);
|
| @@ -13130,8 +13118,7 @@ void''');
|
| }
|
|
|
| void test_parseVariableDeclarationListAfterType_type() {
|
| - TypeName type =
|
| - astFactory.typeName(astFactory.simpleIdentifier(null), null);
|
| + TypeName type = new TypeName(new SimpleIdentifier(null), null);
|
| createParser('a');
|
| VariableDeclarationList declarationList =
|
| parser.parseVariableDeclarationListAfterType(
|
|
|