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

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

Issue 11238035: Make isEmpty a getter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file with co19 issue number. Created 8 years, 1 month 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 /** 5 /**
6 * A keyword in the Dart programming language. 6 * A keyword in the Dart programming language.
7 */ 7 */
8 class Keyword implements SourceString { 8 class Keyword implements SourceString {
9 static const List<Keyword> values = const <Keyword> [ 9 static const List<Keyword> values = const <Keyword> [
10 const Keyword("assert"), 10 const Keyword("assert"),
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 String toString() => syntax; 109 String toString() => syntax;
110 String slowToString() => syntax; 110 String slowToString() => syntax;
111 String get stringValue => syntax; 111 String get stringValue => syntax;
112 112
113 SourceString copyWithoutQuotes(int initial, int terminal) { 113 SourceString copyWithoutQuotes(int initial, int terminal) {
114 // TODO(lrn): consider remodelling to avoid having this method in keywords. 114 // TODO(lrn): consider remodelling to avoid having this method in keywords.
115 return this; 115 return this;
116 } 116 }
117 117
118 bool isEmpty() => false; 118 bool get isEmpty => false;
119 bool isPrivate() => false; 119 bool isPrivate() => false;
120 } 120 }
121 121
122 /** 122 /**
123 * Abstract state in a state machine for scanning keywords. 123 * Abstract state in a state machine for scanning keywords.
124 */ 124 */
125 abstract class KeywordState { 125 abstract class KeywordState {
126 abstract bool isLeaf(); 126 abstract bool isLeaf();
127 abstract KeywordState next(int c); 127 abstract KeywordState next(int c);
128 abstract Keyword get keyword; 128 abstract Keyword get keyword;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 final Keyword keyword; 222 final Keyword keyword;
223 223
224 LeafKeywordState(String syntax) : keyword = Keyword.keywords[syntax]; 224 LeafKeywordState(String syntax) : keyword = 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
« no previous file with comments | « lib/compiler/implementation/scanner/class_element_parser.dart ('k') | lib/compiler/implementation/scanner/listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698