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

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

Issue 2975183002: Undeprecate buildCompileTimeError. (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
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/body_builder.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 aa16d8df1ee800d77f11759b8561084258f0ea92..964d1ece04ca9f0e5dae7ab35745581d4798260f 100644
--- a/pkg/front_end/lib/src/fasta/source/source_loader.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_loader.dart
@@ -32,12 +32,14 @@ import '../builder/builder.dart'
import '../compiler_context.dart' show CompilerContext;
-import '../deprecated_problems.dart' show deprecated_inputError;
+import '../deprecated_problems.dart'
+ show deprecated_formatUnexpected, deprecated_inputError;
import '../export.dart' show Export;
import '../fasta_codes.dart'
show
+ Message,
templateCyclicClassHierarchy,
templateExtendingEnum,
templateExtendingRestricted,
@@ -73,6 +75,7 @@ class SourceLoader<L> extends Loader<L> {
final FileSystem fileSystem;
final Map<Uri, List<int>> sourceBytes = <Uri, List<int>>{};
+
final bool excludeSource = CompilerContext.current.options.excludeSource;
// Used when building directly to kernel.
@@ -526,8 +529,8 @@ class SourceLoader<L> extends Loader<L> {
return target.backendTarget.throwCompileConstantError(coreTypes, error);
}
- Expression deprecated_buildCompileTimeError(String message, int offset) {
- return target.backendTarget
- .buildCompileTimeError(coreTypes, message, offset);
+ Expression buildCompileTimeError(Message message, int offset, Uri uri) {
+ String text = deprecated_formatUnexpected(uri, offset, message.message);
+ return target.backendTarget.buildCompileTimeError(coreTypes, text, offset);
}
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/body_builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698