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

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

Issue 9619009: A local may be an unnamed closure. Make sure we emit a name for them. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
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 | « client/tests/client/client-leg.status ('k') | frog/leg/ssa/codegen.dart » ('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 * 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 final Keyword BREAK = const Keyword("break"); 9 static final Keyword BREAK = const Keyword("break");
10 static final Keyword CASE = const Keyword("case"); 10 static final Keyword CASE = const Keyword("case");
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 Iterator<int> iterator() => new StringCodeIterator(syntax); 132 Iterator<int> iterator() => new StringCodeIterator(syntax);
133 133
134 void printOn(StringBuffer sb) { 134 void printOn(StringBuffer sb) {
135 sb.add(syntax); 135 sb.add(syntax);
136 } 136 }
137 137
138 String toString() => syntax; 138 String toString() => syntax;
139 String slowToString() => syntax; 139 String slowToString() => syntax;
140 String get stringValue() => syntax; 140 String get stringValue() => syntax;
141 141
142 bool isEmtpy() => false; 142 bool isEmpty() => false;
143 } 143 }
144 144
145 /** 145 /**
146 * Abstract state in a state machine for scanning keywords. 146 * Abstract state in a state machine for scanning keywords.
147 */ 147 */
148 class KeywordState { 148 class KeywordState {
149 abstract bool isLeaf(); 149 abstract bool isLeaf();
150 abstract KeywordState next(int c); 150 abstract KeywordState next(int c);
151 abstract Keyword get keyword(); 151 abstract Keyword get keyword();
152 152
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 final Keyword keyword; 245 final Keyword keyword;
246 246
247 LeafKeywordState(String syntax) : keyword = Keyword.keywords[syntax]; 247 LeafKeywordState(String syntax) : keyword = Keyword.keywords[syntax];
248 248
249 bool isLeaf() => true; 249 bool isLeaf() => true;
250 250
251 KeywordState next(int c) => null; 251 KeywordState next(int c) => null;
252 252
253 String toString() => keyword.syntax; 253 String toString() => keyword.syntax;
254 } 254 }
OLDNEW
« no previous file with comments | « client/tests/client/client-leg.status ('k') | frog/leg/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698