| 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_factory; | 5 library analyzer.src.generated.testing.ast_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/token.dart'; | 8 import 'package:analyzer/dart/ast/token.dart'; |
| 9 import 'package:analyzer/dart/element/element.dart'; | 9 import 'package:analyzer/dart/element/element.dart'; |
| 10 import 'package:analyzer/src/dart/ast/ast.dart'; | 10 import 'package:analyzer/src/dart/ast/ast.dart'; |
| (...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 862 null, | 862 null, |
| 863 modifier == null ? null : TokenFactory.tokenFromKeyword(modifier), | 863 modifier == null ? null : TokenFactory.tokenFromKeyword(modifier), |
| 864 returnType, | 864 returnType, |
| 865 property == null ? null : TokenFactory.tokenFromKeyword(property), | 865 property == null ? null : TokenFactory.tokenFromKeyword(property), |
| 866 operator == null ? null : TokenFactory.tokenFromKeyword(operator), | 866 operator == null ? null : TokenFactory.tokenFromKeyword(operator), |
| 867 name, | 867 name, |
| 868 typeParameters, | 868 typeParameters, |
| 869 parameters, | 869 parameters, |
| 870 body); | 870 body); |
| 871 | 871 |
| 872 static MethodDeclaration methodDeclaration4( |
| 873 {bool external: false, |
| 874 Keyword modifier, |
| 875 TypeName returnType, |
| 876 Keyword property, |
| 877 bool operator: false, |
| 878 String name, |
| 879 FormalParameterList parameters, |
| 880 FunctionBody body}) => |
| 881 new MethodDeclaration( |
| 882 null, |
| 883 null, |
| 884 external ? TokenFactory.tokenFromKeyword(Keyword.EXTERNAL) : null, |
| 885 modifier == null ? null : TokenFactory.tokenFromKeyword(modifier), |
| 886 returnType, |
| 887 property == null ? null : TokenFactory.tokenFromKeyword(property), |
| 888 operator ? TokenFactory.tokenFromKeyword(Keyword.OPERATOR) : null, |
| 889 identifier3(name), |
| 890 null, |
| 891 parameters, |
| 892 body); |
| 893 |
| 872 static MethodInvocation methodInvocation(Expression target, String methodName, | 894 static MethodInvocation methodInvocation(Expression target, String methodName, |
| 873 [List<Expression> arguments, | 895 [List<Expression> arguments, |
| 874 TokenType operator = TokenType.PERIOD]) => | 896 TokenType operator = TokenType.PERIOD]) => |
| 875 new MethodInvocation( | 897 new MethodInvocation( |
| 876 target, | 898 target, |
| 877 target == null ? null : TokenFactory.tokenFromType(operator), | 899 target == null ? null : TokenFactory.tokenFromType(operator), |
| 878 identifier3(methodName), | 900 identifier3(methodName), |
| 879 null, | 901 null, |
| 880 argumentList(arguments)); | 902 argumentList(arguments)); |
| 881 | 903 |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1263 expression, | 1285 expression, |
| 1264 TokenFactory.tokenFromType(TokenType.SEMICOLON)); | 1286 TokenFactory.tokenFromType(TokenType.SEMICOLON)); |
| 1265 | 1287 |
| 1266 static YieldStatement yieldStatement(Expression expression) => | 1288 static YieldStatement yieldStatement(Expression expression) => |
| 1267 new YieldStatement( | 1289 new YieldStatement( |
| 1268 TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "yield"), | 1290 TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "yield"), |
| 1269 null, | 1291 null, |
| 1270 expression, | 1292 expression, |
| 1271 TokenFactory.tokenFromType(TokenType.SEMICOLON)); | 1293 TokenFactory.tokenFromType(TokenType.SEMICOLON)); |
| 1272 } | 1294 } |
| OLD | NEW |