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

Unified Diff: pkg/front_end/lib/src/fasta/builder/library_builder.dart

Issue 2739213004: Improve detection of compile-time errors. (Closed)
Patch Set: dartfmt Created 3 years, 9 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
« no previous file with comments | « pkg/front_end/lib/src/fasta/analyzer/analyzer_compile.dart ('k') | pkg/front_end/lib/src/fasta/fasta.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/analyzer/analyzer_compile.dart ('k') | pkg/front_end/lib/src/fasta/fasta.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698