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

Unified Diff: lib/src/js/printer.dart

Issue 1133593004: fixes #131, use before define from variables to classes (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 7 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/js/nodes.dart ('k') | lib/src/utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/js/printer.dart
diff --git a/lib/src/js/printer.dart b/lib/src/js/printer.dart
index 41c66765722963092c9abbad3a08b873875c778c..f95a64d976700c0dd8e53d18230015aaf9fb1781 100644
--- a/lib/src/js/printer.dart
+++ b/lib/src/js/printer.dart
@@ -1048,13 +1048,12 @@ class Printer implements NodeVisitor {
if (inAccess) out(']');
} else {
if (node is LiteralString) {
- var quotedName = node.value;
- if (isValidJavaScriptId(quotedName)) {
+ if (isValidJavaScriptId(node.value)) {
if (inAccess) out('.');
- out(quotedName.substring(1, quotedName.length - 1));
+ out(node.valueWithoutQuotes);
} else {
if (inMethod || inAccess) out("[");
- out(quotedName);
+ out(node.value);
if (inMethod || inAccess) out("]");
}
} else {
« no previous file with comments | « lib/src/js/nodes.dart ('k') | lib/src/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698