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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/co19/co19-dart2dart.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of scanner; 5 part of scanner;
6 6
7 class FormalParameterType { 7 class FormalParameterType {
8 final String type; 8 final String type;
9 const FormalParameterType(this.type); 9 const FormalParameterType(this.type);
10 bool get isRequired => this == REQUIRED; 10 bool get isRequired => this == REQUIRED;
(...skipping 1552 matching lines...) Expand 10 before | Expand all | Expand 10 after
1563 Token peek = peekAfterType(token); 1563 Token peek = peekAfterType(token);
1564 if (peek != null && peek.isIdentifier()) { 1564 if (peek != null && peek.isIdentifier()) {
1565 // We are looking at "type identifier". 1565 // We are looking at "type identifier".
1566 return peek; 1566 return peek;
1567 } else { 1567 } else {
1568 return null; 1568 return null;
1569 } 1569 }
1570 } 1570 }
1571 1571
1572 Token peekIdentifierAfterOptionalType(Token token) { 1572 Token peekIdentifierAfterOptionalType(Token token) {
1573 Token peek = peekIdentifierAfterType(token); 1573 Token peek = peekAfterIfType(token);
1574 if (peek != null) { 1574 if (peek != null && peek.isIdentifier()) {
1575 // We are looking at "type identifier". 1575 // We are looking at "type identifier".
1576 return peek; 1576 return peek;
1577 } else if (token.isIdentifier()) { 1577 } else if (token.isIdentifier()) {
1578 // We are looking at "identifier". 1578 // We are looking at "identifier".
1579 return token; 1579 return token;
1580 } else { 1580 } else {
1581 return null; 1581 return null;
1582 } 1582 }
1583 } 1583 }
1584 1584
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after
2593 } 2593 }
2594 listener.handleContinueStatement(hasTarget, continueKeyword, token); 2594 listener.handleContinueStatement(hasTarget, continueKeyword, token);
2595 return expectSemicolon(token); 2595 return expectSemicolon(token);
2596 } 2596 }
2597 2597
2598 Token parseEmptyStatement(Token token) { 2598 Token parseEmptyStatement(Token token) {
2599 listener.handleEmptyStatement(token); 2599 listener.handleEmptyStatement(token);
2600 return expectSemicolon(token); 2600 return expectSemicolon(token);
2601 } 2601 }
2602 } 2602 }
OLDNEW
« 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