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

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

Issue 14022007: Move Iterable implementation to collection. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Merge to head. Created 7 years, 8 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 part of scanner; 5 part of scanner;
6 6
7 /** 7 /**
8 * A keyword in the Dart programming language. 8 * A keyword in the Dart programming language.
9 */ 9 */
10 class Keyword extends Iterable<int> implements SourceString { 10 class Keyword extends IterableBase<int> implements SourceString {
11 static const List<Keyword> values = const <Keyword> [ 11 static const List<Keyword> values = const <Keyword> [
12 const Keyword("assert"), 12 const Keyword("assert"),
13 const Keyword("break"), 13 const Keyword("break"),
14 const Keyword("case"), 14 const Keyword("case"),
15 const Keyword("catch"), 15 const Keyword("catch"),
16 const Keyword("class"), 16 const Keyword("class"),
17 const Keyword("const"), 17 const Keyword("const"),
18 const Keyword("continue"), 18 const Keyword("continue"),
19 const Keyword("default"), 19 const Keyword("default"),
20 const Keyword("do"), 20 const Keyword("do"),
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 */ 222 */
223 class LeafKeywordState extends KeywordState { 223 class LeafKeywordState extends KeywordState {
224 LeafKeywordState(String syntax) : super(Keyword.keywords[syntax]); 224 LeafKeywordState(String syntax) : super(Keyword.keywords[syntax]);
225 225
226 bool isLeaf() => true; 226 bool isLeaf() => true;
227 227
228 KeywordState next(int c) => null; 228 KeywordState next(int c) => null;
229 229
230 String toString() => keyword.syntax; 230 String toString() => keyword.syntax;
231 } 231 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698