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 6751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6762 return true; | 6762 return true; |
6763 // not reached | 6763 // not reached |
6764 } | 6764 } |
6765 return node.end < _position; | 6765 return node.end < _position; |
6766 } | 6766 } |
6767 } | 6767 } |
6768 | 6768 |
6769 /** | 6769 /** |
6770 * A visitor used to write a source representation of a visited AST node (and | 6770 * A visitor used to write a source representation of a visited AST node (and |
6771 * all of it's children) to a writer. | 6771 * all of it's children) to a writer. |
| 6772 * |
| 6773 * This class has been deprecated. Use the class ToSourceVisitor2 instead. |
6772 */ | 6774 */ |
| 6775 @deprecated |
6773 class ToSourceVisitor implements AstVisitor<Object> { | 6776 class ToSourceVisitor implements AstVisitor<Object> { |
6774 /** | 6777 /** |
6775 * The writer to which the source is to be written. | 6778 * The writer to which the source is to be written. |
6776 */ | 6779 */ |
6777 final PrintWriter _writer; | 6780 final PrintWriter _writer; |
6778 | 6781 |
6779 /** | 6782 /** |
6780 * Initialize a newly created visitor to write source code representing the | 6783 * Initialize a newly created visitor to write source code representing the |
6781 * visited nodes to the given [writer]. | 6784 * visited nodes to the given [writer]. |
6782 */ | 6785 */ |
(...skipping 2284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9067 if (node.star != null) { | 9070 if (node.star != null) { |
9068 sink.write("yield* "); | 9071 sink.write("yield* "); |
9069 } else { | 9072 } else { |
9070 sink.write("yield "); | 9073 sink.write("yield "); |
9071 } | 9074 } |
9072 safelyVisitNode(node.expression); | 9075 safelyVisitNode(node.expression); |
9073 sink.write(";"); | 9076 sink.write(";"); |
9074 return null; | 9077 return null; |
9075 } | 9078 } |
9076 } | 9079 } |
OLD | NEW |