| 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 $a, $z, $A, $Z; | 7 import 'characters.dart' show $a, $z, $A, $Z; |
| 8 | 8 |
| 9 import 'precedence.dart' show PrecedenceInfo; | 9 import 'precedence.dart' show PrecedenceInfo; |
| 10 | 10 |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 } | 180 } |
| 181 } | 181 } |
| 182 | 182 |
| 183 /** | 183 /** |
| 184 * A state with multiple outgoing transitions. | 184 * A state with multiple outgoing transitions. |
| 185 */ | 185 */ |
| 186 abstract class ArrayKeywordState implements KeywordState { | 186 abstract class ArrayKeywordState implements KeywordState { |
| 187 final List<KeywordState> table; | 187 final List<KeywordState> table; |
| 188 final Keyword keyword; | 188 final Keyword keyword; |
| 189 | 189 |
| 190 ArrayKeywordState(List<KeywordState> this.table, String syntax) | 190 ArrayKeywordState(this.table, String syntax) |
| 191 : keyword = ((syntax == null) ? null : Keyword.keywords[syntax]); | 191 : keyword = ((syntax == null) ? null : Keyword.keywords[syntax]); |
| 192 | 192 |
| 193 KeywordState next(int c); | 193 KeywordState next(int c); |
| 194 | 194 |
| 195 KeywordState nextCapital(int c); | 195 KeywordState nextCapital(int c); |
| 196 | 196 |
| 197 String toString() { | 197 String toString() { |
| 198 StringBuffer sb = new StringBuffer(); | 198 StringBuffer sb = new StringBuffer(); |
| 199 sb.write("["); | 199 sb.write("["); |
| 200 if (keyword != null) { | 200 if (keyword != null) { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 class LeafKeywordState implements KeywordState { | 242 class LeafKeywordState implements KeywordState { |
| 243 final Keyword keyword; | 243 final Keyword keyword; |
| 244 | 244 |
| 245 LeafKeywordState(String syntax) : keyword = Keyword.keywords[syntax]; | 245 LeafKeywordState(String syntax) : keyword = Keyword.keywords[syntax]; |
| 246 | 246 |
| 247 KeywordState next(int c) => null; | 247 KeywordState next(int c) => null; |
| 248 KeywordState nextCapital(int c) => null; | 248 KeywordState nextCapital(int c) => null; |
| 249 | 249 |
| 250 String toString() => keyword.syntax; | 250 String toString() => keyword.syntax; |
| 251 } | 251 } |
| OLD | NEW |