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

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

Issue 1030243002: [cleanup] remove PropertyName from js_ast (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 9 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/js/template.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 f38bbe9fef9882e89a5a7dd17422c55c6e8246a6..34aa41adcc849be68b02ef9c4510d2c0a6657339 100644
--- a/lib/src/js/printer.dart
+++ b/lib/src/js/printer.dart
@@ -1026,8 +1026,6 @@ class Printer implements NodeVisitor {
localNamer.leaveScope();
}
- visitPropertyName(PropertyName node) => propertyNameOut(node);
-
void propertyNameOut(Expression node, {bool inMethod: false,
bool inAccess: false}) {
@@ -1037,13 +1035,8 @@ class Printer implements NodeVisitor {
out(nameNumber.value);
if (inAccess) out(']');
} else {
- String quotedName;
- if (node is PropertyName) {
- quotedName = "'${node.name}'";
- } else if (node is LiteralString) {
- quotedName = node.value;
- }
- if (quotedName != null) {
+ if (node is LiteralString) {
+ var quotedName = node.value;
if (isValidJavaScriptId(quotedName)) {
if (inAccess) out('.');
out(quotedName.substring(1, quotedName.length - 1));
@@ -1100,9 +1093,6 @@ class Printer implements NodeVisitor {
visitInterpolatedSelector(InterpolatedSelector node) =>
visitInterpolatedNode(node);
- visitInterpolatedPropertyName(InterpolatedPropertyName node) =>
- visitInterpolatedNode(node);
-
visitInterpolatedMethod(InterpolatedMethod node) =>
visitInterpolatedNode(node);
« no previous file with comments | « lib/src/js/nodes.dart ('k') | lib/src/js/template.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698