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

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: 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..34c8282b5597a16b31265a653a88d72e946a5acb 100644
--- a/pkg/compiler/lib/src/scanner/parser.dart
+++ b/pkg/compiler/lib/src/scanner/parser.dart
@@ -1631,7 +1631,11 @@ class Parser {
if (isModifier(token.next)) {
return parseVariablesDeclaration(token);
}
- Token identifier = peekIdentifierAfterOptionalType(token.next);
ahe 2014/12/12 14:32:41 peekIdentifierAfterOptionalType is only called onc
floitsch 2014/12/12 14:38:47 Done.
+
+ Token identifier;
+ if (optional('void', token.next) || token.next.isIdentifier()) {
+ identifier = peekIdentifierAfterOptionalType(token.next);
+ }
if (identifier != null) {
assert(identifier.isIdentifier());
Token afterId = identifier.next;
« 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