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

Unified Diff: pkg/front_end/lib/src/fasta/source/source_loader.dart

Issue 2977013002: Report messages instead of just printing. (Closed)
Patch Set: Update expectations. 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/src/fasta/source/source_loader.dart
diff --git a/pkg/front_end/lib/src/fasta/source/source_loader.dart b/pkg/front_end/lib/src/fasta/source/source_loader.dart
index 964d1ece04ca9f0e5dae7ab35745581d4798260f..7f430a77ca97f412582d05c13f66438de2a0192d 100644
--- a/pkg/front_end/lib/src/fasta/source/source_loader.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_loader.dart
@@ -32,8 +32,7 @@ import '../builder/builder.dart'
import '../compiler_context.dart' show CompilerContext;
-import '../deprecated_problems.dart'
- show deprecated_formatUnexpected, deprecated_inputError;
+import '../deprecated_problems.dart' show deprecated_inputError;
import '../export.dart' show Export;
@@ -58,6 +57,8 @@ import '../parser/class_member_parser.dart' show ClassMemberParser;
import '../scanner.dart' show ErrorToken, ScannerResult, Token, scan;
+import '../severity.dart' show Severity;
+
import '../type_inference/type_inference_engine.dart' show TypeInferenceEngine;
import 'diet_listener.dart' show DietListener;
@@ -530,7 +531,8 @@ class SourceLoader<L> extends Loader<L> {
}
Expression buildCompileTimeError(Message message, int offset, Uri uri) {
- String text = deprecated_formatUnexpected(uri, offset, message.message);
+ String text = target.context
+ .format(message.withLocation(uri, offset), Severity.error);
return target.backendTarget.buildCompileTimeError(coreTypes, text, offset);
}
}

Powered by Google App Engine
This is Rietveld 408576698