Index: pkg/front_end/lib/src/fasta/builder/library_builder.dart |
diff --git a/pkg/front_end/lib/src/fasta/builder/library_builder.dart b/pkg/front_end/lib/src/fasta/builder/library_builder.dart |
index 6e0aa2e178056f3537156b339d6c893b942e36e0..5cc3cde1f16e2799903619763bcedc70db4f2249 100644 |
--- a/pkg/front_end/lib/src/fasta/builder/library_builder.dart |
+++ b/pkg/front_end/lib/src/fasta/builder/library_builder.dart |
@@ -12,7 +12,8 @@ import '../export.dart' show Export; |
import '../loader.dart' show Loader; |
-import '../messages.dart' show deprecated_nit, deprecated_warning; |
+import '../messages.dart' |
+ show Message, deprecated_nit, deprecated_warning, nit, warning; |
import '../util/relativize.dart' show relativizeUri; |
@@ -77,6 +78,26 @@ abstract class LibraryBuilder<T extends TypeBuilder, R> extends Builder { |
silent: silent, wasHandled: wasHandled); |
} |
+ void addCompileTimeError(Message message, int charOffset, Uri uri, |
+ {bool silent: false, bool wasHandled: false}) { |
+ hasCompileTimeErrors = true; |
+ loader.addCompileTimeError(message, charOffset, uri, |
+ silent: silent, wasHandled: wasHandled); |
+ } |
+ |
+ void addWarning(Message message, int charOffset, Uri uri, |
+ {bool silent: false}) { |
+ if (!silent) { |
+ warning(message, charOffset, uri); |
+ } |
+ } |
+ |
+ void addNit(Message message, int charOffset, Uri uri, {bool silent: false}) { |
+ if (!silent) { |
+ nit(message, charOffset, uri); |
+ } |
+ } |
+ |
void deprecated_addWarning(int charOffset, Object message, |
{Uri fileUri, bool silent: false}) { |
fileUri ??= this.fileUri; |