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 // Frequently used character codes. | 7 // Frequently used character codes. |
8 const int _SPACE = 0x20; | 8 const int _SPACE = 0x20; |
9 const int _PERCENT = 0x25; | 9 const int _PERCENT = 0x25; |
10 const int _AMPERSAND = 0x26; | 10 const int _AMPERSAND = 0x26; |
(...skipping 2976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2987 0x0001, // 0x40 - 0x4f 1000000000000000 | 2987 0x0001, // 0x40 - 0x4f 1000000000000000 |
2988 // [ ] | 2988 // [ ] |
2989 0x2800, // 0x50 - 0x5f 0000000000010100 | 2989 0x2800, // 0x50 - 0x5f 0000000000010100 |
2990 // | 2990 // |
2991 0x0000, // 0x60 - 0x6f 0000000000000000 | 2991 0x0000, // 0x60 - 0x6f 0000000000000000 |
2992 // | 2992 // |
2993 0x0000, // 0x70 - 0x7f 0000000000000000 | 2993 0x0000, // 0x70 - 0x7f 0000000000000000 |
2994 ]; | 2994 ]; |
2995 | 2995 |
2996 // Characters allowed in the userinfo as of RFC 3986. | 2996 // Characters allowed in the userinfo as of RFC 3986. |
2997 // RFC 3986 Apendix A | 2997 // RFC 3986 Appendix A |
2998 // userinfo = *( unreserved / pct-encoded / sub-delims / ':') | 2998 // userinfo = *( unreserved / pct-encoded / sub-delims / ':') |
2999 static const _userinfoTable = const [ | 2999 static const _userinfoTable = const [ |
3000 // LSB MSB | 3000 // LSB MSB |
3001 // | | | 3001 // | | |
3002 0x0000, // 0x00 - 0x0f 0000000000000000 | 3002 0x0000, // 0x00 - 0x0f 0000000000000000 |
3003 0x0000, // 0x10 - 0x1f 0000000000000000 | 3003 0x0000, // 0x10 - 0x1f 0000000000000000 |
3004 // ! $ &'()*+,-. | 3004 // ! $ &'()*+,-. |
3005 0x7fd2, // 0x20 - 0x2f 0100101111111110 | 3005 0x7fd2, // 0x20 - 0x2f 0100101111111110 |
3006 // 0123456789:; = | 3006 // 0123456789:; = |
3007 0x2fff, // 0x30 - 0x3f 1111111111110100 | 3007 0x2fff, // 0x30 - 0x3f 1111111111110100 |
3008 // ABCDEFGHIJKLMNO | 3008 // ABCDEFGHIJKLMNO |
3009 0xfffe, // 0x40 - 0x4f 0111111111111111 | 3009 0xfffe, // 0x40 - 0x4f 0111111111111111 |
3010 // PQRSTUVWXYZ _ | 3010 // PQRSTUVWXYZ _ |
3011 0x87ff, // 0x50 - 0x5f 1111111111100001 | 3011 0x87ff, // 0x50 - 0x5f 1111111111100001 |
3012 // abcdefghijklmno | 3012 // abcdefghijklmno |
3013 0xfffe, // 0x60 - 0x6f 0111111111111111 | 3013 0xfffe, // 0x60 - 0x6f 0111111111111111 |
3014 // pqrstuvwxyz ~ | 3014 // pqrstuvwxyz ~ |
3015 0x47ff, // 0x70 - 0x7f 1111111111100010 | 3015 0x47ff, // 0x70 - 0x7f 1111111111100010 |
3016 ]; | 3016 ]; |
3017 | 3017 |
3018 // Characters allowed in the reg-name as of RFC 3986. | 3018 // Characters allowed in the reg-name as of RFC 3986. |
3019 // RFC 3986 Apendix A | 3019 // RFC 3986 Appendix A |
3020 // reg-name = *( unreserved / pct-encoded / sub-delims ) | 3020 // reg-name = *( unreserved / pct-encoded / sub-delims ) |
3021 static const _regNameTable = const [ | 3021 static const _regNameTable = const [ |
3022 // LSB MSB | 3022 // LSB MSB |
3023 // | | | 3023 // | | |
3024 0x0000, // 0x00 - 0x0f 0000000000000000 | 3024 0x0000, // 0x00 - 0x0f 0000000000000000 |
3025 0x0000, // 0x10 - 0x1f 0000000000000000 | 3025 0x0000, // 0x10 - 0x1f 0000000000000000 |
3026 // ! $%&'()*+,-. | 3026 // ! $%&'()*+,-. |
3027 0x7ff2, // 0x20 - 0x2f 0100111111111110 | 3027 0x7ff2, // 0x20 - 0x2f 0100111111111110 |
3028 // 0123456789 ; = | 3028 // 0123456789 ; = |
3029 0x2bff, // 0x30 - 0x3f 1111111111010100 | 3029 0x2bff, // 0x30 - 0x3f 1111111111010100 |
(...skipping 1600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4630 int delta = (text.codeUnitAt(start + 4) ^ _COLON) * 3; | 4630 int delta = (text.codeUnitAt(start + 4) ^ _COLON) * 3; |
4631 delta |= text.codeUnitAt(start) ^ 0x64 /*d*/; | 4631 delta |= text.codeUnitAt(start) ^ 0x64 /*d*/; |
4632 delta |= text.codeUnitAt(start + 1) ^ 0x61 /*a*/; | 4632 delta |= text.codeUnitAt(start + 1) ^ 0x61 /*a*/; |
4633 delta |= text.codeUnitAt(start + 2) ^ 0x74 /*t*/; | 4633 delta |= text.codeUnitAt(start + 2) ^ 0x74 /*t*/; |
4634 delta |= text.codeUnitAt(start + 3) ^ 0x61 /*a*/; | 4634 delta |= text.codeUnitAt(start + 3) ^ 0x61 /*a*/; |
4635 return delta; | 4635 return delta; |
4636 } | 4636 } |
4637 | 4637 |
4638 /// Helper function returning the length of a string, or `0` for `null`. | 4638 /// Helper function returning the length of a string, or `0` for `null`. |
4639 int _stringOrNullLength(String s) => (s == null) ? 0 : s.length; | 4639 int _stringOrNullLength(String s) => (s == null) ? 0 : s.length; |
OLD | NEW |