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 2759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2770 static void logException(AstNode node, AstVisitor visitor, dynamic exception, | 2770 static void logException(AstNode node, AstVisitor visitor, dynamic exception, |
2771 StackTrace stackTrace) { | 2771 StackTrace stackTrace) { |
2772 StringBuffer buffer = new StringBuffer(); | 2772 StringBuffer buffer = new StringBuffer(); |
2773 buffer.write('Exception while using a ${visitor.runtimeType} to visit a '); | 2773 buffer.write('Exception while using a ${visitor.runtimeType} to visit a '); |
2774 AstNode currentNode = node; | 2774 AstNode currentNode = node; |
2775 bool first = true; | 2775 bool first = true; |
2776 while (currentNode != null) { | 2776 while (currentNode != null) { |
2777 if (first) { | 2777 if (first) { |
2778 first = false; | 2778 first = false; |
2779 } else { | 2779 } else { |
2780 buffer.write('in '); | 2780 buffer.write(' in '); |
2781 } | 2781 } |
2782 buffer.write(currentNode.runtimeType); | 2782 buffer.write(currentNode.runtimeType); |
2783 currentNode = currentNode.parent; | 2783 currentNode = currentNode.parent; |
2784 } | 2784 } |
2785 AnalysisEngine.instance.logger.logError( | 2785 AnalysisEngine.instance.logger.logError( |
2786 buffer.toString(), new CaughtException(exception, stackTrace)); | 2786 buffer.toString(), new CaughtException(exception, stackTrace)); |
2787 } | 2787 } |
2788 } | 2788 } |
2789 | 2789 |
2790 /** | 2790 /** |
(...skipping 6590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9381 if (node.star != null) { | 9381 if (node.star != null) { |
9382 sink.write("yield* "); | 9382 sink.write("yield* "); |
9383 } else { | 9383 } else { |
9384 sink.write("yield "); | 9384 sink.write("yield "); |
9385 } | 9385 } |
9386 safelyVisitNode(node.expression); | 9386 safelyVisitNode(node.expression); |
9387 sink.write(";"); | 9387 sink.write(";"); |
9388 return null; | 9388 return null; |
9389 } | 9389 } |
9390 } | 9390 } |
OLD | NEW |