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

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

Issue 2622303006: Reapply "Add support for generic function type syntax, part 1" (Closed)
Patch Set: Created 3 years, 11 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.dart ('k') | pkg/analyzer/lib/src/dart/ast/resolution_map.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/ast_factory.dart
diff --git a/pkg/analyzer/lib/src/dart/ast/ast_factory.dart b/pkg/analyzer/lib/src/dart/ast/ast_factory.dart
index 72079b6ef6d7bc3f3b903e43f5af09dd5d3a8081..482ae0161c3fd87e9797c5a9f3904c25ff169027 100644
--- a/pkg/analyzer/lib/src/dart/ast/ast_factory.dart
+++ b/pkg/analyzer/lib/src/dart/ast/ast_factory.dart
@@ -29,7 +29,7 @@ class AstFactoryImpl extends AstFactory {
@override
AsExpression asExpression(
- Expression expression, Token asOperator, TypeName type) =>
+ Expression expression, Token asOperator, TypeAnnotation type) =>
new AsExpressionImpl(expression, asOperator, type);
@override
@@ -98,7 +98,7 @@ class AstFactoryImpl extends AstFactory {
@override
CatchClause catchClause(
Token onKeyword,
- TypeName exceptionType,
+ TypeAnnotation exceptionType,
Token catchKeyword,
Token leftParenthesis,
SimpleIdentifier exceptionParameter,
@@ -262,7 +262,7 @@ class AstFactoryImpl extends AstFactory {
Comment comment,
List<Annotation> metadata,
Token keyword,
- TypeName type,
+ TypeAnnotation type,
SimpleIdentifier identifier) =>
new DeclaredIdentifierImpl(comment, metadata, keyword, type, identifier);
@@ -367,7 +367,7 @@ class AstFactoryImpl extends AstFactory {
Comment comment,
List<Annotation> metadata,
Token keyword,
- TypeName type,
+ TypeAnnotation type,
Token thisKeyword,
Token period,
SimpleIdentifier identifier,
@@ -455,7 +455,7 @@ class AstFactoryImpl extends AstFactory {
Comment comment,
List<Annotation> metadata,
Token externalKeyword,
- TypeName returnType,
+ TypeAnnotation returnType,
Token propertyKeyword,
SimpleIdentifier name,
FunctionExpression functionExpression) =>
@@ -483,7 +483,7 @@ class AstFactoryImpl extends AstFactory {
Comment comment,
List<Annotation> metadata,
Token keyword,
- TypeName returnType,
+ TypeAnnotation returnType,
SimpleIdentifier name,
TypeParameterList typeParameters,
FormalParameterList parameters,
@@ -495,7 +495,7 @@ class AstFactoryImpl extends AstFactory {
FunctionTypedFormalParameter functionTypedFormalParameter(
Comment comment,
List<Annotation> metadata,
- TypeName returnType,
+ TypeAnnotation returnType,
SimpleIdentifier identifier,
TypeParameterList typeParameters,
FormalParameterList parameters,
@@ -504,6 +504,28 @@ class AstFactoryImpl extends AstFactory {
identifier, typeParameters, parameters, question);
@override
+ GenericFunctionType genericFunctionType(
+ TypeAnnotation returnType,
+ Token functionKeyword,
+ TypeParameterList typeParameters,
+ FormalParameterList _parameters) =>
+ new GenericFunctionTypeImpl(
+ returnType, functionKeyword, typeParameters, _parameters);
+
+ @override
+ GenericTypeAlias genericTypeAlias(
+ Comment comment,
+ List<Annotation> metadata,
+ Token typedefKeyword,
+ SimpleIdentifier name,
+ TypeParameterList typeParameters,
+ Token equals,
+ GenericFunctionType functionType,
+ Token semicolon) =>
+ new GenericTypeAliasImpl(comment, metadata, typedefKeyword, name,
+ typeParameters, equals, functionType, semicolon);
+
+ @override
HideCombinator hideCombinator(
Token keyword, List<SimpleIdentifier> hiddenNames) =>
new HideCombinatorImpl(keyword, hiddenNames);
@@ -582,7 +604,7 @@ class AstFactoryImpl extends AstFactory {
@override
IsExpression isExpression(Expression expression, Token isOperator,
- Token notOperator, TypeName type) =>
+ Token notOperator, TypeAnnotation type) =>
new IsExpressionImpl(expression, isOperator, notOperator, type);
@override
@@ -630,7 +652,7 @@ class AstFactoryImpl extends AstFactory {
List<Annotation> metadata,
Token externalKeyword,
Token modifierKeyword,
- TypeName returnType,
+ TypeAnnotation returnType,
Token propertyKeyword,
Token operatorKeyword,
SimpleIdentifier name,
@@ -753,7 +775,7 @@ class AstFactoryImpl extends AstFactory {
Comment comment,
List<Annotation> metadata,
Token keyword,
- TypeName type,
+ TypeAnnotation type,
SimpleIdentifier identifier) =>
new SimpleFormalParameterImpl(
comment, metadata, keyword, type, identifier);
@@ -787,7 +809,6 @@ class AstFactoryImpl extends AstFactory {
@override
SuperExpression superExpression(Token superKeyword) =>
new SuperExpressionImpl(superKeyword);
-
@override
SwitchCase switchCase(List<Label> labels, Token keyword,
Expression expression, Token colon, List<Statement> statements) =>
@@ -797,6 +818,7 @@ class AstFactoryImpl extends AstFactory {
SwitchDefault switchDefault(List<Label> labels, Token keyword, Token colon,
List<Statement> statements) =>
new SwitchDefaultImpl(labels, keyword, colon, statements);
+
@override
SwitchStatement switchStatement(
Token switchKeyword,
@@ -841,8 +863,8 @@ class AstFactoryImpl extends AstFactory {
tryKeyword, body, catchClauses, finallyKeyword, finallyBlock);
@override
- TypeArgumentList typeArgumentList(
- Token leftBracket, List<TypeName> arguments, Token rightBracket) =>
+ TypeArgumentList typeArgumentList(Token leftBracket,
+ List<TypeAnnotation> arguments, Token rightBracket) =>
new TypeArgumentListImpl(leftBracket, arguments, rightBracket);
@override
@@ -852,7 +874,7 @@ class AstFactoryImpl extends AstFactory {
@override
TypeParameter typeParameter(Comment comment, List<Annotation> metadata,
- SimpleIdentifier name, Token extendsKeyword, TypeName bound) =>
+ SimpleIdentifier name, Token extendsKeyword, TypeAnnotation bound) =>
new TypeParameterImpl(comment, metadata, name, extendsKeyword, bound);
@override
@@ -870,7 +892,7 @@ class AstFactoryImpl extends AstFactory {
Comment comment,
List<Annotation> metadata,
Token keyword,
- TypeName type,
+ TypeAnnotation type,
List<VariableDeclaration> variables) =>
new VariableDeclarationListImpl(
comment, metadata, keyword, type, variables);
« no previous file with comments | « pkg/analyzer/lib/src/dart/ast/ast.dart ('k') | pkg/analyzer/lib/src/dart/ast/resolution_map.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698