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

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

Issue 2970273004: Deprecate all diagnostics methods that use strings. (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
Index: pkg/front_end/lib/src/fasta/source/diet_listener.dart
diff --git a/pkg/front_end/lib/src/fasta/source/diet_listener.dart b/pkg/front_end/lib/src/fasta/source/diet_listener.dart
index ec1cd61e1b9835231519b9326ad5932a03de9179..27347e4836348edde5ea5dcf31d294dc965fb015 100644
--- a/pkg/front_end/lib/src/fasta/source/diet_listener.dart
+++ b/pkg/front_end/lib/src/fasta/source/diet_listener.dart
@@ -29,7 +29,12 @@ import '../parser/dart_vm_native.dart' show removeNativeClause;
import '../util/link.dart' show Link;
-import '../errors.dart' show Crash, InputError, inputError, internalError;
+import '../deprecated_problems.dart'
+ show
+ Crash,
+ deprecated_InputError,
+ deprecated_inputError,
+ deprecated_internalProblem;
import 'stack_listener.dart' show NullValue, StackListener;
@@ -550,7 +555,7 @@ class DietListener extends StackListener {
var body = listener.pop();
listener.checkEmpty(token.charOffset);
listener.finishFunction(metadataConstants, formals, asyncModifier, body);
- } on InputError {
+ } on deprecated_InputError {
rethrow;
} catch (e, s) {
throw new Crash(uri, token.charOffset, e, s);
@@ -595,17 +600,19 @@ class DietListener extends StackListener {
builder = library.scopeBuilder[name];
}
if (builder == null) {
- return internalError("Builder not found: $name", uri, token.charOffset);
+ return deprecated_internalProblem(
+ "Builder not found: $name", uri, token.charOffset);
}
if (builder.next != null) {
- return inputError(uri, token.charOffset, "Duplicated name: $name");
+ return deprecated_inputError(
+ uri, token.charOffset, "Duplicated name: $name");
}
return builder;
}
@override
void addCompileTimeErrorFromMessage(FastaMessage message) {
- library.addCompileTimeError(message.charOffset, message.message,
+ library.deprecated_addCompileTimeError(message.charOffset, message.message,
fileUri: message.uri,
// We assume this error has already been reported by OutlineBuilder.
silent: true);

Powered by Google App Engine
This is Rietveld 408576698