OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2016, 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 /// Defines the API for the front end to communicate information about |
| 6 /// compilation messages to clients. |
| 7 library front_end.compilation_message; |
| 8 |
| 9 import 'package:source_span/source_span.dart' show SourceSpan; |
| 10 |
| 11 import 'package:front_end/src/fasta/severity.dart' show Severity; |
| 12 export 'package:front_end/src/fasta/severity.dart' show Severity; |
| 13 |
| 14 /// A single message, typically an error, reported during compilation, and |
| 15 /// information about where it occurred and suggestions on how to fix it. |
| 16 /// |
| 17 /// Not intended to be implemented or extended by clients. |
| 18 abstract class CompilationMessage { |
| 19 /// A text description of the problem. |
| 20 String get message; |
| 21 |
| 22 /// A suggestion for how to fix the problem. May be `null`. |
| 23 String get tip; |
| 24 |
| 25 /// The source span where the error occurred. |
| 26 SourceSpan get span; |
| 27 |
| 28 /// The severity level of the error. |
| 29 Severity get severity; |
| 30 |
| 31 /// The corresponding analyzer error code, or null if there is no |
| 32 /// corresponding message in analyzer. |
| 33 String get analyzerCode; |
| 34 |
| 35 /// The corresponding dart2js error code, or null if there is no corresponding |
| 36 /// message in dart2js. |
| 37 String get dart2jsCode; |
| 38 } |
OLD | NEW |