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

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

Issue 2778213002: Use message.yaml in parser. (Closed)
Patch Set: Update subpackage relationships. Created 3 years, 9 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/source/outline_builder.dart ('k') | pkg/front_end/lib/src/scanner/errors.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/stack_listener.dart
diff --git a/pkg/front_end/lib/src/fasta/source/stack_listener.dart b/pkg/front_end/lib/src/fasta/source/stack_listener.dart
index 875c7a9777202304f6848b5206b0c268619066d3..fdcc29a879ba6b08efff7d3bfc81509d56eba3ab 100644
--- a/pkg/front_end/lib/src/fasta/source/stack_listener.dart
+++ b/pkg/front_end/lib/src/fasta/source/stack_listener.dart
@@ -4,7 +4,9 @@
library fasta.stack_listener;
-import '../parser.dart' show ErrorKind, Listener;
+import '../fasta_codes.dart' show FastaMessage;
+
+import '../parser.dart' show Listener;
import '../parser/identifier_context.dart' show IdentifierContext;
@@ -52,6 +54,7 @@ enum NullValue {
abstract class StackListener extends Listener {
final Stack stack = new Stack();
+ @override
Uri get uri;
// TODO(ahe): This doesn't belong here. Only implemented by body_builder.dart
@@ -238,14 +241,14 @@ abstract class StackListener extends Listener {
}
@override
- void handleRecoverableError(Token token, ErrorKind kind, Map arguments) {
- super.handleRecoverableError(token, kind, arguments);
- debugEvent("Error: ${recoverableErrors.last}");
+ void handleRecoverableError(Token token, FastaMessage message) {
+ debugEvent("Error: ${message.message}");
+ super.handleRecoverableError(token, message);
}
@override
- Token handleUnrecoverableError(Token token, ErrorKind kind, Map arguments) {
- throw inputError(uri, token.charOffset, "$kind $arguments");
+ Token handleUnrecoverableError(Token token, FastaMessage message) {
+ throw inputError(uri, token.charOffset, message.message);
}
void nit(String message, [int charOffset = -1]) {
« no previous file with comments | « pkg/front_end/lib/src/fasta/source/outline_builder.dart ('k') | pkg/front_end/lib/src/scanner/errors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698