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

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

Issue 10875006: Remove a few warnings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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) 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 class PartialParser extends Parser { 5 class PartialParser extends Parser {
6 PartialParser(Listener listener) : super(listener); 6 PartialParser(Listener listener) : super(listener);
7 7
8 Token parseClassBody(Token token) => skipClassBody(token); 8 Token parseClassBody(Token token) => skipClassBody(token);
9 9
10 Token fullParseClassBody(Token token) => super.parseClassBody(token); 10 Token fullParseClassBody(Token token) => super.parseClassBody(token);
11 11
12 Token parseExpression(Token token) => skipExpression(token); 12 Token parseExpression(Token token) => skipExpression(token);
13 13
14 Token parseArgumentsOpt(Token token) { 14 Token parseArgumentsOpt(Token token) {
15 // This method is overridden for two reasons: 15 // This method is overridden for two reasons:
16 // 1. Avoid generating events for arguments. 16 // 1. Avoid generating events for arguments.
17 // 2. Avoid calling skip expression for each argument (which doesn't work). 17 // 2. Avoid calling skip expression for each argument (which doesn't work).
18 if (optional('(', token)) { 18 if (optional('(', token)) {
19 return token.endGroup.next; 19 BeginGroupToken begin = token;
20 return begin.endGroup.next;
20 } else { 21 } else {
21 return token; 22 return token;
22 } 23 }
23 } 24 }
24 25
25 Token skipExpression(Token token) { 26 Token skipExpression(Token token) {
26 while (true) { 27 while (true) {
27 final kind = token.kind; 28 final kind = token.kind;
28 final value = token.stringValue; 29 final value = token.stringValue;
29 if ((kind === EOF_TOKEN) || 30 if ((kind === EOF_TOKEN) ||
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 return token; 112 return token;
112 } 113 }
113 return listener.unexpected(token); 114 return listener.unexpected(token);
114 } 115 }
115 BeginGroupToken beginGroupToken = token; 116 BeginGroupToken beginGroupToken = token;
116 Token endToken = beginGroupToken.endGroup; 117 Token endToken = beginGroupToken.endGroup;
117 listener.endFormalParameters(0, token, endToken); 118 listener.endFormalParameters(0, token, endToken);
118 return endToken.next; 119 return endToken.next;
119 } 120 }
120 } 121 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/dart_backend/placeholder_collector.dart ('k') | lib/compiler/implementation/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698