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

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

Issue 12299006: Start tracking all registered elements in one big full function set (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Register fields. Created 7 years, 10 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 part of scanner; 5 part of scanner;
6 6
7 /** 7 /**
8 * An event generating parser of Dart programs. This parser expects 8 * An event generating parser of Dart programs. This parser expects
9 * all tokens in a linked list (aka a token stream). 9 * all tokens in a linked list (aka a token stream).
10 * 10 *
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 listener.handleNoType(token); 549 listener.handleNoType(token);
550 } 550 }
551 listener.endTypeVariable(token); 551 listener.endTypeVariable(token);
552 return token; 552 return token;
553 } 553 }
554 554
555 /** 555 /**
556 * Returns true if the stringValue of the [token] is [value]. 556 * Returns true if the stringValue of the [token] is [value].
557 */ 557 */
558 bool optional(String value, Token token) { 558 bool optional(String value, Token token) {
559 return identical(value, token.stringValue); 559 return identical(value, token.stringValue);
560 } 560 }
561 561
562 /** 562 /**
563 * Returns true if the stringValue of the [token] is either [value1], 563 * Returns true if the stringValue of the [token] is either [value1],
564 * [value2], [value3], or [value4]. 564 * [value2], [value3], or [value4].
565 */ 565 */
566 bool isOneOf4(Token token, 566 bool isOneOf4(Token token,
567 String value1, String value2, String value3, String value4) { 567 String value1, String value2, String value3, String value4) {
568 String stringValue = token.stringValue; 568 String stringValue = token.stringValue;
569 return identical(value1, stringValue) || 569 return identical(value1, stringValue) ||
(...skipping 1652 matching lines...) Expand 10 before | Expand all | Expand 10 after
2222 } 2222 }
2223 listener.handleContinueStatement(hasTarget, continueKeyword, token); 2223 listener.handleContinueStatement(hasTarget, continueKeyword, token);
2224 return expectSemicolon(token); 2224 return expectSemicolon(token);
2225 } 2225 }
2226 2226
2227 Token parseEmptyStatement(Token token) { 2227 Token parseEmptyStatement(Token token) {
2228 listener.handleEmptyStatement(token); 2228 listener.handleEmptyStatement(token);
2229 return expectSemicolon(token); 2229 return expectSemicolon(token);
2230 } 2230 }
2231 } 2231 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698