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

Side by Side Diff: third_party/pkg/angular/lib/core/parser/characters.dart

Issue 124053002: Adding Angular and dependent packages for testing (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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
OLDNEW
(Empty)
1 library angular.core.parser.characters;
2
3 const int $EOF = 0;
4 const int $TAB = 9;
5 const int $LF = 10;
6 const int $VTAB = 11;
7 const int $FF = 12;
8 const int $CR = 13;
9 const int $SPACE = 32;
10 const int $BANG = 33;
11 const int $DQ = 34;
12 const int $$ = 36;
13 const int $PERCENT = 37;
14 const int $AMPERSAND = 38;
15 const int $SQ = 39;
16 const int $LPAREN = 40;
17 const int $RPAREN = 41;
18 const int $STAR = 42;
19 const int $PLUS = 43;
20 const int $COMMA = 44;
21 const int $MINUS = 45;
22 const int $PERIOD = 46;
23 const int $SLASH = 47;
24 const int $COLON = 58;
25 const int $SEMICOLON = 59;
26 const int $LT = 60;
27 const int $EQ = 61;
28 const int $GT = 62;
29 const int $QUESTION = 63;
30
31 const int $0 = 48;
32 const int $9 = 57;
33
34 const int $A = 65;
35 const int $B = 66;
36 const int $C = 67;
37 const int $D = 68;
38 const int $E = 69;
39 const int $F = 70;
40 const int $G = 71;
41 const int $H = 72;
42 const int $I = 73;
43 const int $J = 74;
44 const int $K = 75;
45 const int $L = 76;
46 const int $M = 77;
47 const int $N = 78;
48 const int $O = 79;
49 const int $P = 80;
50 const int $Q = 81;
51 const int $R = 82;
52 const int $S = 83;
53 const int $T = 84;
54 const int $U = 85;
55 const int $V = 86;
56 const int $W = 87;
57 const int $X = 88;
58 const int $Y = 89;
59 const int $Z = 90;
60
61 const int $LBRACKET = 91;
62 const int $BACKSLASH = 92;
63 const int $RBRACKET = 93;
64 const int $CARET = 94;
65 const int $_ = 95;
66
67 const int $a = 97;
68 const int $b = 98;
69 const int $c = 99;
70 const int $d = 100;
71 const int $e = 101;
72 const int $f = 102;
73 const int $g = 103;
74 const int $h = 104;
75 const int $i = 105;
76 const int $j = 106;
77 const int $k = 107;
78 const int $l = 108;
79 const int $m = 109;
80 const int $n = 110;
81 const int $o = 111;
82 const int $p = 112;
83 const int $q = 113;
84 const int $r = 114;
85 const int $s = 115;
86 const int $t = 116;
87 const int $u = 117;
88 const int $v = 118;
89 const int $w = 119;
90 const int $x = 120;
91 const int $y = 121;
92 const int $z = 122;
93
94 const int $LBRACE = 123;
95 const int $BAR = 124;
96 const int $RBRACE = 125;
97 const int $TILDE = 126;
98 const int $NBSP = 160;
99
100 bool isWhitespace(int code) {
101 return (code == $SPACE)
102 || (code == $CR)
103 || (code == $LF)
104 || (code == $NBSP)
105 || (code == $TAB)
106 || (code == $VTAB);
107 }
108
109 bool isIdentifierStart(int code) {
110 return ($a <= code && code <= $z)
111 || ($A <= code && code <= $Z)
112 || (code == $_)
113 || (code == $$);
114 }
115
116 bool isIdentifierPart(int code) {
117 return ($a <= code && code <= $z)
118 || ($A <= code && code <= $Z)
119 || ($0 <= code && code <= $9)
120 || (code == $_)
121 || (code == $$);
122 }
123
124 bool isDigit(int code) {
125 return ($0 <= code && code <= $9);
126 }
127
128 bool isExponentStart(int code) {
129 return (code == $e || code == $E);
130 }
131
132 bool isExponentSign(int code) {
133 return (code == $MINUS || code == $PLUS);
134 }
135
136 int unescape(int code) {
137 Map<int, int> escapes = const {
138 $n: $LF,
139 $f: $FF,
140 $r: $CR,
141 $t: $TAB,
142 $v: $VTAB };
143 int mapped = escapes[code];
144 return (mapped == null) ? code : mapped;
145 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698