| 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 library dart2js.tokens.keywords; | 5 library dart2js.tokens.keywords; |
| 6 | 6 |
| 7 import '../util/characters.dart' as Characters show $a; | 7 import '../util/characters.dart' as Characters show $a; |
| 8 | 8 |
| 9 import 'precedence.dart' show PrecedenceInfo; | 9 import 'precedence.dart' show PrecedenceInfo; |
| 10 import 'precedence_constants.dart' as Precedence | 10 import 'precedence_constants.dart' as Precedence |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 const Keyword("get", isBuiltIn: true), | 61 const Keyword("get", isBuiltIn: true), |
| 62 const Keyword("implements", isBuiltIn: true), | 62 const Keyword("implements", isBuiltIn: true), |
| 63 const Keyword("import", isBuiltIn: true), | 63 const Keyword("import", isBuiltIn: true), |
| 64 const Keyword("library", isBuiltIn: true), | 64 const Keyword("library", isBuiltIn: true), |
| 65 const Keyword("operator", isBuiltIn: true), | 65 const Keyword("operator", isBuiltIn: true), |
| 66 const Keyword("part", isBuiltIn: true), | 66 const Keyword("part", isBuiltIn: true), |
| 67 const Keyword("set", isBuiltIn: true), | 67 const Keyword("set", isBuiltIn: true), |
| 68 const Keyword("static", isBuiltIn: true), | 68 const Keyword("static", isBuiltIn: true), |
| 69 const Keyword("typedef", isBuiltIn: true), | 69 const Keyword("typedef", isBuiltIn: true), |
| 70 | 70 |
| 71 const Keyword("async", isPseudo: true), |
| 72 const Keyword("await", isPseudo: true), |
| 73 const Keyword("deferred", isPseudo: true), |
| 71 const Keyword("hide", isPseudo: true), | 74 const Keyword("hide", isPseudo: true), |
| 72 const Keyword("native", isPseudo: true), | 75 const Keyword("native", isPseudo: true), |
| 73 const Keyword("of", isPseudo: true), | 76 const Keyword("of", isPseudo: true), |
| 74 const Keyword("on", isPseudo: true), | 77 const Keyword("on", isPseudo: true), |
| 78 const Keyword("patch", isPseudo: true), |
| 75 const Keyword("show", isPseudo: true), | 79 const Keyword("show", isPseudo: true), |
| 76 const Keyword("source", isPseudo: true), | 80 const Keyword("source", isPseudo: true), |
| 77 const Keyword("deferred", isPseudo: true), | |
| 78 const Keyword("async", isPseudo: true), | |
| 79 const Keyword("sync", isPseudo: true), | 81 const Keyword("sync", isPseudo: true), |
| 80 const Keyword("await", isPseudo: true), | 82 const Keyword("yield", isPseudo: true), |
| 81 const Keyword("yield", isPseudo: true) | |
| 82 ]; | 83 ]; |
| 83 | 84 |
| 84 final String syntax; | 85 final String syntax; |
| 85 final bool isPseudo; | 86 final bool isPseudo; |
| 86 final bool isBuiltIn; | 87 final bool isBuiltIn; |
| 87 final PrecedenceInfo info; | 88 final PrecedenceInfo info; |
| 88 | 89 |
| 89 static Map<String, Keyword> _keywords; | 90 static Map<String, Keyword> _keywords; |
| 90 static Map<String, Keyword> get keywords { | 91 static Map<String, Keyword> get keywords { |
| 91 if (_keywords == null) { | 92 if (_keywords == null) { |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 /** | 207 /** |
| 207 * A state that has no outgoing transitions. | 208 * A state that has no outgoing transitions. |
| 208 */ | 209 */ |
| 209 class LeafKeywordState extends KeywordState { | 210 class LeafKeywordState extends KeywordState { |
| 210 LeafKeywordState(String syntax) : super(Keyword.keywords[syntax]); | 211 LeafKeywordState(String syntax) : super(Keyword.keywords[syntax]); |
| 211 | 212 |
| 212 KeywordState next(int c) => null; | 213 KeywordState next(int c) => null; |
| 213 | 214 |
| 214 String toString() => keyword.syntax; | 215 String toString() => keyword.syntax; |
| 215 } | 216 } |
| OLD | NEW |