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

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

Issue 2970273004: Deprecate all diagnostics methods that use strings. (Closed)
Patch Set: Merged with 4df146dd9a465d63344330bf3e45524b927c92ec 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/scope.dart ('k') | pkg/front_end/lib/src/fasta/source/outline_builder.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/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 5ee99455cdd48491a63628fd4e044614702818b0..12828e0fc4d9c1460beb636c88e2e5a7836fa38b 100644
--- a/pkg/front_end/lib/src/fasta/source/diet_listener.dart
+++ b/pkg/front_end/lib/src/fasta/source/diet_listener.dart
@@ -30,7 +30,12 @@ import '../parser/native_support.dart'
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;
@@ -556,7 +561,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);
@@ -601,17 +606,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);
« no previous file with comments | « pkg/front_end/lib/src/fasta/scope.dart ('k') | pkg/front_end/lib/src/fasta/source/outline_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698