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

Unified Diff: pkg/compiler/lib/src/js/characters.dart

Issue 917033002: Redo "Steps towards making dart2js JS AST templates an indepentent library." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/js/builder.dart ('k') | pkg/compiler/lib/src/js/js.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js/characters.dart
diff --git a/pkg/compiler/lib/src/util/characters.dart b/pkg/compiler/lib/src/js/characters.dart
similarity index 76%
copy from pkg/compiler/lib/src/util/characters.dart
copy to pkg/compiler/lib/src/js/characters.dart
index 5961d0764a0d78de9abba943782c89a4e971725a..ae6740ff3c1fb4735f8bb7aa9757cb6401002f8c 100644
--- a/pkg/compiler/lib/src/util/characters.dart
+++ b/pkg/compiler/lib/src/js/characters.dart
@@ -1,8 +1,8 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-library characters;
+library js_character_codes;
const int $EOF = 0;
const int $STX = 2;
@@ -115,29 +115,3 @@ const int $PS = 0x2029;
const int $FIRST_SURROGATE = 0xd800;
const int $LAST_SURROGATE = 0xdfff;
const int $LAST_CODE_POINT = 0x10ffff;
-
-bool isHexDigit(int characterCode) {
- if (characterCode <= $9) return $0 <= characterCode;
- characterCode |= $a ^ $A;
- return ($a <= characterCode && characterCode <= $f);
-}
-
-int hexDigitValue(int hexDigit) {
- assert(isHexDigit(hexDigit));
- // hexDigit is one of '0'..'9', 'A'..'F' and 'a'..'f'.
- if (hexDigit <= $9) return hexDigit - $0;
- return (hexDigit | ($a ^ $A)) - ($a - 10);
-}
-
-bool isUnicodeScalarValue(int value) {
- return value < $FIRST_SURROGATE ||
- (value > $LAST_SURROGATE && value <= $LAST_CODE_POINT);
-}
-
-bool isUtf16LeadSurrogate(int value) {
- return value >= 0xd800 && value <= 0xdbff;
-}
-
-bool isUtf16TrailSurrogate(int value) {
- return value >= 0xdc00 && value <= 0xdfff;
-}
« no previous file with comments | « pkg/compiler/lib/src/js/builder.dart ('k') | pkg/compiler/lib/src/js/js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698