Chromium Code Reviews| Index: pkg/front_end/lib/compilation_error.dart |
| diff --git a/pkg/front_end/lib/compilation_error.dart b/pkg/front_end/lib/compilation_error.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..7a153026e495a142f8d8537f480e164c47029e56 |
| --- /dev/null |
| +++ b/pkg/front_end/lib/compilation_error.dart |
| @@ -0,0 +1,24 @@ |
| +// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| +// for details. All rights reserved. Use of this source code is governed by a |
| +// BSD-style license that can be found in the LICENSE file. |
| + |
| +/// Defines the API for the front end to communicate information about |
| +/// compilation errors to clients. |
| +library front_end.compilation_error; |
| + |
| +import 'package:source_span/source_span.dart' show FileSpan; |
| + |
| +/// A single error that occurred during compilation, and information about where |
| +/// it occurred. |
| +/// |
| +/// TODO(paulberry): add a reference to the analyzer error code. |
| +/// |
| +/// TODO(paulberry): add a correction message, once most analyzer errors have |
| +/// one. |
| +abstract class CompilationError { |
| + /// A text description of the compile error. |
| + String get message; |
| + |
| + /// The source location where the error occurred. |
| + FileSpan get location; |
|
Siggi Cherem (dart-lang)
2016/10/17 16:27:29
consider switching to just use the interface (Sour
Paul Berry
2016/10/17 17:04:27
Done.
|
| +} |