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

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

Issue 2477793002: Fix the parsing of generic function expressions (Closed)
Patch Set: Created 4 years, 1 month 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 | pkg/analyzer/test/generated/parser_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d9e8d6e841f1b31a9f959bb4a71b9d2db07fa5e2..4430e76a7148572e28e47b0742553acf384c1bdf 100644
--- a/pkg/analyzer/lib/src/generated/parser.dart
+++ b/pkg/analyzer/lib/src/generated/parser.dart
@@ -4269,6 +4269,9 @@ class Parser {
_inInitializer = wasInInitializer;
}
} else if (type == TokenType.LT || _injectGenericCommentTypeList()) {
+ if (isFunctionExpression(currentToken)) {
+ return parseFunctionExpression();
+ }
return parseListOrMapLiteral(null);
} else if (type == TokenType.OPEN_CURLY_BRACKET) {
return parseMapLiteral(null, null);
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/parser_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698