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 part of dart2js; | 5 part of dart2js; |
6 | 6 |
7 abstract class DiagnosticListener { | 7 abstract class DiagnosticListener { |
8 // TODO(karlklose): replace cancel with better error reporting mechanism. | 8 // TODO(karlklose): replace cancel with better error reporting mechanism. |
9 void cancel(String reason, {node, token, instruction, element}); | 9 void cancel(String reason, {node, token, instruction, element}); |
10 // TODO(karlklose): rename log to something like reportInfo. | 10 // TODO(karlklose): rename log to something like reportInfo. |
11 void log(message); | 11 void log(message); |
12 // TODO(karlklose): add reportWarning and reportError to this interface. | 12 // TODO(karlklose): add reportWarning and reportError to this interface. |
13 | 13 |
14 void internalErrorOnElement(Element element, String message); | 14 void internalErrorOnElement(Element element, String message); |
15 void internalError(String message, | 15 void internalError(String message, |
16 {Node node, Token token, HInstruction instruction, | 16 {Node node, Token token, HInstruction instruction, |
17 Element element}); | 17 Element element}); |
18 | 18 |
19 SourceSpan spanFromNode(Node node, [Uri uri]); | 19 SourceSpan spanFromNode(Node node, [Uri uri]); |
20 | 20 |
21 void reportMessage(SourceSpan span, Diagnostic message, api.Diagnostic kind); | 21 void reportMessage(SourceSpan span, Diagnostic message, api.Diagnostic kind); |
| 22 |
| 23 void onDeprecatedFeature(Spannable span, String feature); |
22 } | 24 } |
OLD | NEW |