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

Side by Side Diff: pkg/compiler/lib/src/scanner/parser.dart

Issue 1173403002: dart2js: Fix hints in code base. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Updated to latest revision Created 5 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 unified diff | Download patch
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 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after
1319 } 1319 }
1320 1320
1321 Token parseFactoryMethod(Token token) { 1321 Token parseFactoryMethod(Token token) {
1322 assert(isFactoryDeclaration(token)); 1322 assert(isFactoryDeclaration(token));
1323 Token start = token; 1323 Token start = token;
1324 Token externalModifier; 1324 Token externalModifier;
1325 if (identical(token.stringValue, 'external')) { 1325 if (identical(token.stringValue, 'external')) {
1326 externalModifier = token; 1326 externalModifier = token;
1327 token = token.next; 1327 token = token.next;
1328 } 1328 }
1329 Token constKeyword = null;
1330 if (optional('const', token)) { 1329 if (optional('const', token)) {
1331 constKeyword = token; 1330 token = token.next; // Skip const.
1332 token = token.next;
1333 } 1331 }
1334 Token factoryKeyword = token; 1332 Token factoryKeyword = token;
1335 listener.beginFactoryMethod(factoryKeyword); 1333 listener.beginFactoryMethod(factoryKeyword);
1336 token = token.next; // Skip 'factory'. 1334 token = token.next; // Skip 'factory'.
1337 token = parseConstructorReference(token); 1335 token = parseConstructorReference(token);
1338 token = parseFormalParameters(token); 1336 token = parseFormalParameters(token);
1339 token = parseAsyncModifier(token); 1337 token = parseAsyncModifier(token);
1340 if (optional('=', token)) { 1338 if (optional('=', token)) {
1341 token = parseRedirectingFactoryBody(token); 1339 token = parseRedirectingFactoryBody(token);
1342 } else { 1340 } else {
(...skipping 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after
2659 } 2657 }
2660 listener.handleContinueStatement(hasTarget, continueKeyword, token); 2658 listener.handleContinueStatement(hasTarget, continueKeyword, token);
2661 return expectSemicolon(token); 2659 return expectSemicolon(token);
2662 } 2660 }
2663 2661
2664 Token parseEmptyStatement(Token token) { 2662 Token parseEmptyStatement(Token token) {
2665 listener.handleEmptyStatement(token); 2663 listener.handleEmptyStatement(token);
2666 return expectSemicolon(token); 2664 return expectSemicolon(token);
2667 } 2665 }
2668 } 2666 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698