Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Unified Diff: pkg/front_end/lib/compilation_message.dart

Issue 2982093003: Unifying compiler context (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/front_end/lib/compilation_message.dart
diff --git a/pkg/front_end/lib/compilation_message.dart b/pkg/front_end/lib/compilation_message.dart
new file mode 100644
index 0000000000000000000000000000000000000000..b6e794a6f7e5801c80b1d472a742e53b4291762b
--- /dev/null
+++ b/pkg/front_end/lib/compilation_message.dart
@@ -0,0 +1,39 @@
+// 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 messages to clients.
+library front_end.compilation_message;
+
+import 'package:source_span/source_span.dart' show SourceSpan;
+
+import 'package:front_end/src/fasta/severity.dart' show Severity;
+export 'package:front_end/src/fasta/severity.dart' show Severity;
+
+/// A single message, typically an error, reported during compilation, and
+/// information about where it occurred and suggestions on how to fix it.
+///
+/// Not intended to be implemented or extended by clients.
+abstract class CompilationMessage {
+ /// A text description of the compile error.
ahe 2017/07/18 16:54:36 of the problem.
Siggi Cherem (dart-lang) 2017/07/18 22:50:43 Done.
+ String get message;
+
+ /// A suggestion for the user to hint them on how to fix the error. May be
ahe 2017/07/18 16:54:36 A suggestion for how to fix the problem. May be nu
Siggi Cherem (dart-lang) 2017/07/18 22:50:42 Nice, concise. thx.
+ /// `null`.
+ String get tip;
+
+ /// The source span where the error occurred.
+ SourceSpan get span;
+
+ /// The severity level of the error.
+ Severity get severity;
+
+ /// The corresponding analyzer error code, or null if there is no
+ /// corresponding message in analyzer.
+ String get analyzerCode;
+
+ /// The corresponding dart2js error code, or null if there is no corresponding
+ /// message in dart2js.
+ String get dart2jsCode;
+}

Powered by Google App Engine
This is Rietveld 408576698