| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 part of dart2js; | |
| 6 | |
| 7 abstract class DiagnosticListener { | |
| 8 // TODO(karlklose): rename log to something like reportInfo. | |
| 9 void log(message); | |
| 10 | |
| 11 void internalError(Spannable spannable, message); | |
| 12 | |
| 13 SourceSpan spanFromSpannable(Spannable node); | |
| 14 | |
| 15 /// Reports an error and terminates computation immediately. | |
| 16 void reportFatalError(Spannable node, MessageKind errorCode, | |
| 17 [Map arguments = const {}]); | |
| 18 | |
| 19 void reportError(Spannable node, MessageKind errorCode, | |
| 20 [Map arguments = const {}]); | |
| 21 | |
| 22 void reportWarning(Spannable node, MessageKind errorCode, | |
| 23 [Map arguments = const {}]); | |
| 24 | |
| 25 void reportHint(Spannable node, MessageKind errorCode, | |
| 26 [Map arguments = const {}]); | |
| 27 | |
| 28 void reportInfo(Spannable node, MessageKind errorCode, | |
| 29 [Map arguments = const {}]); | |
| 30 | |
| 31 // TODO(ahe): We should not expose this here. Perhaps a | |
| 32 // [SourceSpan] should implement [Spannable], and we should have a | |
| 33 // way to construct a [SourceSpan] from a [Spannable] and an | |
| 34 // [Element]. | |
| 35 withCurrentElement(Element element, f()); | |
| 36 } | |
| OLD | NEW |