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

Unified Diff: dart/lib/compiler/implementation/scanner/partial_parser.dart

Issue 10544173: Update partial parser and scanner to be able to skip expressions like "new Map<S, T>()". (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments and add comments Created 8 years, 6 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: dart/lib/compiler/implementation/scanner/partial_parser.dart
diff --git a/dart/lib/compiler/implementation/scanner/partial_parser.dart b/dart/lib/compiler/implementation/scanner/partial_parser.dart
index 1e792d0410d289bdf483dfab28e04626e6489b8f..2199ddef8c6bdf8239b9c0764a0e17d96ad9cf9c 100644
--- a/dart/lib/compiler/implementation/scanner/partial_parser.dart
+++ b/dart/lib/compiler/implementation/scanner/partial_parser.dart
@@ -54,9 +54,8 @@ class PartialParser extends Parser {
continue;
}
}
- if (!mayParseFunctionExpressions && value === '{')
- return token;
- if ((value !== '<') && (token is BeginGroupToken)) {
+ if (!mayParseFunctionExpressions && value === '{') return token;
+ if (token is BeginGroupToken) {
BeginGroupToken begin = token;
token = (begin.endGroup !== null) ? begin.endGroup : token;
}

Powered by Google App Engine
This is Rietveld 408576698