OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library analyzer.src.generated.testing.ast_test_factory; | 5 library analyzer.src.generated.testing.ast_test_factory; |
6 | 6 |
7 import 'package:analyzer/dart/ast/ast.dart'; | 7 import 'package:analyzer/dart/ast/ast.dart'; |
8 import 'package:analyzer/dart/ast/standard_ast_factory.dart'; | 8 import 'package:analyzer/dart/ast/standard_ast_factory.dart'; |
9 import 'package:analyzer/dart/ast/token.dart'; | 9 import 'package:analyzer/dart/ast/token.dart'; |
10 import 'package:analyzer/dart/element/element.dart'; | 10 import 'package:analyzer/dart/element/element.dart'; |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 static FieldDeclaration fieldDeclaration2(bool isStatic, Keyword keyword, | 481 static FieldDeclaration fieldDeclaration2(bool isStatic, Keyword keyword, |
482 List<VariableDeclaration> variables) => | 482 List<VariableDeclaration> variables) => |
483 fieldDeclaration(isStatic, keyword, null, variables); | 483 fieldDeclaration(isStatic, keyword, null, variables); |
484 | 484 |
485 static FieldFormalParameter fieldFormalParameter( | 485 static FieldFormalParameter fieldFormalParameter( |
486 Keyword keyword, TypeAnnotation type, String identifier, | 486 Keyword keyword, TypeAnnotation type, String identifier, |
487 [FormalParameterList parameterList]) => | 487 [FormalParameterList parameterList]) => |
488 astFactory.fieldFormalParameter( | 488 astFactory.fieldFormalParameter( |
489 null, | 489 null, |
490 null, | 490 null, |
| 491 null, |
491 keyword == null ? null : TokenFactory.tokenFromKeyword(keyword), | 492 keyword == null ? null : TokenFactory.tokenFromKeyword(keyword), |
492 type, | 493 type, |
493 TokenFactory.tokenFromKeyword(Keyword.THIS), | 494 TokenFactory.tokenFromKeyword(Keyword.THIS), |
494 TokenFactory.tokenFromType(TokenType.PERIOD), | 495 TokenFactory.tokenFromType(TokenType.PERIOD), |
495 identifier3(identifier), | 496 identifier3(identifier), |
496 null, | 497 null, |
497 parameterList); | 498 parameterList); |
498 | 499 |
499 static FieldFormalParameter fieldFormalParameter2(String identifier) => | 500 static FieldFormalParameter fieldFormalParameter2(String identifier) => |
500 fieldFormalParameter(null, null, identifier); | 501 fieldFormalParameter(null, null, identifier); |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 static FunctionExpressionInvocation functionExpressionInvocation2( | 604 static FunctionExpressionInvocation functionExpressionInvocation2( |
604 Expression function, | 605 Expression function, |
605 [TypeArgumentList typeArguments, | 606 [TypeArgumentList typeArguments, |
606 List<Expression> arguments]) => | 607 List<Expression> arguments]) => |
607 astFactory.functionExpressionInvocation( | 608 astFactory.functionExpressionInvocation( |
608 function, typeArguments, argumentList(arguments)); | 609 function, typeArguments, argumentList(arguments)); |
609 | 610 |
610 static FunctionTypedFormalParameter functionTypedFormalParameter( | 611 static FunctionTypedFormalParameter functionTypedFormalParameter( |
611 TypeAnnotation returnType, String identifier, | 612 TypeAnnotation returnType, String identifier, |
612 [List<FormalParameter> parameters]) => | 613 [List<FormalParameter> parameters]) => |
613 astFactory.functionTypedFormalParameter(null, null, returnType, | 614 astFactory.functionTypedFormalParameter(null, null, null, returnType, |
614 identifier3(identifier), null, formalParameterList(parameters)); | 615 identifier3(identifier), null, formalParameterList(parameters)); |
615 | 616 |
616 static HideCombinator hideCombinator(List<SimpleIdentifier> identifiers) => | 617 static HideCombinator hideCombinator(List<SimpleIdentifier> identifiers) => |
617 astFactory.hideCombinator( | 618 astFactory.hideCombinator( |
618 TokenFactory.tokenFromString("hide"), identifiers); | 619 TokenFactory.tokenFromString("hide"), identifiers); |
619 | 620 |
620 static HideCombinator hideCombinator2(List<String> identifiers) => | 621 static HideCombinator hideCombinator2(List<String> identifiers) => |
621 astFactory.hideCombinator( | 622 astFactory.hideCombinator( |
622 TokenFactory.tokenFromString("hide"), identifierList(identifiers)); | 623 TokenFactory.tokenFromString("hide"), identifierList(identifiers)); |
623 | 624 |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1062 | 1063 |
1063 static SimpleFormalParameter simpleFormalParameter( | 1064 static SimpleFormalParameter simpleFormalParameter( |
1064 Keyword keyword, String parameterName) => | 1065 Keyword keyword, String parameterName) => |
1065 simpleFormalParameter2(keyword, null, parameterName); | 1066 simpleFormalParameter2(keyword, null, parameterName); |
1066 | 1067 |
1067 static SimpleFormalParameter simpleFormalParameter2( | 1068 static SimpleFormalParameter simpleFormalParameter2( |
1068 Keyword keyword, TypeAnnotation type, String parameterName) => | 1069 Keyword keyword, TypeAnnotation type, String parameterName) => |
1069 astFactory.simpleFormalParameter( | 1070 astFactory.simpleFormalParameter( |
1070 null, | 1071 null, |
1071 null, | 1072 null, |
| 1073 null, |
1072 keyword == null ? null : TokenFactory.tokenFromKeyword(keyword), | 1074 keyword == null ? null : TokenFactory.tokenFromKeyword(keyword), |
1073 type, | 1075 type, |
1074 identifier3(parameterName)); | 1076 identifier3(parameterName)); |
1075 | 1077 |
1076 static SimpleFormalParameter simpleFormalParameter3(String parameterName) => | 1078 static SimpleFormalParameter simpleFormalParameter3(String parameterName) => |
1077 simpleFormalParameter2(null, null, parameterName); | 1079 simpleFormalParameter2(null, null, parameterName); |
1078 | 1080 |
1079 static SimpleFormalParameter simpleFormalParameter4( | 1081 static SimpleFormalParameter simpleFormalParameter4( |
1080 TypeAnnotation type, String parameterName) => | 1082 TypeAnnotation type, String parameterName) => |
1081 simpleFormalParameter2(null, type, parameterName); | 1083 simpleFormalParameter2(null, type, parameterName); |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1316 expression, | 1318 expression, |
1317 TokenFactory.tokenFromType(TokenType.SEMICOLON)); | 1319 TokenFactory.tokenFromType(TokenType.SEMICOLON)); |
1318 | 1320 |
1319 static YieldStatement yieldStatement(Expression expression) => | 1321 static YieldStatement yieldStatement(Expression expression) => |
1320 astFactory.yieldStatement( | 1322 astFactory.yieldStatement( |
1321 TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "yield"), | 1323 TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "yield"), |
1322 null, | 1324 null, |
1323 expression, | 1325 expression, |
1324 TokenFactory.tokenFromType(TokenType.SEMICOLON)); | 1326 TokenFactory.tokenFromType(TokenType.SEMICOLON)); |
1325 } | 1327 } |
OLD | NEW |