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

Unified 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, 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 side-by-side diff with in-line comments
Download patch
Index: third_party/pkg/angular/lib/core/parser/characters.dart
diff --git a/third_party/pkg/angular/lib/core/parser/characters.dart b/third_party/pkg/angular/lib/core/parser/characters.dart
index 7213d278f50eb47d6ceed47096db01151f895ade..2cc5c0217f9457bcbb7ff3e2b4bee8b4858ac623 100644
--- a/third_party/pkg/angular/lib/core/parser/characters.dart
+++ b/third_party/pkg/angular/lib/core/parser/characters.dart
@@ -98,12 +98,7 @@ const int $TILDE = 126;
const int $NBSP = 160;
bool isWhitespace(int code) {
- return (code == $SPACE)
- || (code == $CR)
- || (code == $LF)
- || (code == $NBSP)
- || (code == $TAB)
- || (code == $VTAB);
+ return (code >= $TAB && code <= $SPACE) || (code == $NBSP);
}
bool isIdentifierStart(int code) {
@@ -134,12 +129,12 @@ bool isExponentSign(int code) {
}
int unescape(int code) {
- Map<int, int> escapes = const {
- $n: $LF,
- $f: $FF,
- $r: $CR,
- $t: $TAB,
- $v: $VTAB };
- int mapped = escapes[code];
- return (mapped == null) ? code : mapped;
+ switch(code) {
+ case $n: return $LF;
+ case $f: return $FF;
+ case $r: return $CR;
+ case $t: return $TAB;
+ case $v: return $VTAB;
+ default: return code;
+ }
}
« 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