OLD | NEW |
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 IterableBase<int> implements SourceString { | 10 class Keyword extends IterableBase<int> implements SourceString { |
(...skipping 10 matching lines...) Expand all Loading... |
21 const Keyword("else"), | 21 const Keyword("else"), |
22 const Keyword("extends"), | 22 const Keyword("extends"), |
23 const Keyword("false"), | 23 const Keyword("false"), |
24 const Keyword("final"), | 24 const Keyword("final"), |
25 const Keyword("finally"), | 25 const Keyword("finally"), |
26 const Keyword("for"), | 26 const Keyword("for"), |
27 const Keyword("if"), | 27 const Keyword("if"), |
28 const Keyword("in"), | 28 const Keyword("in"), |
29 const Keyword("new"), | 29 const Keyword("new"), |
30 const Keyword("null"), | 30 const Keyword("null"), |
| 31 const Keyword("rethrow"), |
31 const Keyword("return"), | 32 const Keyword("return"), |
32 const Keyword("super"), | 33 const Keyword("super"), |
33 const Keyword("switch"), | 34 const Keyword("switch"), |
34 const Keyword("this"), | 35 const Keyword("this"), |
35 const Keyword("throw"), | 36 const Keyword("throw"), |
36 const Keyword("true"), | 37 const Keyword("true"), |
37 const Keyword("try"), | 38 const Keyword("try"), |
38 const Keyword("var"), | 39 const Keyword("var"), |
39 const Keyword("void"), | 40 const Keyword("void"), |
40 const Keyword("while"), | 41 const Keyword("while"), |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 */ | 223 */ |
223 class LeafKeywordState extends KeywordState { | 224 class LeafKeywordState extends KeywordState { |
224 LeafKeywordState(String syntax) : super(Keyword.keywords[syntax]); | 225 LeafKeywordState(String syntax) : super(Keyword.keywords[syntax]); |
225 | 226 |
226 bool isLeaf() => true; | 227 bool isLeaf() => true; |
227 | 228 |
228 KeywordState next(int c) => null; | 229 KeywordState next(int c) => null; |
229 | 230 |
230 String toString() => keyword.syntax; | 231 String toString() => keyword.syntax; |
231 } | 232 } |
OLD | NEW |