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

Unified Diff: pkg/front_end/lib/src/fasta/parser/dart_vm_native.dart

Issue 2916773002: Fix error recovery for extracting native name. (Closed)
Patch Set: Created 3 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/parser/dart_vm_native.dart
diff --git a/pkg/front_end/lib/src/fasta/parser/dart_vm_native.dart b/pkg/front_end/lib/src/fasta/parser/dart_vm_native.dart
index 6acc1c3ea7f35710da391270cd92ab274410f90b..ce766765e524b363d5718ab497ceb47a39a638fe 100644
--- a/pkg/front_end/lib/src/fasta/parser/dart_vm_native.dart
+++ b/pkg/front_end/lib/src/fasta/parser/dart_vm_native.dart
@@ -45,6 +45,7 @@ Token skipNativeClause(Token token) {
/// This method designed to be called from [Listener.handleMemberName].
Link<Token> removeNativeClause(Link<Token> identifiers) {
Link<Token> result = identifiers.tail;
+ if (result.isEmpty) return identifiers;
if (result.head.kind != STRING_TOKEN) return identifiers;
result = result.tail;
if (result.isEmpty) return identifiers;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698