| 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/element/element.dart'; | 8 import 'package:analyzer/dart/element/element.dart'; |
| 9 import 'package:analyzer/src/dart/ast/ast.dart'; | 9 import 'package:analyzer/src/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/src/generated/scanner.dart'; | 10 import 'package:analyzer/src/generated/scanner.dart'; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 new AdjacentStrings(strings); | 28 new AdjacentStrings(strings); |
| 29 | 29 |
| 30 static Annotation annotation(Identifier name) => new Annotation( | 30 static Annotation annotation(Identifier name) => new Annotation( |
| 31 TokenFactory.tokenFromType(TokenType.AT), name, null, null, null); | 31 TokenFactory.tokenFromType(TokenType.AT), name, null, null, null); |
| 32 | 32 |
| 33 static Annotation annotation2(Identifier name, | 33 static Annotation annotation2(Identifier name, |
| 34 SimpleIdentifier constructorName, ArgumentList arguments) => | 34 SimpleIdentifier constructorName, ArgumentList arguments) => |
| 35 new Annotation( | 35 new Annotation( |
| 36 TokenFactory.tokenFromType(TokenType.AT), | 36 TokenFactory.tokenFromType(TokenType.AT), |
| 37 name, | 37 name, |
| 38 TokenFactory.tokenFromType(TokenType.PERIOD), | 38 constructorName == null |
| 39 ? null |
| 40 : TokenFactory.tokenFromType(TokenType.PERIOD), |
| 39 constructorName, | 41 constructorName, |
| 40 arguments); | 42 arguments); |
| 41 | 43 |
| 42 static ArgumentList argumentList([List<Expression> arguments]) => | 44 static ArgumentList argumentList([List<Expression> arguments]) => |
| 43 new ArgumentList(TokenFactory.tokenFromType(TokenType.OPEN_PAREN), | 45 new ArgumentList(TokenFactory.tokenFromType(TokenType.OPEN_PAREN), |
| 44 arguments, TokenFactory.tokenFromType(TokenType.CLOSE_PAREN)); | 46 arguments, TokenFactory.tokenFromType(TokenType.CLOSE_PAREN)); |
| 45 | 47 |
| 46 static AsExpression asExpression(Expression expression, TypeName type) => | 48 static AsExpression asExpression(Expression expression, TypeName type) => |
| 47 new AsExpression( | 49 new AsExpression( |
| 48 expression, TokenFactory.tokenFromKeyword(Keyword.AS), type); | 50 expression, TokenFactory.tokenFromKeyword(Keyword.AS), type); |
| (...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1261 expression, | 1263 expression, |
| 1262 TokenFactory.tokenFromType(TokenType.SEMICOLON)); | 1264 TokenFactory.tokenFromType(TokenType.SEMICOLON)); |
| 1263 | 1265 |
| 1264 static YieldStatement yieldStatement(Expression expression) => | 1266 static YieldStatement yieldStatement(Expression expression) => |
| 1265 new YieldStatement( | 1267 new YieldStatement( |
| 1266 TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "yield"), | 1268 TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "yield"), |
| 1267 null, | 1269 null, |
| 1268 expression, | 1270 expression, |
| 1269 TokenFactory.tokenFromType(TokenType.SEMICOLON)); | 1271 TokenFactory.tokenFromType(TokenType.SEMICOLON)); |
| 1270 } | 1272 } |
| OLD | NEW |