Index: lib/src/utils.dart |
diff --git a/lib/src/utils.dart b/lib/src/utils.dart |
index a3ea4fd10473e7e0ae5de4487e950caa7ca86071..1837b684905de08f9bc3d8d553f417043b11477d 100644 |
--- a/lib/src/utils.dart |
+++ b/lib/src/utils.dart |
@@ -31,7 +31,7 @@ import 'package:crypto/crypto.dart' show CryptoUtils, MD5; |
import 'package:source_span/source_span.dart'; |
import 'package:yaml/yaml.dart'; |
-import 'codegen/js_names.dart' show invalidJSVariableName; |
+import 'codegen/js_names.dart' show invalidVariableName; |
bool isDartPrivateLibrary(LibraryElement library) { |
var uri = library.source.uri; |
@@ -69,7 +69,7 @@ String _toIdentifier(String name) { |
var result = buffer != null ? '$buffer' : name; |
// Ensure the identifier first character is not numeric and that the whole |
// identifier is not a keyword. |
- if (result.startsWith(new RegExp('[0-9]')) || invalidJSVariableName(result)) { |
+ if (result.startsWith(new RegExp('[0-9]')) || invalidVariableName(result)) { |
return '\$$result'; |
} |
return result; |