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

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

Issue 10834330: Clean-up of getCompilationUnit. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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/compiler/implementation/js/nodes.dart ('k') | lib/compiler/implementation/js_backend/emitter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/js/printer.dart
diff --git a/lib/compiler/implementation/js/printer.dart b/lib/compiler/implementation/js/printer.dart
index b523ad823a8235f2086d715397328b40b937f36d..08cd7e993eb9b7b251b392011ae5e651853ee499 100644
--- a/lib/compiler/implementation/js/printer.dart
+++ b/lib/compiler/implementation/js/printer.dart
@@ -637,7 +637,8 @@ class Printer implements NodeVisitor {
newAtStatementBegin: atStatementBegin);
Node selector = access.selector;
if (selector is LiteralString) {
- String fieldWithQuotes = (selector as LiteralString).value;
+ LiteralString selectorString = selector;
+ String fieldWithQuotes = selectorString.value;
if (isValidJavaScriptId(fieldWithQuotes)) {
if (isDigit(lastCharCode)) out(" ");
out(".");
@@ -721,7 +722,8 @@ class Printer implements NodeVisitor {
visitProperty(Property node) {
if (node.name is LiteralString) {
- String name = (node.name as LiteralString).value;
+ LiteralString nameString = node.name;
+ String name = nameString.value;
if (isValidJavaScriptId(name)) {
out(name.substring(1, name.length - 1));
} else {
@@ -729,7 +731,8 @@ class Printer implements NodeVisitor {
}
} else {
assert(node.name is LiteralNumber);
- out((node.name as LiteralNumber).value);
+ LiteralNumber nameNumber = node.name;
+ out(nameNumber.value);
}
out(":");
spaceOut();
« no previous file with comments | « lib/compiler/implementation/js/nodes.dart ('k') | lib/compiler/implementation/js_backend/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698