| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 import "package:expect/expect.dart"; | 5 import "package:expect/expect.dart"; |
| 6 import "../../../sdk/lib/_internal/compiler/implementation/scanner/scannerlib.da
rt"; | 6 import "../../../sdk/lib/_internal/compiler/implementation/scanner/scannerlib.da
rt"; |
| 7 import "../../../sdk/lib/_internal/compiler/implementation/tree/tree.dart"; | 7 import "../../../sdk/lib/_internal/compiler/implementation/tree/tree.dart"; |
| 8 | 8 |
| 9 import "../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart" | 9 import "../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart" |
| 10 show DiagnosticListener, | 10 show DiagnosticListener, |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 Node node = listener.popNode(); | 68 Node node = listener.popNode(); |
| 69 Expect.isTrue(listener.nodes.isEmpty); | 69 Expect.isTrue(listener.nodes.isEmpty); |
| 70 return unparse(node); | 70 return unparse(node); |
| 71 } | 71 } |
| 72 | 72 |
| 73 class MessageCollector implements DiagnosticListener { | 73 class MessageCollector implements DiagnosticListener { |
| 74 List<String> messages; | 74 List<String> messages; |
| 75 MessageCollector() { | 75 MessageCollector() { |
| 76 messages = []; | 76 messages = []; |
| 77 } | 77 } |
| 78 void cancel(String reason, {node, token, instruction, element}) { | 78 void internalError(node, String reason) { |
| 79 messages.add(reason); | 79 messages.add(reason); |
| 80 throw reason; | 80 throw reason; |
| 81 } | 81 } |
| 82 |
| 82 void log(message) { | 83 void log(message) { |
| 83 messages.add(message); | 84 messages.add(message); |
| 84 } | 85 } |
| 85 void internalErrorOnElement(Element element, String message) { | |
| 86 throw message; | |
| 87 } | |
| 88 void internalError(String message, | |
| 89 {Node node, Token token, dynamic instruction, | |
| 90 Element element}) { | |
| 91 throw message; | |
| 92 } | |
| 93 } | 86 } |
| OLD | NEW |