| 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 /** | 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("break"), | 10 const Keyword("break"), |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 const Keyword("external", isBuiltIn: true), | 45 const Keyword("external", isBuiltIn: true), |
| 46 const Keyword("factory", isBuiltIn: true), | 46 const Keyword("factory", isBuiltIn: true), |
| 47 const Keyword("get", isBuiltIn: true), | 47 const Keyword("get", isBuiltIn: true), |
| 48 const Keyword("implements", isBuiltIn: true), | 48 const Keyword("implements", isBuiltIn: true), |
| 49 const Keyword("interface", isBuiltIn: true), | 49 const Keyword("interface", isBuiltIn: true), |
| 50 const Keyword("operator", isBuiltIn: true), | 50 const Keyword("operator", isBuiltIn: true), |
| 51 const Keyword("set", isBuiltIn: true), | 51 const Keyword("set", isBuiltIn: true), |
| 52 const Keyword("static", isBuiltIn: true), | 52 const Keyword("static", isBuiltIn: true), |
| 53 const Keyword("typedef", isBuiltIn: true), | 53 const Keyword("typedef", isBuiltIn: true), |
| 54 | 54 |
| 55 const Keyword("export", isPseudo: true), |
| 55 const Keyword("hide", isPseudo: true), | 56 const Keyword("hide", isPseudo: true), |
| 56 const Keyword("import", isPseudo: true), | 57 const Keyword("import", isPseudo: true), |
| 57 const Keyword("library", isPseudo: true), | 58 const Keyword("library", isPseudo: true), |
| 58 const Keyword("native", isPseudo: true), | 59 const Keyword("native", isPseudo: true), |
| 60 const Keyword("of", isPseudo: true), |
| 59 const Keyword("on", isPseudo: true), | 61 const Keyword("on", isPseudo: true), |
| 60 const Keyword("part", isPseudo: true), | 62 const Keyword("part", isPseudo: true), |
| 61 const Keyword("show", isPseudo: true), | 63 const Keyword("show", isPseudo: true), |
| 62 const Keyword("source", isPseudo: true) ]; | 64 const Keyword("source", isPseudo: true) ]; |
| 63 | 65 |
| 64 static const DYNAMIC = const Keyword("Dynamic", isBuiltIn: true); | 66 static const DYNAMIC = const Keyword("Dynamic", isBuiltIn: true); |
| 65 | 67 |
| 66 final String syntax; | 68 final String syntax; |
| 67 final bool isPseudo; | 69 final bool isPseudo; |
| 68 final bool isBuiltIn; | 70 final bool isBuiltIn; |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 final Keyword keyword; | 219 final Keyword keyword; |
| 218 | 220 |
| 219 LeafKeywordState(String syntax) : keyword = Keyword.keywords[syntax]; | 221 LeafKeywordState(String syntax) : keyword = Keyword.keywords[syntax]; |
| 220 | 222 |
| 221 bool isLeaf() => true; | 223 bool isLeaf() => true; |
| 222 | 224 |
| 223 KeywordState next(int c) => null; | 225 KeywordState next(int c) => null; |
| 224 | 226 |
| 225 String toString() => keyword.syntax; | 227 String toString() => keyword.syntax; |
| 226 } | 228 } |
| OLD | NEW |