Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(329)

Side by Side Diff: lib/compiler/implementation/util/characters.dart

Issue 10880068: - Change "static final" to "static const" in the lib/ directory. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « lib/compiler/implementation/universe.dart ('k') | lib/compiler/implementation/warnings.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 const int $EOF = 0;
8 final int $STX = 2; 8 const int $STX = 2;
9 final int $BS = 8; 9 const int $BS = 8;
10 final int $TAB = 9; 10 const int $TAB = 9;
11 final int $LF = 10; 11 const int $LF = 10;
12 final int $VTAB = 11; 12 const int $VTAB = 11;
13 final int $FF = 12; 13 const int $FF = 12;
14 final int $CR = 13; 14 const int $CR = 13;
15 final int $SPACE = 32; 15 const int $SPACE = 32;
16 final int $BANG = 33; 16 const int $BANG = 33;
17 final int $DQ = 34; 17 const int $DQ = 34;
18 final int $HASH = 35; 18 const int $HASH = 35;
19 final int $$ = 36; 19 const int $$ = 36;
20 final int $PERCENT = 37; 20 const int $PERCENT = 37;
21 final int $AMPERSAND = 38; 21 const int $AMPERSAND = 38;
22 final int $SQ = 39; 22 const int $SQ = 39;
23 final int $OPEN_PAREN = 40; 23 const int $OPEN_PAREN = 40;
24 final int $CLOSE_PAREN = 41; 24 const int $CLOSE_PAREN = 41;
25 final int $STAR = 42; 25 const int $STAR = 42;
26 final int $PLUS = 43; 26 const int $PLUS = 43;
27 final int $COMMA = 44; 27 const int $COMMA = 44;
28 final int $MINUS = 45; 28 const int $MINUS = 45;
29 final int $PERIOD = 46; 29 const int $PERIOD = 46;
30 final int $SLASH = 47; 30 const int $SLASH = 47;
31 final int $0 = 48; 31 const int $0 = 48;
32 final int $1 = 49; 32 const int $1 = 49;
33 final int $2 = 50; 33 const int $2 = 50;
34 final int $3 = 51; 34 const int $3 = 51;
35 final int $4 = 52; 35 const int $4 = 52;
36 final int $5 = 53; 36 const int $5 = 53;
37 final int $6 = 54; 37 const int $6 = 54;
38 final int $7 = 55; 38 const int $7 = 55;
39 final int $8 = 56; 39 const int $8 = 56;
40 final int $9 = 57; 40 const int $9 = 57;
41 final int $COLON = 58; 41 const int $COLON = 58;
42 final int $SEMICOLON = 59; 42 const int $SEMICOLON = 59;
43 final int $LT = 60; 43 const int $LT = 60;
44 final int $EQ = 61; 44 const int $EQ = 61;
45 final int $GT = 62; 45 const int $GT = 62;
46 final int $QUESTION = 63; 46 const int $QUESTION = 63;
47 final int $AT = 64; 47 const int $AT = 64;
48 final int $A = 65; 48 const int $A = 65;
49 final int $B = 66; 49 const int $B = 66;
50 final int $C = 67; 50 const int $C = 67;
51 final int $D = 68; 51 const int $D = 68;
52 final int $E = 69; 52 const int $E = 69;
53 final int $F = 70; 53 const int $F = 70;
54 final int $G = 71; 54 const int $G = 71;
55 final int $H = 72; 55 const int $H = 72;
56 final int $I = 73; 56 const int $I = 73;
57 final int $J = 74; 57 const int $J = 74;
58 final int $K = 75; 58 const int $K = 75;
59 final int $L = 76; 59 const int $L = 76;
60 final int $M = 77; 60 const int $M = 77;
61 final int $N = 78; 61 const int $N = 78;
62 final int $O = 79; 62 const int $O = 79;
63 final int $P = 80; 63 const int $P = 80;
64 final int $Q = 81; 64 const int $Q = 81;
65 final int $R = 82; 65 const int $R = 82;
66 final int $S = 83; 66 const int $S = 83;
67 final int $T = 84; 67 const int $T = 84;
68 final int $U = 85; 68 const int $U = 85;
69 final int $V = 86; 69 const int $V = 86;
70 final int $W = 87; 70 const int $W = 87;
71 final int $X = 88; 71 const int $X = 88;
72 final int $Y = 89; 72 const int $Y = 89;
73 final int $Z = 90; 73 const int $Z = 90;
74 final int $OPEN_SQUARE_BRACKET = 91; 74 const int $OPEN_SQUARE_BRACKET = 91;
75 final int $BACKSLASH = 92; 75 const int $BACKSLASH = 92;
76 final int $CLOSE_SQUARE_BRACKET = 93; 76 const int $CLOSE_SQUARE_BRACKET = 93;
77 final int $CARET = 94; 77 const int $CARET = 94;
78 final int $_ = 95; 78 const int $_ = 95;
79 final int $BACKPING = 96; 79 const int $BACKPING = 96;
80 final int $a = 97; 80 const int $a = 97;
81 final int $b = 98; 81 const int $b = 98;
82 final int $c = 99; 82 const int $c = 99;
83 final int $d = 100; 83 const int $d = 100;
84 final int $e = 101; 84 const int $e = 101;
85 final int $f = 102; 85 const int $f = 102;
86 final int $g = 103; 86 const int $g = 103;
87 final int $h = 104; 87 const int $h = 104;
88 final int $i = 105; 88 const int $i = 105;
89 final int $j = 106; 89 const int $j = 106;
90 final int $k = 107; 90 const int $k = 107;
91 final int $l = 108; 91 const int $l = 108;
92 final int $m = 109; 92 const int $m = 109;
93 final int $n = 110; 93 const int $n = 110;
94 final int $o = 111; 94 const int $o = 111;
95 final int $p = 112; 95 const int $p = 112;
96 final int $q = 113; 96 const int $q = 113;
97 final int $r = 114; 97 const int $r = 114;
98 final int $s = 115; 98 const int $s = 115;
99 final int $t = 116; 99 const int $t = 116;
100 final int $u = 117; 100 const int $u = 117;
101 final int $v = 118; 101 const int $v = 118;
102 final int $w = 119; 102 const int $w = 119;
103 final int $x = 120; 103 const int $x = 120;
104 final int $y = 121; 104 const int $y = 121;
105 final int $z = 122; 105 const int $z = 122;
106 final int $OPEN_CURLY_BRACKET = 123; 106 const int $OPEN_CURLY_BRACKET = 123;
107 final int $BAR = 124; 107 const int $BAR = 124;
108 final int $CLOSE_CURLY_BRACKET = 125; 108 const int $CLOSE_CURLY_BRACKET = 125;
109 final int $TILDE = 126; 109 const int $TILDE = 126;
110 final int $DEL = 127; 110 const int $DEL = 127;
111 final int $NBSP = 160; 111 const int $NBSP = 160;
112 final int $LS = 0x2028; 112 const int $LS = 0x2028;
113 final int $PS = 0x2029; 113 const int $PS = 0x2029;
114 114
115 final int $FIRST_SURROGATE = 0xd800; 115 const int $FIRST_SURROGATE = 0xd800;
116 final int $LAST_SURROGATE = 0xdfff; 116 const int $LAST_SURROGATE = 0xdfff;
117 final int $LAST_CODE_POINT = 0x10ffff; 117 const int $LAST_CODE_POINT = 0x10ffff;
118 118
119 bool isHexDigit(int characterCode) { 119 bool isHexDigit(int characterCode) {
120 if (characterCode <= $9) return $0 <= characterCode; 120 if (characterCode <= $9) return $0 <= characterCode;
121 characterCode |= $a ^ $A; 121 characterCode |= $a ^ $A;
122 return ($a <= characterCode && characterCode <= $f); 122 return ($a <= characterCode && characterCode <= $f);
123 } 123 }
124 124
125 int hexDigitValue(int hexDigit) { 125 int hexDigitValue(int hexDigit) {
126 assert(isHexDigit(hexDigit)); 126 assert(isHexDigit(hexDigit));
127 // hexDigit is one of '0'..'9', 'A'..'F' and 'a'..'f'. 127 // hexDigit is one of '0'..'9', 'A'..'F' and 'a'..'f'.
128 if (hexDigit <= $9) return hexDigit - $0; 128 if (hexDigit <= $9) return hexDigit - $0;
129 return (hexDigit | ($a ^ $A)) - ($a - 10); 129 return (hexDigit | ($a ^ $A)) - ($a - 10);
130 } 130 }
131 131
132 bool isUnicodeScalarValue(int value) { 132 bool isUnicodeScalarValue(int value) {
133 return value < $FIRST_SURROGATE || 133 return value < $FIRST_SURROGATE ||
134 (value > $LAST_SURROGATE && value <= $LAST_CODE_POINT); 134 (value > $LAST_SURROGATE && value <= $LAST_CODE_POINT);
135 } 135 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/universe.dart ('k') | lib/compiler/implementation/warnings.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698