| 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 { | 10 class Keyword { |
| (...skipping 30 matching lines...) Expand all Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |