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

Unified Diff: pkg/front_end/lib/src/fasta/source/outline_builder.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
Index: pkg/front_end/lib/src/fasta/source/outline_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/source/outline_builder.dart b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
index 88acba4b52b609ae9af5c009b072948bc9f30e02..81ef39e4b7e7d0a99ddf07bd93747b789d9c45b9 100644
--- a/pkg/front_end/lib/src/fasta/source/outline_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
@@ -6,6 +6,8 @@ library fasta.outline_builder;
import 'package:kernel/ast.dart' show AsyncMarker, ProcedureKind;
+import '../fasta_codes.dart' show FastaMessage, codeExpectedBlockToSkip;
+
import '../parser/parser.dart' show FormalParameterType, optional;
import '../parser/identifier_context.dart' show IdentifierContext;
@@ -26,8 +28,6 @@ import 'source_library_builder.dart' show SourceLibraryBuilder;
import 'unhandled_listener.dart' show NullValue, Unhandled, UnhandledListener;
-import '../parser/error_kind.dart' show ErrorKind;
-
import '../parser/dart_vm_native.dart'
show removeNativeClause, skipNativeClause;
@@ -782,15 +782,15 @@ class OutlineBuilder extends UnhandledListener {
}
@override
- Token handleUnrecoverableError(Token token, ErrorKind kind, Map arguments) {
- if (isDartLibrary && kind == ErrorKind.ExpectedBlockToSkip) {
+ Token handleUnrecoverableError(Token token, FastaMessage message) {
+ if (isDartLibrary && message.code == codeExpectedBlockToSkip) {
Token recover = skipNativeClause(token);
if (recover != null) {
nativeMethodName = unescapeString(token.next.lexeme);
return recover;
}
}
- return super.handleUnrecoverableError(token, kind, arguments);
+ return super.handleUnrecoverableError(token, message);
}
@override
« no previous file with comments | « pkg/front_end/lib/src/fasta/source/diet_parser.dart ('k') | pkg/front_end/lib/src/fasta/source/stack_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698