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

Unified Diff: pkg/compiler/lib/src/scanner/parser.dart

Issue 796363003: dart2js: accept const map literals as expression statements. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment. Created 6 years 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 | tests/co19/co19-dart2dart.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/scanner/parser.dart
diff --git a/pkg/compiler/lib/src/scanner/parser.dart b/pkg/compiler/lib/src/scanner/parser.dart
index 057cc3024a64e040f442b419e08c5a0f65e57492..8e64787c1e09dac5b3efd5d2d1aa66b45119cffb 100644
--- a/pkg/compiler/lib/src/scanner/parser.dart
+++ b/pkg/compiler/lib/src/scanner/parser.dart
@@ -1570,8 +1570,8 @@ class Parser {
}
Token peekIdentifierAfterOptionalType(Token token) {
- Token peek = peekIdentifierAfterType(token);
- if (peek != null) {
+ Token peek = peekAfterIfType(token);
+ if (peek != null && peek.isIdentifier()) {
// We are looking at "type identifier".
return peek;
} else if (token.isIdentifier()) {
« no previous file with comments | « no previous file | tests/co19/co19-dart2dart.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698