OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 part of dart.core; | 5 part of dart.core; |
6 | 6 |
7 /** | 7 /** |
8 * A parsed URI, such as a URL. | 8 * A parsed URI, such as a URL. |
9 * | 9 * |
10 * **See also:** | 10 * **See also:** |
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 } else { | 744 } else { |
745 throw new UnsupportedError("Illegal path character $segment"); | 745 throw new UnsupportedError("Illegal path character $segment"); |
746 } | 746 } |
747 } | 747 } |
748 }); | 748 }); |
749 } | 749 } |
750 | 750 |
751 static _checkWindowsPathReservedCharacters(List<String> segments, | 751 static _checkWindowsPathReservedCharacters(List<String> segments, |
752 bool argumentError, | 752 bool argumentError, |
753 [int firstSegment = 0]) { | 753 [int firstSegment = 0]) { |
754 segments.skip(firstSegment).forEach((segment) { | 754 for (var segment in segments.skip(firstSegment)) { |
755 if (segment.contains(new RegExp(r'["*/:<>?\\|]'))) { | 755 if (segment.contains(new RegExp(r'["*/:<>?\\|]'))) { |
756 if (argumentError) { | 756 if (argumentError) { |
757 throw new ArgumentError("Illegal character in path"); | 757 throw new ArgumentError("Illegal character in path"); |
758 } else { | 758 } else { |
759 throw new UnsupportedError("Illegal character in path"); | 759 throw new UnsupportedError("Illegal character in path"); |
760 } | 760 } |
761 } | 761 } |
762 }); | 762 } |
763 } | 763 } |
764 | 764 |
765 static _checkWindowsDriveLetter(int charCode, bool argumentError) { | 765 static _checkWindowsDriveLetter(int charCode, bool argumentError) { |
766 if ((_UPPER_CASE_A <= charCode && charCode <= _UPPER_CASE_Z) || | 766 if ((_UPPER_CASE_A <= charCode && charCode <= _UPPER_CASE_Z) || |
767 (_LOWER_CASE_A <= charCode && charCode <= _LOWER_CASE_Z)) { | 767 (_LOWER_CASE_A <= charCode && charCode <= _LOWER_CASE_Z)) { |
768 return; | 768 return; |
769 } | 769 } |
770 if (argumentError) { | 770 if (argumentError) { |
771 throw new ArgumentError("Illegal drive letter " + | 771 throw new ArgumentError("Illegal drive letter " + |
772 new String.fromCharCode(charCode)); | 772 new String.fromCharCode(charCode)); |
(...skipping 1691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2464 0xafff, // 0x30 - 0x3f 1111111111110101 | 2464 0xafff, // 0x30 - 0x3f 1111111111110101 |
2465 // @ABCDEFGHIJKLMNO | 2465 // @ABCDEFGHIJKLMNO |
2466 0xffff, // 0x40 - 0x4f 1111111111111111 | 2466 0xffff, // 0x40 - 0x4f 1111111111111111 |
2467 // PQRSTUVWXYZ _ | 2467 // PQRSTUVWXYZ _ |
2468 0x87ff, // 0x50 - 0x5f 1111111111100001 | 2468 0x87ff, // 0x50 - 0x5f 1111111111100001 |
2469 // abcdefghijklmno | 2469 // abcdefghijklmno |
2470 0xfffe, // 0x60 - 0x6f 0111111111111111 | 2470 0xfffe, // 0x60 - 0x6f 0111111111111111 |
2471 // pqrstuvwxyz ~ | 2471 // pqrstuvwxyz ~ |
2472 0x47ff]; // 0x70 - 0x7f 1111111111100010 | 2472 0x47ff]; // 0x70 - 0x7f 1111111111100010 |
2473 } | 2473 } |
OLD | NEW |