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

Unified Diff: pkg/compiler/lib/src/parser/element_listener.dart

Issue 2965393002: Use FastaMessage instead of String. Part 1. (Closed)
Patch Set: Add type variable to Code. 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/analyzer/tool/summary/mini_ast.dart ('k') | pkg/compiler/lib/src/tree/nodes.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/parser/element_listener.dart
diff --git a/pkg/compiler/lib/src/parser/element_listener.dart b/pkg/compiler/lib/src/parser/element_listener.dart
index 7e23b1e5f9b381fe2024e02a554c95a9a1df10f1..12d2881a71fc8c7b8ca13fac43f75ec96a2add86 100644
--- a/pkg/compiler/lib/src/parser/element_listener.dart
+++ b/pkg/compiler/lib/src/parser/element_listener.dart
@@ -4,7 +4,7 @@
library dart2js.parser.element_listener;
-import 'package:front_end/src/fasta/fasta_codes.dart' show FastaMessage;
+import 'package:front_end/src/fasta/fasta_codes.dart' show Message;
import 'package:front_end/src/fasta/fasta_codes.dart' as codes;
@@ -507,7 +507,7 @@ class ElementListener extends Listener {
}
@override
- Token handleUnrecoverableError(Token token, FastaMessage message) {
+ Token handleUnrecoverableError(Token token, Message message) {
Token next = handleError(token, message);
if (next == null &&
message.code != codes.codeUnterminatedComment &&
@@ -519,7 +519,7 @@ class ElementListener extends Listener {
}
@override
- void handleRecoverableError(Token token, FastaMessage message) {
+ void handleRecoverableError(Token token, Message message) {
handleError(token, message);
}
@@ -538,7 +538,7 @@ class ElementListener extends Listener {
pushNode(null);
}
- Token handleError(Token token, FastaMessage message) {
+ Token handleError(Token token, Message message) {
MessageKind errorCode;
Map<String, dynamic> arguments = message.arguments;
@@ -927,8 +927,8 @@ class ElementListener extends Listener {
reportError(spannable, MessageKind.GENERIC, {'text': message});
// Some parse errors are infeasible to recover from, so we throw an error.
SourceSpan span = reporter.spanFromSpannable(spannable);
- throw new ParserError(span.begin, span.end,
- codes.codeUnspecified.format(uri, span.begin, message));
+ throw new ParserError(
+ span.begin, span.end, codes.templateUnspecified.withArguments(message));
}
void reportError(Spannable spannable, MessageKind errorCode,
« no previous file with comments | « pkg/analyzer/tool/summary/mini_ast.dart ('k') | pkg/compiler/lib/src/tree/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698