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

Unified Diff: pkg/analyzer/lib/src/generated/parser.dart

Issue 1025903002: improve parser recovery of type argument list (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: cleanup and fix test Created 5 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/analyzer/lib/src/generated/parser.dart
diff --git a/pkg/analyzer/lib/src/generated/parser.dart b/pkg/analyzer/lib/src/generated/parser.dart
index 47371ef48f0160a27226a66a174f6d3bd443544d..b303cc75d263e2eab566f487c99176c956a4c00c 100644
--- a/pkg/analyzer/lib/src/generated/parser.dart
+++ b/pkg/analyzer/lib/src/generated/parser.dart
@@ -7974,6 +7974,12 @@ class Parser {
}
token = _skipTypeName(token.next);
if (token == null) {
+ // If the start token '<' is followed by '>'
+ // then assume this should be type argument list but is missing a type
+ token = startToken.next;
+ if (_tokenMatches(token, TokenType.GT)) {
+ return token.next;
+ }
return null;
}
while (_tokenMatches(token, TokenType.COMMA)) {
« no previous file with comments | « pkg/analysis_server/test/services/completion/completion_target_test.dart ('k') | pkg/analyzer/test/generated/parser_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698