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

Side by Side Diff: lib/compiler/implementation/scanner/parser.dart

Issue 11270008: Add type annotations to remove warnings and fix a bug. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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 | Annotate | Revision Log
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 /** 5 /**
6 * An event generating parser of Dart programs. This parser expects 6 * An event generating parser of Dart programs. This parser expects
7 * all tokens in a linked list (aka a token stream). 7 * all tokens in a linked list (aka a token stream).
8 * 8 *
9 * The class [Scanner] is used to generate a token stream. See the 9 * The class [Scanner] is used to generate a token stream. See the
10 * file scanner.dart. 10 * file scanner.dart.
(...skipping 1520 matching lines...) Expand 10 before | Expand all | Expand 10 after
1531 } else { 1531 } else {
1532 bool old = mayParseFunctionExpressions; 1532 bool old = mayParseFunctionExpressions;
1533 mayParseFunctionExpressions = true; 1533 mayParseFunctionExpressions = true;
1534 token = parseParenthesizedExpression(token); 1534 token = parseParenthesizedExpression(token);
1535 mayParseFunctionExpressions = old; 1535 mayParseFunctionExpressions = old;
1536 return token; 1536 return token;
1537 } 1537 }
1538 } 1538 }
1539 1539
1540 Token parseParenthesizedExpression(Token token) { 1540 Token parseParenthesizedExpression(Token token) {
1541 Token begin = token; 1541 BeginGroupToken begin = token;
1542 token = expect('(', token); 1542 token = expect('(', token);
1543 token = parseExpression(token); 1543 token = parseExpression(token);
1544 if (!identical(begin.endGroup, token)) { 1544 if (!identical(begin.endGroup, token)) {
1545 listener.unexpected(token); 1545 listener.unexpected(token);
1546 token = begin.endGroup; 1546 token = begin.endGroup;
1547 } 1547 }
1548 listener.handleParenthesizedExpression(begin); 1548 listener.handleParenthesizedExpression(begin);
1549 return expect(')', token); 1549 return expect(')', token);
1550 } 1550 }
1551 1551
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
2160 } 2160 }
2161 listener.handleContinueStatement(hasTarget, continueKeyword, token); 2161 listener.handleContinueStatement(hasTarget, continueKeyword, token);
2162 return expectSemicolon(token); 2162 return expectSemicolon(token);
2163 } 2163 }
2164 2164
2165 Token parseEmptyStatement(Token token) { 2165 Token parseEmptyStatement(Token token) {
2166 listener.handleEmptyStatement(token); 2166 listener.handleEmptyStatement(token);
2167 return expectSemicolon(token); 2167 return expectSemicolon(token);
2168 } 2168 }
2169 } 2169 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/dart_backend/placeholder_collector.dart ('k') | lib/compiler/implementation/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698