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

Side by Side Diff: dart/frog/leg/scanner/parser.dart

Issue 9586007: Expect a '(' before calling parseArguments (which asserts this is the case). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 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
« no previous file with comments | « no previous file | dart/tests/co19/co19-leg.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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. 7 * all tokens in a linked list.
8 */ 8 */
9 class Parser { 9 class Parser {
10 final Listener listener; 10 final Listener listener;
(...skipping 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after
1218 (value === '[]') || 1218 (value === '[]') ||
1219 (value === '{')) { 1219 (value === '{')) {
1220 return parseLiteralListOrMap(constKeyword); 1220 return parseLiteralListOrMap(constKeyword);
1221 } 1221 }
1222 token = parseType(token); 1222 token = parseType(token);
1223 bool named = false; 1223 bool named = false;
1224 if (optional('.', token)) { 1224 if (optional('.', token)) {
1225 named = true; 1225 named = true;
1226 token = parseIdentifier(token.next); 1226 token = parseIdentifier(token.next);
1227 } 1227 }
1228 expect('(', token);
1228 token = parseArguments(token); 1229 token = parseArguments(token);
1229 listener.handleConstExpression(constKeyword, named); 1230 listener.handleConstExpression(constKeyword, named);
1230 return token; 1231 return token;
1231 } 1232 }
1232 1233
1233 Token parseLiteralInt(Token token) { 1234 Token parseLiteralInt(Token token) {
1234 listener.handleLiteralInt(token); 1235 listener.handleLiteralInt(token);
1235 return token.next; 1236 return token.next;
1236 } 1237 }
1237 1238
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
1651 } 1652 }
1652 listener.handleContinueStatement(hasTarget, continueKeyword, token); 1653 listener.handleContinueStatement(hasTarget, continueKeyword, token);
1653 return expectSemicolon(token); 1654 return expectSemicolon(token);
1654 } 1655 }
1655 1656
1656 Token parseEmptyStatement(Token token) { 1657 Token parseEmptyStatement(Token token) {
1657 listener.handleEmptyStatement(token); 1658 listener.handleEmptyStatement(token);
1658 return expectSemicolon(token); 1659 return expectSemicolon(token);
1659 } 1660 }
1660 } 1661 }
OLDNEW
« no previous file with comments | « no previous file | dart/tests/co19/co19-leg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698