Index: pkg/analyzer/lib/dart/ast/ast_factory.dart |
diff --git a/pkg/analyzer/lib/dart/ast/ast_factory.dart b/pkg/analyzer/lib/dart/ast/ast_factory.dart |
index 48b918d8fb72d107b8c08dc39f1a9027df84b37c..10ecb40fb5a111b9c958219df4d17ed9e18bca08 100644 |
--- a/pkg/analyzer/lib/dart/ast/ast_factory.dart |
+++ b/pkg/analyzer/lib/dart/ast/ast_factory.dart |
@@ -5,6 +5,7 @@ |
import 'package:analyzer/dart/ast/ast.dart'; |
import 'package:analyzer/src/generated/utilities_dart.dart'; |
import 'package:front_end/src/scanner/token.dart'; |
+import 'package:meta/meta.dart'; |
/** |
* A collection of factory methods which may be used to create concrete |
@@ -304,8 +305,8 @@ abstract class AstFactory { |
* Returns a documentation comment consisting of the given [tokens] and having |
* the given [references] (if supplied) embedded within it. |
*/ |
- Comment documentationComment( |
- List<Token> tokens, [List<CommentReference> references]); |
+ Comment documentationComment(List<Token> tokens, |
+ [List<CommentReference> references]); |
/** |
* Returns a newly created do loop. |
@@ -431,6 +432,27 @@ abstract class AstFactory { |
FormalParameterList parameters); |
/** |
+ * Returns a newly created formal parameter. Either or both of the |
+ * [comment] and [metadata] can be `null` if the parameter does not have the |
+ * corresponding attribute. The [keyword] can be `null` if there is a type. |
+ * The [type] must be `null` if the keyword is 'var'. The [thisKeyword] and |
+ * [period] can be `null` if the keyword 'this' was not provided. The |
+ * [parameters] can be `null` if this is not a function-typed field formal |
+ * parameter. |
+ */ |
+ FieldFormalParameter fieldFormalParameter2( |
+ {Comment comment, |
+ List<Annotation> metadata, |
+ Token covariantKeyword, |
+ Token keyword, |
+ TypeAnnotation type, |
+ @required Token thisKeyword, |
+ @required Token period, |
+ @required SimpleIdentifier identifier, |
+ TypeParameterList typeParameters, |
+ FormalParameterList parameters}); |
+ |
+ /** |
* Returns a newly created for-each statement whose loop control variable |
* is declared internally (in the for-loop part). The [awaitKeyword] can be |
* `null` if this is not an asynchronous for loop. |
@@ -558,6 +580,47 @@ abstract class AstFactory { |
{Token question: null}); |
/** |
+ * Returns a newly created formal parameter. Either or both of the |
+ * [comment] and [metadata] can be `null` if the parameter does not have the |
+ * corresponding attribute. The [returnType] can be `null` if no return type |
+ * was specified. |
+ */ |
+ FunctionTypedFormalParameter functionTypedFormalParameter2( |
+ {Comment comment, |
+ List<Annotation> metadata, |
+ Token covariantKeyword, |
+ TypeAnnotation returnType, |
+ @required SimpleIdentifier identifier, |
+ TypeParameterList typeParameters, |
+ @required FormalParameterList parameters, |
+ Token question}); |
+ |
+ /** |
+ * Initialize a newly created generic function type. |
+ */ |
+ GenericFunctionType genericFunctionType( |
+ TypeAnnotation returnType, |
+ Token functionKeyword, |
+ TypeParameterList typeParameters, |
+ FormalParameterList _parameters); |
+ |
+ /** |
+ * Returns a newly created generic type alias. Either or both of the |
+ * [comment] and [metadata] can be `null` if the variable list does not have |
+ * the corresponding attribute. The [typeParameters] can be `null` if there |
+ * are no type parameters. |
+ */ |
+ GenericTypeAlias genericTypeAlias( |
+ Comment comment, |
+ List<Annotation> metadata, |
+ Token typedefKeyword, |
+ SimpleIdentifier name, |
+ TypeParameterList typeParameters, |
+ Token equals, |
+ GenericFunctionType functionType, |
+ Token semicolon); |
+ |
+ /** |
* Returns a newly created import show combinator. |
*/ |
HideCombinator hideCombinator( |
@@ -853,6 +916,20 @@ abstract class AstFactory { |
SimpleIdentifier identifier); |
/** |
+ * Returns a newly created formal parameter. Either or both of the |
+ * [comment] and [metadata] can be `null` if the parameter does not have the |
+ * corresponding attribute. The [keyword] can be `null` if a type was |
+ * specified. The [type] must be `null` if the keyword is 'var'. |
+ */ |
+ SimpleFormalParameter simpleFormalParameter2( |
+ {Comment comment, |
+ List<Annotation> metadata, |
+ Token covariantKeyword, |
+ Token keyword, |
+ TypeAnnotation type, |
+ @required SimpleIdentifier identifier}); |
+ |
+ /** |
* Returns a newly created identifier. |
*/ |
SimpleIdentifier simpleIdentifier(Token token, {bool isDeclaration: false}); |
@@ -883,7 +960,6 @@ abstract class AstFactory { |
* Returns a newly created super expression. |
*/ |
SuperExpression superExpression(Token superKeyword); |
- |
/** |
Brian Wilkerson
2017/02/24 18:27:59
nit: restore blank line
|
* Returns a newly created switch case. The list of [labels] can be `null` |
* if there are no labels. |
@@ -897,6 +973,7 @@ abstract class AstFactory { |
*/ |
SwitchDefault switchDefault(List<Label> labels, Token keyword, Token colon, |
List<Statement> statements); |
+ |
/** |
* Returns a newly created switch statement. The list of [members] can be |
* `null` if there are no switch members. |
@@ -993,19 +1070,6 @@ abstract class AstFactory { |
List<VariableDeclaration> variables); |
/** |
- * Returns a newly created generic type alias. Either or both of the |
- * [comment] and [metadata] can be `null` if the variable list does not have |
- * the corresponding attribute. The [typeParameters] can be `null` if there |
- * are no type parameters. |
- */ |
- GenericTypeAlias genericTypeAlias(Comment comment, List<Annotation> metadata, Token typedefKeyword, SimpleIdentifier name, TypeParameterList typeParameters, Token equals, GenericFunctionType functionType, Token semicolon); |
- |
- /** |
- * Initialize a newly created generic function type. |
- */ |
- GenericFunctionType genericFunctionType(TypeAnnotation returnType, Token functionKeyword, TypeParameterList typeParameters, FormalParameterList _parameters); |
- |
- /** |
* Returns a newly created variable declaration statement. |
*/ |
VariableDeclarationStatement variableDeclarationStatement( |