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

Side by Side Diff: pkg/analyzer/lib/dart/ast/ast_factory.dart

Issue 2726943002: Mark not-optional-parameters methods of AstFactory as deprecated. (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/testing/ast_test_factory.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'package:analyzer/dart/ast/ast.dart'; 5 import 'package:analyzer/dart/ast/ast.dart';
6 import 'package:analyzer/src/generated/utilities_dart.dart'; 6 import 'package:analyzer/src/generated/utilities_dart.dart';
7 import 'package:front_end/src/scanner/token.dart'; 7 import 'package:front_end/src/scanner/token.dart';
8 import 'package:meta/meta.dart'; 8 import 'package:meta/meta.dart';
9 9
10 /** 10 /**
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 /** 76 /**
77 * Returns a newly created await expression. 77 * Returns a newly created await expression.
78 */ 78 */
79 AwaitExpression awaitExpression(Token awaitKeyword, Expression expression); 79 AwaitExpression awaitExpression(Token awaitKeyword, Expression expression);
80 80
81 /** 81 /**
82 * Returns a newly created binary expression. 82 * Returns a newly created binary expression.
83 */ 83 */
84 BinaryExpression binaryExpression( 84 BinaryExpression binaryExpression(
85 Expression leftOperand, Token operator, Expression rightOperand); 85 Expression leftOperand, Token operator, Expression rightOperand);
86
86 /** 87 /**
87 * Returns a newly created block of code. 88 * Returns a newly created block of code.
88 */ 89 */
89 Block block( 90 Block block(
90 Token leftBracket, List<Statement> statements, Token rightBracket); 91 Token leftBracket, List<Statement> statements, Token rightBracket);
91 92
92 /** 93 /**
93 * Returns a block comment consisting of the given [tokens]. 94 * Returns a block comment consisting of the given [tokens].
94 */ 95 */
95 Comment blockComment(List<Token> tokens); 96 Comment blockComment(List<Token> tokens);
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 /** 401 /**
401 * Returns a newly created extends clause. 402 * Returns a newly created extends clause.
402 */ 403 */
403 ExtendsClause extendsClause(Token extendsKeyword, TypeName superclass); 404 ExtendsClause extendsClause(Token extendsKeyword, TypeName superclass);
404 405
405 /** 406 /**
406 * Returns a newly created field declaration. Either or both of the 407 * Returns a newly created field declaration. Either or both of the
407 * [comment] and [metadata] can be `null` if the declaration does not have the 408 * [comment] and [metadata] can be `null` if the declaration does not have the
408 * corresponding attribute. The [staticKeyword] can be `null` if the field is 409 * corresponding attribute. The [staticKeyword] can be `null` if the field is
409 * not a static field. 410 * not a static field.
411 *
412 * Use [fieldDeclaration2] instead.
410 */ 413 */
414 @deprecated
411 FieldDeclaration fieldDeclaration(Comment comment, List<Annotation> metadata, 415 FieldDeclaration fieldDeclaration(Comment comment, List<Annotation> metadata,
412 Token staticKeyword, VariableDeclarationList fieldList, Token semicolon); 416 Token staticKeyword, VariableDeclarationList fieldList, Token semicolon);
413 417
414 /** 418 /**
415 * Returns a newly created field declaration. Either or both of the 419 * Returns a newly created field declaration. Either or both of the
416 * [comment] and [metadata] can be `null` if the declaration does not have the 420 * [comment] and [metadata] can be `null` if the declaration does not have the
417 * corresponding attribute. The [staticKeyword] can be `null` if the field is 421 * corresponding attribute. The [staticKeyword] can be `null` if the field is
418 * not a static field. 422 * not a static field.
419 */ 423 */
420 FieldDeclaration fieldDeclaration2( 424 FieldDeclaration fieldDeclaration2(
421 {Comment comment, 425 {Comment comment,
422 List<Annotation> metadata, 426 List<Annotation> metadata,
423 Token covariantKeyword, 427 Token covariantKeyword,
424 Token staticKeyword, 428 Token staticKeyword,
425 @required VariableDeclarationList fieldList, 429 @required VariableDeclarationList fieldList,
426 @required Token semicolon}); 430 @required Token semicolon});
427 431
428 /** 432 /**
429 * Returns a newly created formal parameter. Either or both of the 433 * Returns a newly created formal parameter. Either or both of the
430 * [comment] and [metadata] can be `null` if the parameter does not have the 434 * [comment] and [metadata] can be `null` if the parameter does not have the
431 * corresponding attribute. The [keyword] can be `null` if there is a type. 435 * corresponding attribute. The [keyword] can be `null` if there is a type.
432 * The [type] must be `null` if the keyword is 'var'. The [thisKeyword] and 436 * The [type] must be `null` if the keyword is 'var'. The [thisKeyword] and
433 * [period] can be `null` if the keyword 'this' was not provided. The 437 * [period] can be `null` if the keyword 'this' was not provided. The
434 * [parameters] can be `null` if this is not a function-typed field formal 438 * [parameters] can be `null` if this is not a function-typed field formal
435 * parameter. 439 * parameter.
440 *
441 * Use [fieldFormalParameter2] instead.
436 */ 442 */
443 @deprecated
437 FieldFormalParameter fieldFormalParameter( 444 FieldFormalParameter fieldFormalParameter(
438 Comment comment, 445 Comment comment,
439 List<Annotation> metadata, 446 List<Annotation> metadata,
440 Token keyword, 447 Token keyword,
441 TypeAnnotation type, 448 TypeAnnotation type,
442 Token thisKeyword, 449 Token thisKeyword,
443 Token period, 450 Token period,
444 SimpleIdentifier identifier, 451 SimpleIdentifier identifier,
445 TypeParameterList typeParameters, 452 TypeParameterList typeParameters,
446 FormalParameterList parameters); 453 FormalParameterList parameters);
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 SimpleIdentifier name, 583 SimpleIdentifier name,
577 TypeParameterList typeParameters, 584 TypeParameterList typeParameters,
578 FormalParameterList parameters, 585 FormalParameterList parameters,
579 Token semicolon); 586 Token semicolon);
580 587
581 /** 588 /**
582 * Returns a newly created formal parameter. Either or both of the 589 * Returns a newly created formal parameter. Either or both of the
583 * [comment] and [metadata] can be `null` if the parameter does not have the 590 * [comment] and [metadata] can be `null` if the parameter does not have the
584 * corresponding attribute. The [returnType] can be `null` if no return type 591 * corresponding attribute. The [returnType] can be `null` if no return type
585 * was specified. 592 * was specified.
593 *
594 * Use [functionTypedFormalParameter2] instead.
586 */ 595 */
596 @deprecated
587 FunctionTypedFormalParameter functionTypedFormalParameter( 597 FunctionTypedFormalParameter functionTypedFormalParameter(
588 Comment comment, 598 Comment comment,
589 List<Annotation> metadata, 599 List<Annotation> metadata,
590 TypeAnnotation returnType, 600 TypeAnnotation returnType,
591 SimpleIdentifier identifier, 601 SimpleIdentifier identifier,
592 TypeParameterList typeParameters, 602 TypeParameterList typeParameters,
593 FormalParameterList parameters, 603 FormalParameterList parameters,
594 {Token question: null}); 604 {Token question: null});
595 605
596 /** 606 /**
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 * Returns a newly created import show combinator. 924 * Returns a newly created import show combinator.
915 */ 925 */
916 ShowCombinator showCombinator( 926 ShowCombinator showCombinator(
917 Token keyword, List<SimpleIdentifier> shownNames); 927 Token keyword, List<SimpleIdentifier> shownNames);
918 928
919 /** 929 /**
920 * Returns a newly created formal parameter. Either or both of the 930 * Returns a newly created formal parameter. Either or both of the
921 * [comment] and [metadata] can be `null` if the parameter does not have the 931 * [comment] and [metadata] can be `null` if the parameter does not have the
922 * corresponding attribute. The [keyword] can be `null` if a type was 932 * corresponding attribute. The [keyword] can be `null` if a type was
923 * specified. The [type] must be `null` if the keyword is 'var'. 933 * specified. The [type] must be `null` if the keyword is 'var'.
934 *
935 * Use [simpleFormalParameter2] instead.
924 */ 936 */
937 @deprecated
925 SimpleFormalParameter simpleFormalParameter( 938 SimpleFormalParameter simpleFormalParameter(
926 Comment comment, 939 Comment comment,
927 List<Annotation> metadata, 940 List<Annotation> metadata,
928 Token keyword, 941 Token keyword,
929 TypeAnnotation type, 942 TypeAnnotation type,
930 SimpleIdentifier identifier); 943 SimpleIdentifier identifier);
931 944
932 /** 945 /**
933 * Returns a newly created formal parameter. Either or both of the 946 * Returns a newly created formal parameter. Either or both of the
934 * [comment] and [metadata] can be `null` if the parameter does not have the 947 * [comment] and [metadata] can be `null` if the parameter does not have the
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
1101 */ 1114 */
1102 WithClause withClause(Token withKeyword, List<TypeName> mixinTypes); 1115 WithClause withClause(Token withKeyword, List<TypeName> mixinTypes);
1103 1116
1104 /** 1117 /**
1105 * Returns a newly created yield expression. The [star] can be `null` if no 1118 * Returns a newly created yield expression. The [star] can be `null` if no
1106 * star was provided. 1119 * star was provided.
1107 */ 1120 */
1108 YieldStatement yieldStatement( 1121 YieldStatement yieldStatement(
1109 Token yieldKeyword, Token star, Expression expression, Token semicolon); 1122 Token yieldKeyword, Token star, Expression expression, Token semicolon);
1110 } 1123 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/testing/ast_test_factory.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698