| 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 fasta.scanner.keywords; | 5 library fasta.scanner.keywords; |
| 6 | 6 |
| 7 import 'characters.dart' show | 7 import 'characters.dart' show |
| 8 $a; | 8 $a; |
| 9 | 9 |
| 10 import 'precedence.dart' show | 10 import 'precedence.dart' show |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 const Keyword("get", isBuiltIn: true), | 67 const Keyword("get", isBuiltIn: true), |
| 68 const Keyword("implements", isBuiltIn: true), | 68 const Keyword("implements", isBuiltIn: true), |
| 69 const Keyword("import", isBuiltIn: true), | 69 const Keyword("import", isBuiltIn: true), |
| 70 const Keyword("library", isBuiltIn: true), | 70 const Keyword("library", isBuiltIn: true), |
| 71 const Keyword("operator", isBuiltIn: true), | 71 const Keyword("operator", isBuiltIn: true), |
| 72 const Keyword("part", isBuiltIn: true), | 72 const Keyword("part", isBuiltIn: true), |
| 73 const Keyword("set", isBuiltIn: true), | 73 const Keyword("set", isBuiltIn: true), |
| 74 const Keyword("static", isBuiltIn: true), | 74 const Keyword("static", isBuiltIn: true), |
| 75 const Keyword("typedef", isBuiltIn: true), | 75 const Keyword("typedef", isBuiltIn: true), |
| 76 | 76 |
| 77 const Keyword("async", isPseudo: true), |
| 78 const Keyword("await", isPseudo: true), |
| 79 const Keyword("deferred", isPseudo: true), |
| 77 const Keyword("hide", isPseudo: true), | 80 const Keyword("hide", isPseudo: true), |
| 78 const Keyword("native", isPseudo: true), | 81 const Keyword("native", isPseudo: true), |
| 79 const Keyword("of", isPseudo: true), | 82 const Keyword("of", isPseudo: true), |
| 80 const Keyword("on", isPseudo: true), | 83 const Keyword("on", isPseudo: true), |
| 84 const Keyword("patch", isPseudo: true), |
| 81 const Keyword("show", isPseudo: true), | 85 const Keyword("show", isPseudo: true), |
| 82 const Keyword("source", isPseudo: true), | 86 const Keyword("source", isPseudo: true), |
| 83 const Keyword("deferred", isPseudo: true), | |
| 84 const Keyword("async", isPseudo: true), | |
| 85 const Keyword("sync", isPseudo: true), | 87 const Keyword("sync", isPseudo: true), |
| 86 const Keyword("await", isPseudo: true), | |
| 87 const Keyword("yield", isPseudo: true), | 88 const Keyword("yield", isPseudo: true), |
| 88 ]; | 89 ]; |
| 89 | 90 |
| 90 final String syntax; | 91 final String syntax; |
| 91 final bool isPseudo; | 92 final bool isPseudo; |
| 92 final bool isBuiltIn; | 93 final bool isBuiltIn; |
| 93 final PrecedenceInfo info; | 94 final PrecedenceInfo info; |
| 94 | 95 |
| 95 static Map<String, Keyword> _keywords; | 96 static Map<String, Keyword> _keywords; |
| 96 static Map<String, Keyword> get keywords { | 97 static Map<String, Keyword> get keywords { |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 /** | 213 /** |
| 213 * A state that has no outgoing transitions. | 214 * A state that has no outgoing transitions. |
| 214 */ | 215 */ |
| 215 class LeafKeywordState extends KeywordState { | 216 class LeafKeywordState extends KeywordState { |
| 216 LeafKeywordState(String syntax) : super(Keyword.keywords[syntax]); | 217 LeafKeywordState(String syntax) : super(Keyword.keywords[syntax]); |
| 217 | 218 |
| 218 KeywordState next(int c) => null; | 219 KeywordState next(int c) => null; |
| 219 | 220 |
| 220 String toString() => keyword.syntax; | 221 String toString() => keyword.syntax; |
| 221 } | 222 } |
| OLD | NEW |