| 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.dart.ast.utilities; | 5 library analyzer.src.dart.ast.utilities; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/ast/standard_ast_factory.dart'; | 10 import 'package:analyzer/dart/ast/standard_ast_factory.dart'; |
| (...skipping 6410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6421 @override | 6421 @override |
| 6422 bool visitShowCombinator(ShowCombinator node) { | 6422 bool visitShowCombinator(ShowCombinator node) { |
| 6423 ShowCombinator toNode = this._toNode as ShowCombinator; | 6423 ShowCombinator toNode = this._toNode as ShowCombinator; |
| 6424 return _and(_isEqualTokens(node.keyword, toNode.keyword), | 6424 return _and(_isEqualTokens(node.keyword, toNode.keyword), |
| 6425 _isEqualNodeLists(node.shownNames, toNode.shownNames)); | 6425 _isEqualNodeLists(node.shownNames, toNode.shownNames)); |
| 6426 } | 6426 } |
| 6427 | 6427 |
| 6428 @override | 6428 @override |
| 6429 bool visitSimpleFormalParameter(SimpleFormalParameter node) { | 6429 bool visitSimpleFormalParameter(SimpleFormalParameter node) { |
| 6430 SimpleFormalParameter toNode = this._toNode as SimpleFormalParameter; | 6430 SimpleFormalParameter toNode = this._toNode as SimpleFormalParameter; |
| 6431 return _and( | 6431 if (_and( |
| 6432 _isEqualNodes(node.documentationComment, toNode.documentationComment), | 6432 _isEqualNodes(node.documentationComment, toNode.documentationComment), |
| 6433 _isEqualNodeLists(node.metadata, toNode.metadata), | 6433 _isEqualNodeLists(node.metadata, toNode.metadata), |
| 6434 _isEqualTokens(node.keyword, toNode.keyword), | 6434 _isEqualTokens(node.keyword, toNode.keyword), |
| 6435 _isEqualNodes(node.type, toNode.type), | 6435 _isEqualNodes(node.type, toNode.type), |
| 6436 _isEqualNodes(node.identifier, toNode.identifier)); | 6436 _isEqualNodes(node.identifier, toNode.identifier))) { |
| 6437 (toNode as SimpleFormalParameterImpl).element = node.element; |
| 6438 return true; |
| 6439 } |
| 6440 return false; |
| 6437 } | 6441 } |
| 6438 | 6442 |
| 6439 @override | 6443 @override |
| 6440 bool visitSimpleIdentifier(SimpleIdentifier node) { | 6444 bool visitSimpleIdentifier(SimpleIdentifier node) { |
| 6441 SimpleIdentifier toNode = this._toNode as SimpleIdentifier; | 6445 SimpleIdentifier toNode = this._toNode as SimpleIdentifier; |
| 6442 if (_isEqualTokens(node.token, toNode.token)) { | 6446 if (_isEqualTokens(node.token, toNode.token)) { |
| 6443 toNode.staticElement = node.staticElement; | 6447 toNode.staticElement = node.staticElement; |
| 6444 toNode.staticType = node.staticType; | 6448 toNode.staticType = node.staticType; |
| 6445 toNode.propagatedElement = node.propagatedElement; | 6449 toNode.propagatedElement = node.propagatedElement; |
| 6446 toNode.propagatedType = node.propagatedType; | 6450 toNode.propagatedType = node.propagatedType; |
| (...skipping 2924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9371 if (node.star != null) { | 9375 if (node.star != null) { |
| 9372 sink.write("yield* "); | 9376 sink.write("yield* "); |
| 9373 } else { | 9377 } else { |
| 9374 sink.write("yield "); | 9378 sink.write("yield "); |
| 9375 } | 9379 } |
| 9376 safelyVisitNode(node.expression); | 9380 safelyVisitNode(node.expression); |
| 9377 sink.write(";"); | 9381 sink.write(";"); |
| 9378 return null; | 9382 return null; |
| 9379 } | 9383 } |
| 9380 } | 9384 } |
| OLD | NEW |