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

Unified Diff: pkg/front_end/lib/src/fasta/kernel/body_builder.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 | « no previous file | pkg/front_end/lib/src/fasta/source/source_loader.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/kernel/body_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
index f40adce55a3f05da4b22cf869fdb05eb1df5378f..5a3ae14d011bc0ee028f24cfef7c2fea2cfa479e 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -17,8 +17,6 @@ import 'package:kernel/transformations/flags.dart' show TransformerFlag;
import '../../scanner/token.dart' show BeginToken, Token;
-import '../deprecated_problems.dart' show deprecated_formatUnexpected;
-
import '../fasta_codes.dart' as fasta;
import '../fasta_codes.dart' show LocatedMessage, Message;
@@ -3082,16 +3080,8 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
@override
Expression deprecated_buildCompileTimeError(String error,
[int charOffset = -1]) {
- // TODO(ahe): This method should be passed the erroneous expression, wrap
- // it in a class (TBD) from which the erroneous expression can be easily
- // extracted. Similar for statements and initializers. See also [issue
- // 29717](https://github.com/dart-lang/sdk/issues/29717)
- deprecated_addCompileTimeError(charOffset, error, wasHandled: true);
- return new KernelSyntheticExpression(library.loader
- .throwCompileConstantError(library.loader
- .deprecated_buildCompileTimeError(
- deprecated_formatUnexpected(uri, charOffset, error),
- charOffset)));
+ return buildCompileTimeError(
+ fasta.templateUnspecified.withArguments(error), charOffset);
}
@override
@@ -3100,13 +3090,10 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
// it in a class (TBD) from which the erroneous expression can be easily
// extracted. Similar for statements and initializers. See also [issue
// 29717](https://github.com/dart-lang/sdk/issues/29717)
- deprecated_addCompileTimeError(charOffset, message.message,
- wasHandled: true);
+ library.addCompileTimeError(message, charOffset, uri, wasHandled: true);
return new KernelSyntheticExpression(library.loader
- .throwCompileConstantError(library.loader
- .deprecated_buildCompileTimeError(
- deprecated_formatUnexpected(uri, charOffset, message.message),
- charOffset)));
+ .throwCompileConstantError(
+ library.loader.buildCompileTimeError(message, charOffset, uri)));
}
Expression deprecated_wrapInCompileTimeError(
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/source/source_loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698