mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 08:51:21 +00:00
Mark not-optional-parameters methods of AstFactory as deprecated.
...and use non-deprecated versions in AstTestFactory. R=brianwilkerson@google.com, paulberry@google.com BUG= Review-Url: https://codereview.chromium.org/2726943002 .
This commit is contained in:
parent
93bf98045c
commit
99b1f617dc
|
@ -83,6 +83,7 @@ abstract class AstFactory {
|
|||
*/
|
||||
BinaryExpression binaryExpression(
|
||||
Expression leftOperand, Token operator, Expression rightOperand);
|
||||
|
||||
/**
|
||||
* Returns a newly created block of code.
|
||||
*/
|
||||
|
@ -407,7 +408,10 @@ abstract class AstFactory {
|
|||
* [comment] and [metadata] can be `null` if the declaration does not have the
|
||||
* corresponding attribute. The [staticKeyword] can be `null` if the field is
|
||||
* not a static field.
|
||||
*
|
||||
* Use [fieldDeclaration2] instead.
|
||||
*/
|
||||
@deprecated
|
||||
FieldDeclaration fieldDeclaration(Comment comment, List<Annotation> metadata,
|
||||
Token staticKeyword, VariableDeclarationList fieldList, Token semicolon);
|
||||
|
||||
|
@ -433,7 +437,10 @@ abstract class AstFactory {
|
|||
* [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.
|
||||
*
|
||||
* Use [fieldFormalParameter2] instead.
|
||||
*/
|
||||
@deprecated
|
||||
FieldFormalParameter fieldFormalParameter(
|
||||
Comment comment,
|
||||
List<Annotation> metadata,
|
||||
|
@ -583,7 +590,10 @@ abstract class AstFactory {
|
|||
* [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.
|
||||
*
|
||||
* Use [functionTypedFormalParameter2] instead.
|
||||
*/
|
||||
@deprecated
|
||||
FunctionTypedFormalParameter functionTypedFormalParameter(
|
||||
Comment comment,
|
||||
List<Annotation> metadata,
|
||||
|
@ -921,7 +931,10 @@ abstract class AstFactory {
|
|||
* [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'.
|
||||
*
|
||||
* Use [simpleFormalParameter2] instead.
|
||||
*/
|
||||
@deprecated
|
||||
SimpleFormalParameter simpleFormalParameter(
|
||||
Comment comment,
|
||||
List<Annotation> metadata,
|
||||
|
|
|
@ -484,16 +484,14 @@ class AstTestFactory {
|
|||
static FieldFormalParameter fieldFormalParameter(
|
||||
Keyword keyword, TypeAnnotation type, String identifier,
|
||||
[FormalParameterList parameterList]) =>
|
||||
astFactory.fieldFormalParameter(
|
||||
null,
|
||||
null,
|
||||
keyword == null ? null : TokenFactory.tokenFromKeyword(keyword),
|
||||
type,
|
||||
TokenFactory.tokenFromKeyword(Keyword.THIS),
|
||||
TokenFactory.tokenFromType(TokenType.PERIOD),
|
||||
identifier3(identifier),
|
||||
null,
|
||||
parameterList);
|
||||
astFactory.fieldFormalParameter2(
|
||||
keyword:
|
||||
keyword == null ? null : TokenFactory.tokenFromKeyword(keyword),
|
||||
type: type,
|
||||
thisKeyword: TokenFactory.tokenFromKeyword(Keyword.THIS),
|
||||
period: TokenFactory.tokenFromType(TokenType.PERIOD),
|
||||
identifier: identifier3(identifier),
|
||||
parameters: parameterList);
|
||||
|
||||
static FieldFormalParameter fieldFormalParameter2(String identifier) =>
|
||||
fieldFormalParameter(null, null, identifier);
|
||||
|
@ -609,8 +607,10 @@ class AstTestFactory {
|
|||
static FunctionTypedFormalParameter functionTypedFormalParameter(
|
||||
TypeAnnotation returnType, String identifier,
|
||||
[List<FormalParameter> parameters]) =>
|
||||
astFactory.functionTypedFormalParameter(null, null, returnType,
|
||||
identifier3(identifier), null, formalParameterList(parameters));
|
||||
astFactory.functionTypedFormalParameter2(
|
||||
returnType: returnType,
|
||||
identifier: identifier3(identifier),
|
||||
parameters: formalParameterList(parameters));
|
||||
|
||||
static HideCombinator hideCombinator(List<SimpleIdentifier> identifiers) =>
|
||||
astFactory.hideCombinator(
|
||||
|
@ -1065,12 +1065,11 @@ class AstTestFactory {
|
|||
|
||||
static SimpleFormalParameter simpleFormalParameter2(
|
||||
Keyword keyword, TypeAnnotation type, String parameterName) =>
|
||||
astFactory.simpleFormalParameter(
|
||||
null,
|
||||
null,
|
||||
keyword == null ? null : TokenFactory.tokenFromKeyword(keyword),
|
||||
type,
|
||||
identifier3(parameterName));
|
||||
astFactory.simpleFormalParameter2(
|
||||
keyword:
|
||||
keyword == null ? null : TokenFactory.tokenFromKeyword(keyword),
|
||||
type: type,
|
||||
identifier: identifier3(parameterName));
|
||||
|
||||
static SimpleFormalParameter simpleFormalParameter3(String parameterName) =>
|
||||
simpleFormalParameter2(null, null, parameterName);
|
||||
|
|
Loading…
Reference in a new issue