| 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("characters"); | 5 #library("characters"); |
| 6 | 6 |
| 7 final int $EOF = 0; | 7 final int $EOF = 0; |
| 8 final int $STX = 2; | 8 final int $STX = 2; |
| 9 final int $BS = 8; |
| 9 final int $TAB = 9; | 10 final int $TAB = 9; |
| 10 final int $LF = 10; | 11 final int $LF = 10; |
| 12 final int $VTAB = 11; |
| 13 final int $FF = 12; |
| 11 final int $CR = 13; | 14 final int $CR = 13; |
| 12 final int $SPACE = 32; | 15 final int $SPACE = 32; |
| 13 final int $BANG = 33; | 16 final int $BANG = 33; |
| 14 final int $DQ = 34; | 17 final int $DQ = 34; |
| 15 final int $HASH = 35; | 18 final int $HASH = 35; |
| 16 final int $$ = 36; | 19 final int $$ = 36; |
| 17 final int $PERCENT = 37; | 20 final int $PERCENT = 37; |
| 18 final int $AMPERSAND = 38; | 21 final int $AMPERSAND = 38; |
| 19 final int $SQ = 39; | 22 final int $SQ = 39; |
| 20 final int $OPEN_PAREN = 40; | 23 final int $OPEN_PAREN = 40; |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 assert(isHexDigit(hexDigit)); | 125 assert(isHexDigit(hexDigit)); |
| 123 // hexDigit is one of '0'..'9', 'A'..'F' and 'a'..'f'. | 126 // hexDigit is one of '0'..'9', 'A'..'F' and 'a'..'f'. |
| 124 if (hexDigit <= $9) return hexDigit - $0; | 127 if (hexDigit <= $9) return hexDigit - $0; |
| 125 return (hexDigit | ($a ^ $A)) - ($a - 10); | 128 return (hexDigit | ($a ^ $A)) - ($a - 10); |
| 126 } | 129 } |
| 127 | 130 |
| 128 bool isUnicodeScalarValue(int value) { | 131 bool isUnicodeScalarValue(int value) { |
| 129 return value < $FIRST_SURROGATE || | 132 return value < $FIRST_SURROGATE || |
| 130 (value > $LAST_SURROGATE && value <= $LAST_CODE_POINT); | 133 (value > $LAST_SURROGATE && value <= $LAST_CODE_POINT); |
| 131 } | 134 } |
| OLD | NEW |