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 368923e5d551d3df6a6c889a544532966c34b856..9e1325bb244511d73789ff70ad52467041b6f35f 100644 |
--- a/pkg/front_end/lib/src/fasta/builder/library_builder.dart |
+++ b/pkg/front_end/lib/src/fasta/builder/library_builder.dart |
@@ -51,9 +51,12 @@ abstract class LibraryBuilder<T extends TypeBuilder, R> extends Builder { |
exporters.add(new Export(exporter, this, combinators, charOffset)); |
} |
- void addCompileTimeError(int charOffset, Object message, [Uri fileUri]) { |
+ void addCompileTimeError(int charOffset, Object message, |
+ {Uri fileUri, bool silent: false}) { |
fileUri ??= this.fileUri; |
- printUnexpected(fileUri, charOffset, message); |
+ if (!silent) { |
+ printUnexpected(fileUri, charOffset, message); |
+ } |
compileTimeErrors.add(new InputError(fileUri, charOffset, message)); |
} |