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/token.dart'; | 10 import 'package:analyzer/dart/ast/token.dart'; |
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
733 return directive; | 733 return directive; |
734 } | 734 } |
735 | 735 |
736 @override | 736 @override |
737 PartOfDirective visitPartOfDirective(PartOfDirective node) => | 737 PartOfDirective visitPartOfDirective(PartOfDirective node) => |
738 new PartOfDirective( | 738 new PartOfDirective( |
739 cloneNode(node.documentationComment), | 739 cloneNode(node.documentationComment), |
740 cloneNodeList(node.metadata), | 740 cloneNodeList(node.metadata), |
741 cloneToken(node.partKeyword), | 741 cloneToken(node.partKeyword), |
742 cloneToken(node.ofKeyword), | 742 cloneToken(node.ofKeyword), |
| 743 cloneNode(node.uri), |
743 cloneNode(node.libraryName), | 744 cloneNode(node.libraryName), |
744 cloneToken(node.semicolon)); | 745 cloneToken(node.semicolon)); |
745 | 746 |
746 @override | 747 @override |
747 PostfixExpression visitPostfixExpression(PostfixExpression node) => | 748 PostfixExpression visitPostfixExpression(PostfixExpression node) => |
748 new PostfixExpression(cloneNode(node.operand), cloneToken(node.operator)); | 749 new PostfixExpression(cloneNode(node.operand), cloneToken(node.operator)); |
749 | 750 |
750 @override | 751 @override |
751 PrefixedIdentifier visitPrefixedIdentifier(PrefixedIdentifier node) => | 752 PrefixedIdentifier visitPrefixedIdentifier(PrefixedIdentifier node) => |
752 new PrefixedIdentifier(cloneNode(node.prefix), cloneToken(node.period), | 753 new PrefixedIdentifier(cloneNode(node.prefix), cloneToken(node.period), |
(...skipping 2720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3473 return copy; | 3474 return copy; |
3474 } | 3475 } |
3475 | 3476 |
3476 @override | 3477 @override |
3477 PartOfDirective visitPartOfDirective(PartOfDirective node) { | 3478 PartOfDirective visitPartOfDirective(PartOfDirective node) { |
3478 PartOfDirective copy = new PartOfDirective( | 3479 PartOfDirective copy = new PartOfDirective( |
3479 _cloneNode(node.documentationComment), | 3480 _cloneNode(node.documentationComment), |
3480 _cloneNodeList(node.metadata), | 3481 _cloneNodeList(node.metadata), |
3481 _mapToken(node.partKeyword), | 3482 _mapToken(node.partKeyword), |
3482 _mapToken(node.ofKeyword), | 3483 _mapToken(node.ofKeyword), |
| 3484 _cloneNode(node.uri), |
3483 _cloneNode(node.libraryName), | 3485 _cloneNode(node.libraryName), |
3484 _mapToken(node.semicolon)); | 3486 _mapToken(node.semicolon)); |
3485 copy.element = node.element; | 3487 copy.element = node.element; |
3486 return copy; | 3488 return copy; |
3487 } | 3489 } |
3488 | 3490 |
3489 @override | 3491 @override |
3490 PostfixExpression visitPostfixExpression(PostfixExpression node) { | 3492 PostfixExpression visitPostfixExpression(PostfixExpression node) { |
3491 PostfixExpression copy = new PostfixExpression( | 3493 PostfixExpression copy = new PostfixExpression( |
3492 _cloneNode(node.operand), _mapToken(node.operator)); | 3494 _cloneNode(node.operand), _mapToken(node.operator)); |
(...skipping 5657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9150 if (node.star != null) { | 9152 if (node.star != null) { |
9151 sink.write("yield* "); | 9153 sink.write("yield* "); |
9152 } else { | 9154 } else { |
9153 sink.write("yield "); | 9155 sink.write("yield "); |
9154 } | 9156 } |
9155 safelyVisitNode(node.expression); | 9157 safelyVisitNode(node.expression); |
9156 sink.write(";"); | 9158 sink.write(";"); |
9157 return null; | 9159 return null; |
9158 } | 9160 } |
9159 } | 9161 } |
OLD | NEW |