Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 | 8 |
| 9 /** | 9 /** |
| 10 * A collection of factory methods which may be used to create concrete | 10 * A collection of factory methods which may be used to create concrete |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 297 * Returns a newly created default formal parameter. The [separator] and | 297 * Returns a newly created default formal parameter. The [separator] and |
| 298 * [defaultValue] can be `null` if there is no default value. | 298 * [defaultValue] can be `null` if there is no default value. |
| 299 */ | 299 */ |
| 300 DefaultFormalParameter defaultFormalParameter(NormalFormalParameter parameter, | 300 DefaultFormalParameter defaultFormalParameter(NormalFormalParameter parameter, |
| 301 ParameterKind kind, Token separator, Expression defaultValue); | 301 ParameterKind kind, Token separator, Expression defaultValue); |
| 302 | 302 |
| 303 /** | 303 /** |
| 304 * Returns a documentation comment consisting of the given [tokens] and having | 304 * Returns a documentation comment consisting of the given [tokens] and having |
| 305 * the given [references] (if supplied) embedded within it. | 305 * the given [references] (if supplied) embedded within it. |
| 306 */ | 306 */ |
| 307 Comment documentationComment( | 307 Comment documentationComment(List<Token> tokens, |
| 308 List<Token> tokens, [List<CommentReference> references]); | 308 [List<CommentReference> references]); |
| 309 | 309 |
| 310 /** | 310 /** |
| 311 * Returns a newly created do loop. | 311 * Returns a newly created do loop. |
| 312 */ | 312 */ |
| 313 DoStatement doStatement( | 313 DoStatement doStatement( |
| 314 Token doKeyword, | 314 Token doKeyword, |
| 315 Statement body, | 315 Statement body, |
| 316 Token whileKeyword, | 316 Token whileKeyword, |
| 317 Token leftParenthesis, | 317 Token leftParenthesis, |
| 318 Expression condition, | 318 Expression condition, |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 415 * [comment] and [metadata] can be `null` if the parameter does not have the | 415 * [comment] and [metadata] can be `null` if the parameter does not have the |
| 416 * corresponding attribute. The [keyword] can be `null` if there is a type. | 416 * corresponding attribute. The [keyword] can be `null` if there is a type. |
| 417 * The [type] must be `null` if the keyword is 'var'. The [thisKeyword] and | 417 * The [type] must be `null` if the keyword is 'var'. The [thisKeyword] and |
| 418 * [period] can be `null` if the keyword 'this' was not provided. The | 418 * [period] can be `null` if the keyword 'this' was not provided. The |
| 419 * [parameters] can be `null` if this is not a function-typed field formal | 419 * [parameters] can be `null` if this is not a function-typed field formal |
| 420 * parameter. | 420 * parameter. |
| 421 */ | 421 */ |
| 422 FieldFormalParameter fieldFormalParameter( | 422 FieldFormalParameter fieldFormalParameter( |
| 423 Comment comment, | 423 Comment comment, |
| 424 List<Annotation> metadata, | 424 List<Annotation> metadata, |
| 425 Token covariantKeyword, | |
|
Paul Berry
2017/02/23 22:49:20
This is a breaking change that's going to affect c
Brian Wilkerson
2017/02/23 22:53:45
Is code_builder using the bleeding edge version?
| |
| 425 Token keyword, | 426 Token keyword, |
| 426 TypeAnnotation type, | 427 TypeAnnotation type, |
| 427 Token thisKeyword, | 428 Token thisKeyword, |
| 428 Token period, | 429 Token period, |
| 429 SimpleIdentifier identifier, | 430 SimpleIdentifier identifier, |
| 430 TypeParameterList typeParameters, | 431 TypeParameterList typeParameters, |
| 431 FormalParameterList parameters); | 432 FormalParameterList parameters); |
| 432 | 433 |
| 433 /** | 434 /** |
| 434 * Returns a newly created for-each statement whose loop control variable | 435 * Returns a newly created for-each statement whose loop control variable |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 544 | 545 |
| 545 /** | 546 /** |
| 546 * Returns a newly created formal parameter. Either or both of the | 547 * Returns a newly created formal parameter. Either or both of the |
| 547 * [comment] and [metadata] can be `null` if the parameter does not have the | 548 * [comment] and [metadata] can be `null` if the parameter does not have the |
| 548 * corresponding attribute. The [returnType] can be `null` if no return type | 549 * corresponding attribute. The [returnType] can be `null` if no return type |
| 549 * was specified. | 550 * was specified. |
| 550 */ | 551 */ |
| 551 FunctionTypedFormalParameter functionTypedFormalParameter( | 552 FunctionTypedFormalParameter functionTypedFormalParameter( |
| 552 Comment comment, | 553 Comment comment, |
| 553 List<Annotation> metadata, | 554 List<Annotation> metadata, |
| 555 Token covariantKeyword, | |
| 554 TypeAnnotation returnType, | 556 TypeAnnotation returnType, |
| 555 SimpleIdentifier identifier, | 557 SimpleIdentifier identifier, |
| 556 TypeParameterList typeParameters, | 558 TypeParameterList typeParameters, |
| 557 FormalParameterList parameters, | 559 FormalParameterList parameters, |
| 558 {Token question: null}); | 560 {Token question: null}); |
| 559 | 561 |
| 560 /** | 562 /** |
| 563 * Initialize a newly created generic function type. | |
| 564 */ | |
| 565 GenericFunctionType genericFunctionType( | |
| 566 TypeAnnotation returnType, | |
| 567 Token functionKeyword, | |
| 568 TypeParameterList typeParameters, | |
| 569 FormalParameterList _parameters); | |
| 570 | |
| 571 /** | |
| 572 * Returns a newly created generic type alias. Either or both of the | |
| 573 * [comment] and [metadata] can be `null` if the variable list does not have | |
| 574 * the corresponding attribute. The [typeParameters] can be `null` if there | |
| 575 * are no type parameters. | |
| 576 */ | |
| 577 GenericTypeAlias genericTypeAlias( | |
| 578 Comment comment, | |
| 579 List<Annotation> metadata, | |
| 580 Token typedefKeyword, | |
| 581 SimpleIdentifier name, | |
| 582 TypeParameterList typeParameters, | |
| 583 Token equals, | |
| 584 GenericFunctionType functionType, | |
| 585 Token semicolon); | |
| 586 | |
| 587 /** | |
| 561 * Returns a newly created import show combinator. | 588 * Returns a newly created import show combinator. |
| 562 */ | 589 */ |
| 563 HideCombinator hideCombinator( | 590 HideCombinator hideCombinator( |
| 564 Token keyword, List<SimpleIdentifier> hiddenNames); | 591 Token keyword, List<SimpleIdentifier> hiddenNames); |
| 565 | 592 |
| 566 /** | 593 /** |
| 567 * Returns a newly created if statement. The [elseKeyword] and | 594 * Returns a newly created if statement. The [elseKeyword] and |
| 568 * [elseStatement] can be `null` if there is no else clause. | 595 * [elseStatement] can be `null` if there is no else clause. |
| 569 */ | 596 */ |
| 570 IfStatement ifStatement( | 597 IfStatement ifStatement( |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 841 | 868 |
| 842 /** | 869 /** |
| 843 * Returns a newly created formal parameter. Either or both of the | 870 * Returns a newly created formal parameter. Either or both of the |
| 844 * [comment] and [metadata] can be `null` if the parameter does not have the | 871 * [comment] and [metadata] can be `null` if the parameter does not have the |
| 845 * corresponding attribute. The [keyword] can be `null` if a type was | 872 * corresponding attribute. The [keyword] can be `null` if a type was |
| 846 * specified. The [type] must be `null` if the keyword is 'var'. | 873 * specified. The [type] must be `null` if the keyword is 'var'. |
| 847 */ | 874 */ |
| 848 SimpleFormalParameter simpleFormalParameter( | 875 SimpleFormalParameter simpleFormalParameter( |
| 849 Comment comment, | 876 Comment comment, |
| 850 List<Annotation> metadata, | 877 List<Annotation> metadata, |
| 878 Token covariantKeyword, | |
|
Paul Berry
2017/02/23 22:49:20
Same issue here.
| |
| 851 Token keyword, | 879 Token keyword, |
| 852 TypeAnnotation type, | 880 TypeAnnotation type, |
| 853 SimpleIdentifier identifier); | 881 SimpleIdentifier identifier); |
| 854 | 882 |
| 855 /** | 883 /** |
| 856 * Returns a newly created identifier. | 884 * Returns a newly created identifier. |
| 857 */ | 885 */ |
| 858 SimpleIdentifier simpleIdentifier(Token token, {bool isDeclaration: false}); | 886 SimpleIdentifier simpleIdentifier(Token token, {bool isDeclaration: false}); |
| 859 | 887 |
| 860 /** | 888 /** |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 876 SuperConstructorInvocation superConstructorInvocation( | 904 SuperConstructorInvocation superConstructorInvocation( |
| 877 Token superKeyword, | 905 Token superKeyword, |
| 878 Token period, | 906 Token period, |
| 879 SimpleIdentifier constructorName, | 907 SimpleIdentifier constructorName, |
| 880 ArgumentList argumentList); | 908 ArgumentList argumentList); |
| 881 | 909 |
| 882 /** | 910 /** |
| 883 * Returns a newly created super expression. | 911 * Returns a newly created super expression. |
| 884 */ | 912 */ |
| 885 SuperExpression superExpression(Token superKeyword); | 913 SuperExpression superExpression(Token superKeyword); |
| 886 | |
| 887 /** | 914 /** |
|
Brian Wilkerson
2017/02/23 22:46:14
Restore blank line.
| |
| 888 * Returns a newly created switch case. The list of [labels] can be `null` | 915 * Returns a newly created switch case. The list of [labels] can be `null` |
| 889 * if there are no labels. | 916 * if there are no labels. |
| 890 */ | 917 */ |
| 891 SwitchCase switchCase(List<Label> labels, Token keyword, | 918 SwitchCase switchCase(List<Label> labels, Token keyword, |
| 892 Expression expression, Token colon, List<Statement> statements); | 919 Expression expression, Token colon, List<Statement> statements); |
| 893 | 920 |
| 894 /** | 921 /** |
| 895 * Returns a newly created switch default. The list of [labels] can be | 922 * Returns a newly created switch default. The list of [labels] can be |
| 896 * `null` if there are no labels. | 923 * `null` if there are no labels. |
| 897 */ | 924 */ |
| 898 SwitchDefault switchDefault(List<Label> labels, Token keyword, Token colon, | 925 SwitchDefault switchDefault(List<Label> labels, Token keyword, Token colon, |
| 899 List<Statement> statements); | 926 List<Statement> statements); |
| 927 | |
| 900 /** | 928 /** |
| 901 * Returns a newly created switch statement. The list of [members] can be | 929 * Returns a newly created switch statement. The list of [members] can be |
| 902 * `null` if there are no switch members. | 930 * `null` if there are no switch members. |
| 903 */ | 931 */ |
| 904 SwitchStatement switchStatement( | 932 SwitchStatement switchStatement( |
| 905 Token switchKeyword, | 933 Token switchKeyword, |
| 906 Token leftParenthesis, | 934 Token leftParenthesis, |
| 907 Expression expression, | 935 Expression expression, |
| 908 Token rightParenthesis, | 936 Token rightParenthesis, |
| 909 Token leftBracket, | 937 Token leftBracket, |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 986 * specified. The [type] must be `null` if the keyword is 'var'. | 1014 * specified. The [type] must be `null` if the keyword is 'var'. |
| 987 */ | 1015 */ |
| 988 VariableDeclarationList variableDeclarationList( | 1016 VariableDeclarationList variableDeclarationList( |
| 989 Comment comment, | 1017 Comment comment, |
| 990 List<Annotation> metadata, | 1018 List<Annotation> metadata, |
| 991 Token keyword, | 1019 Token keyword, |
| 992 TypeAnnotation type, | 1020 TypeAnnotation type, |
| 993 List<VariableDeclaration> variables); | 1021 List<VariableDeclaration> variables); |
| 994 | 1022 |
| 995 /** | 1023 /** |
| 996 * Returns a newly created generic type alias. Either or both of the | |
| 997 * [comment] and [metadata] can be `null` if the variable list does not have | |
| 998 * the corresponding attribute. The [typeParameters] can be `null` if there | |
| 999 * are no type parameters. | |
| 1000 */ | |
| 1001 GenericTypeAlias genericTypeAlias(Comment comment, List<Annotation> metadata, Token typedefKeyword, SimpleIdentifier name, TypeParameterList typeParameters, T oken equals, GenericFunctionType functionType, Token semicolon); | |
| 1002 | |
| 1003 /** | |
| 1004 * Initialize a newly created generic function type. | |
| 1005 */ | |
| 1006 GenericFunctionType genericFunctionType(TypeAnnotation returnType, Token funct ionKeyword, TypeParameterList typeParameters, FormalParameterList _parameters); | |
| 1007 | |
| 1008 /** | |
| 1009 * Returns a newly created variable declaration statement. | 1024 * Returns a newly created variable declaration statement. |
| 1010 */ | 1025 */ |
| 1011 VariableDeclarationStatement variableDeclarationStatement( | 1026 VariableDeclarationStatement variableDeclarationStatement( |
| 1012 VariableDeclarationList variableList, Token semicolon); | 1027 VariableDeclarationList variableList, Token semicolon); |
| 1013 | 1028 |
| 1014 /** | 1029 /** |
| 1015 * Returns a newly created while statement. | 1030 * Returns a newly created while statement. |
| 1016 */ | 1031 */ |
| 1017 WhileStatement whileStatement(Token whileKeyword, Token leftParenthesis, | 1032 WhileStatement whileStatement(Token whileKeyword, Token leftParenthesis, |
| 1018 Expression condition, Token rightParenthesis, Statement body); | 1033 Expression condition, Token rightParenthesis, Statement body); |
| 1019 | 1034 |
| 1020 /** | 1035 /** |
| 1021 * Returns a newly created with clause. | 1036 * Returns a newly created with clause. |
| 1022 */ | 1037 */ |
| 1023 WithClause withClause(Token withKeyword, List<TypeName> mixinTypes); | 1038 WithClause withClause(Token withKeyword, List<TypeName> mixinTypes); |
| 1024 | 1039 |
| 1025 /** | 1040 /** |
| 1026 * Returns a newly created yield expression. The [star] can be `null` if no | 1041 * Returns a newly created yield expression. The [star] can be `null` if no |
| 1027 * star was provided. | 1042 * star was provided. |
| 1028 */ | 1043 */ |
| 1029 YieldStatement yieldStatement( | 1044 YieldStatement yieldStatement( |
| 1030 Token yieldKeyword, Token star, Expression expression, Token semicolon); | 1045 Token yieldKeyword, Token star, Expression expression, Token semicolon); |
| 1031 } | 1046 } |
| OLD | NEW |