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

Unified Diff: sdk/lib/_internal/compiler/implementation/js/printer.dart

Issue 11365196: Move JSSyntaxRegExp to core as a private member. This removes the last refrences to dart:coreimpl. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Change arrow-syntax factory into brace-syntax, due to multiline content. Created 8 years, 1 month 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: sdk/lib/_internal/compiler/implementation/js/printer.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js/printer.dart b/sdk/lib/_internal/compiler/implementation/js/printer.dart
index 5bdbfd98b0c2ca90f35c197b7fbd5bee717579f5..21b9e779b40d2dd407e6df6af6a70a2b67cb3f9a 100644
--- a/sdk/lib/_internal/compiler/implementation/js/printer.dart
+++ b/sdk/lib/_internal/compiler/implementation/js/printer.dart
@@ -46,7 +46,7 @@ class Printer implements NodeVisitor {
void out(String str) {
if (str != "") {
- const identifierRegexp = const RegExp(r'^[a-zA-Z_0-9$]');
+ final identifierRegexp = new RegExp(r'^[a-zA-Z_0-9$]');
if (pendingSemicolon && (!shouldCompressOutput || str != "}")) {
outBuffer.add(";");
}
@@ -1067,7 +1067,7 @@ class MinifyRenamer implements Namer {
codes.add(charCodes.$0 + digit);
newName = new String.fromCharCodes(codes);
}
- assert(const RegExp(r'[a-zA-Z][a-zA-Z0-9]*').hasMatch(newName));
+ assert(new RegExp(r'[a-zA-Z][a-zA-Z0-9]*').hasMatch(newName));
maps.last[oldName] = newName;
return newName;
}

Powered by Google App Engine
This is Rietveld 408576698