Chromium Code Reviews| 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$]'); |
|
ahe
2012/11/12 13:35:03
I think this should be a static final field.
Anders Johnsen
2012/11/12 13:45:38
Done.
|
| 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; |
| } |