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

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

Issue 148453003: Updating Angular version (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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
1 library angular.core.parser.characters; 1 library angular.core.parser.characters;
2 2
3 const int $EOF = 0; 3 const int $EOF = 0;
4 const int $TAB = 9; 4 const int $TAB = 9;
5 const int $LF = 10; 5 const int $LF = 10;
6 const int $VTAB = 11; 6 const int $VTAB = 11;
7 const int $FF = 12; 7 const int $FF = 12;
8 const int $CR = 13; 8 const int $CR = 13;
9 const int $SPACE = 32; 9 const int $SPACE = 32;
10 const int $BANG = 33; 10 const int $BANG = 33;
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 const int $y = 121; 91 const int $y = 121;
92 const int $z = 122; 92 const int $z = 122;
93 93
94 const int $LBRACE = 123; 94 const int $LBRACE = 123;
95 const int $BAR = 124; 95 const int $BAR = 124;
96 const int $RBRACE = 125; 96 const int $RBRACE = 125;
97 const int $TILDE = 126; 97 const int $TILDE = 126;
98 const int $NBSP = 160; 98 const int $NBSP = 160;
99 99
100 bool isWhitespace(int code) { 100 bool isWhitespace(int code) {
101 return (code == $SPACE) 101 return (code >= $TAB && code <= $SPACE) || (code == $NBSP);
102 || (code == $CR)
103 || (code == $LF)
104 || (code == $NBSP)
105 || (code == $TAB)
106 || (code == $VTAB);
107 } 102 }
108 103
109 bool isIdentifierStart(int code) { 104 bool isIdentifierStart(int code) {
110 return ($a <= code && code <= $z) 105 return ($a <= code && code <= $z)
111 || ($A <= code && code <= $Z) 106 || ($A <= code && code <= $Z)
112 || (code == $_) 107 || (code == $_)
113 || (code == $$); 108 || (code == $$);
114 } 109 }
115 110
116 bool isIdentifierPart(int code) { 111 bool isIdentifierPart(int code) {
(...skipping 10 matching lines...) Expand all
127 122
128 bool isExponentStart(int code) { 123 bool isExponentStart(int code) {
129 return (code == $e || code == $E); 124 return (code == $e || code == $E);
130 } 125 }
131 126
132 bool isExponentSign(int code) { 127 bool isExponentSign(int code) {
133 return (code == $MINUS || code == $PLUS); 128 return (code == $MINUS || code == $PLUS);
134 } 129 }
135 130
136 int unescape(int code) { 131 int unescape(int code) {
137 Map<int, int> escapes = const { 132 switch(code) {
138 $n: $LF, 133 case $n: return $LF;
139 $f: $FF, 134 case $f: return $FF;
140 $r: $CR, 135 case $r: return $CR;
141 $t: $TAB, 136 case $t: return $TAB;
142 $v: $VTAB }; 137 case $v: return $VTAB;
143 int mapped = escapes[code]; 138 default: return code;
144 return (mapped == null) ? code : mapped; 139 }
145 } 140 }
OLDNEW
« no previous file with comments | « third_party/pkg/angular/lib/core/parser/backend.dart ('k') | third_party/pkg/angular/lib/core/parser/dynamic_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698