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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/tree/unparser.dart

Issue 11788016: Update dart2js unit tests to new library API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: No need to implement Iterable Created 7 years, 11 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
Index: dart/sdk/lib/_internal/compiler/implementation/tree/unparser.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/tree/unparser.dart b/dart/sdk/lib/_internal/compiler/implementation/tree/unparser.dart
index 3b60b533d64181cf953ab12c5bdc0cd8a4ec425a..69c537530a28c17a1d8aa2e97dbde947165d550a 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/tree/unparser.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/tree/unparser.dart
@@ -138,8 +138,7 @@ class Unparser implements Visitor {
}
visitFunctionExpression(FunctionExpression node) {
- // Check length to not print unnecessary whitespace.
- if (node.modifiers.nodes.length > 0) {
+ if (!node.modifiers.nodes.isEmpty) {
visit(node.modifiers);
sb.add(' ');
}
@@ -334,7 +333,7 @@ class Unparser implements Visitor {
visitVariableDefinitions(VariableDefinitions node) {
visit(node.modifiers);
- if (node.modifiers.nodes.length > 0) {
+ if (!node.modifiers.nodes.isEmpty) {
sb.add(' ');
}
if (node.type != null) {

Powered by Google App Engine
This is Rietveld 408576698