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 engine.testing.ast_factory; | 5 library analyzer.src.generated.testing.ast_factory; |
6 | 6 |
7 import 'package:analyzer/src/generated/ast.dart'; | 7 import 'package:analyzer/src/generated/ast.dart'; |
8 import 'package:analyzer/src/generated/element.dart'; | 8 import 'package:analyzer/src/generated/element.dart'; |
9 import 'package:analyzer/src/generated/scanner.dart'; | 9 import 'package:analyzer/src/generated/scanner.dart'; |
10 import 'package:analyzer/src/generated/testing/token_factory.dart'; | 10 import 'package:analyzer/src/generated/testing/token_factory.dart'; |
11 import 'package:analyzer/src/generated/utilities_dart.dart'; | 11 import 'package:analyzer/src/generated/utilities_dart.dart'; |
12 | 12 |
13 /** | 13 /** |
14 * The class `AstFactory` defines utility methods that can be used to create AST
nodes. The | 14 * The class `AstFactory` defines utility methods that can be used to create AST
nodes. The |
15 * nodes that are created are complete in the sense that all of the tokens that
would have been | 15 * nodes that are created are complete in the sense that all of the tokens that
would have been |
(...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1256 expression, | 1256 expression, |
1257 TokenFactory.tokenFromType(TokenType.SEMICOLON)); | 1257 TokenFactory.tokenFromType(TokenType.SEMICOLON)); |
1258 | 1258 |
1259 static YieldStatement yieldStatement(Expression expression) => | 1259 static YieldStatement yieldStatement(Expression expression) => |
1260 new YieldStatement( | 1260 new YieldStatement( |
1261 TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "yield"), | 1261 TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "yield"), |
1262 null, | 1262 null, |
1263 expression, | 1263 expression, |
1264 TokenFactory.tokenFromType(TokenType.SEMICOLON)); | 1264 TokenFactory.tokenFromType(TokenType.SEMICOLON)); |
1265 } | 1265 } |
OLD | NEW |