OLD | NEW |
1 library encoding_parser; | 1 library encoding_parser; |
2 | 2 |
3 import 'dart:collection'; | 3 import 'dart:collection'; |
4 import 'constants.dart'; | 4 import 'constants.dart'; |
5 import 'inputstream.dart'; | 5 import 'inputstream.dart'; |
6 import 'utils.dart'; | |
7 | 6 |
8 // TODO(jmesserly): I converted StopIteration to StateError("No more elements"). | 7 // TODO(jmesserly): I converted StopIteration to StateError("No more elements"). |
9 // Seems strange to throw this from outside of an iterator though. | 8 // Seems strange to throw this from outside of an iterator though. |
10 /** | 9 /** |
11 * String-like object with an associated position and various extra methods | 10 * String-like object with an associated position and various extra methods |
12 * If the position is ever greater than the string length then an exception is | 11 * If the position is ever greater than the string length then an exception is |
13 * raised. | 12 * raised. |
14 */ | 13 */ |
15 class EncodingBytes extends IterableBase<String> { | 14 class EncodingBytes extends IterableBase<String> { |
16 final String _bytes; | 15 final String _bytes; |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 } | 375 } |
377 } | 376 } |
378 } | 377 } |
379 | 378 |
380 | 379 |
381 bool isSpaceOrAngleBracket(String char) { | 380 bool isSpaceOrAngleBracket(String char) { |
382 return char == ">" || char == "<" || isWhitespace(char); | 381 return char == ">" || char == "<" || isWhitespace(char); |
383 } | 382 } |
384 | 383 |
385 typedef bool CharPreciate(String char); | 384 typedef bool CharPreciate(String char); |
OLD | NEW |