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

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

Issue 698563005: Support parsing of enums in dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add unparser test. Created 6 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 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 { 10 class Keyword {
(...skipping 30 matching lines...) Expand all
41 const Keyword("while"), 41 const Keyword("while"),
42 const Keyword("with"), 42 const Keyword("with"),
43 43
44 // TODO(ahe): Don't think this is a reserved word. 44 // TODO(ahe): Don't think this is a reserved word.
45 // See: http://dartbug.com/5579 45 // See: http://dartbug.com/5579
46 const Keyword("is", info: IS_INFO), 46 const Keyword("is", info: IS_INFO),
47 47
48 const Keyword("abstract", isBuiltIn: true), 48 const Keyword("abstract", isBuiltIn: true),
49 const Keyword("as", info: AS_INFO, isBuiltIn: true), 49 const Keyword("as", info: AS_INFO, isBuiltIn: true),
50 const Keyword("dynamic", isBuiltIn: true), 50 const Keyword("dynamic", isBuiltIn: true),
51 const Keyword("enum", isBuiltIn: true),
51 const Keyword("export", isBuiltIn: true), 52 const Keyword("export", isBuiltIn: true),
52 const Keyword("external", isBuiltIn: true), 53 const Keyword("external", isBuiltIn: true),
53 const Keyword("factory", isBuiltIn: true), 54 const Keyword("factory", isBuiltIn: true),
54 const Keyword("get", isBuiltIn: true), 55 const Keyword("get", isBuiltIn: true),
55 const Keyword("implements", isBuiltIn: true), 56 const Keyword("implements", isBuiltIn: true),
56 const Keyword("import", isBuiltIn: true), 57 const Keyword("import", isBuiltIn: true),
57 const Keyword("library", isBuiltIn: true), 58 const Keyword("library", isBuiltIn: true),
58 const Keyword("operator", isBuiltIn: true), 59 const Keyword("operator", isBuiltIn: true),
59 const Keyword("part", isBuiltIn: true), 60 const Keyword("part", isBuiltIn: true),
60 const Keyword("set", isBuiltIn: true), 61 const Keyword("set", isBuiltIn: true),
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 /** 197 /**
197 * A state that has no outgoing transitions. 198 * A state that has no outgoing transitions.
198 */ 199 */
199 class LeafKeywordState extends KeywordState { 200 class LeafKeywordState extends KeywordState {
200 LeafKeywordState(String syntax) : super(Keyword.keywords[syntax]); 201 LeafKeywordState(String syntax) : super(Keyword.keywords[syntax]);
201 202
202 KeywordState next(int c) => null; 203 KeywordState next(int c) => null;
203 204
204 String toString() => keyword.syntax; 205 String toString() => keyword.syntax;
205 } 206 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698