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

Unified Diff: lib/src/utils.dart

Issue 1111893002: small refactor: use JS.* prefix for our other JS extensions (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 8 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 | « lib/src/codegen/js_printer.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « lib/src/codegen/js_printer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698