Index: pkg/compiler/lib/src/tree/unparser.dart |
diff --git a/pkg/compiler/lib/src/tree/unparser.dart b/pkg/compiler/lib/src/tree/unparser.dart |
index b9e67841c37fed686ad741b209c8aa98dcdd69bd..65689160f7ed716e3d160b8c230a014fa144c626 100644 |
--- a/pkg/compiler/lib/src/tree/unparser.dart |
+++ b/pkg/compiler/lib/src/tree/unparser.dart |
@@ -3,7 +3,8 @@ |
// BSD-style license that can be found in the LICENSE file. |
import '../tokens/token.dart' show BeginGroupToken, Token; |
-import '../tokens/token_constants.dart' as Tokens show IDENTIFIER_TOKEN, KEYWORD_TOKEN, PLUS_TOKEN; |
+import '../tokens/token_constants.dart' as Tokens |
+ show IDENTIFIER_TOKEN, KEYWORD_TOKEN, PLUS_TOKEN; |
import '../util/util.dart'; |
import 'nodes.dart'; |
@@ -37,8 +38,8 @@ class Unparser extends Indentation implements Visitor { |
void addToken(Token token) { |
if (token == null) return; |
write(token.value); |
- if (identical(token.kind, Tokens.KEYWORD_TOKEN) |
- || identical(token.kind, Tokens.IDENTIFIER_TOKEN)) { |
+ if (identical(token.kind, Tokens.KEYWORD_TOKEN) || |
+ identical(token.kind, Tokens.IDENTIFIER_TOKEN)) { |
write(' '); |
} |
} |
@@ -55,7 +56,9 @@ class Unparser extends Indentation implements Visitor { |
onEmptyLine = false; |
} |
- unparse(Node node) { visit(node); } |
+ unparse(Node node) { |
+ visit(node); |
+ } |
visit(Node node) { |
if (node != null) node.accept(this); |
@@ -95,7 +98,6 @@ class Unparser extends Indentation implements Visitor { |
} |
} |
- |
visitCascade(Cascade node) { |
visit(node.expression); |
} |
@@ -216,7 +218,7 @@ class Unparser extends Indentation implements Visitor { |
// arguments. |
if (name is Send) { |
Send send = name; |
- assert(send is !SendSet); |
+ assert(send is! SendSet); |
if (!send.isOperator) { |
// Looks like a factory method. |
visit(send.receiver); |
@@ -295,7 +297,7 @@ class Unparser extends Indentation implements Visitor { |
space(); |
write(node.elseToken.value); |
space(); |
- if (node.elsePart is !Block && minify) write(' '); |
+ if (node.elsePart is! Block && minify) write(' '); |
visit(node.elsePart); |
} |
} |
@@ -426,7 +428,6 @@ class Unparser extends Indentation implements Visitor { |
write(node.endToken.value); |
} |
- |
unparseSendReceiver(Send node, {bool spacesNeeded: false}) { |
if (node.receiver == null) return; |
visit(node.receiver); |
@@ -448,7 +449,7 @@ class Unparser extends Indentation implements Visitor { |
unparseSendArgument(Send node, {bool spacesNeeded: false}) { |
if (node.argumentsNode == null) return; |
- if(node.isIsNotCheck) { |
+ if (node.isIsNotCheck) { |
Send argNode = node.arguments.head; |
visit(argNode.selector); |
space(); |
@@ -469,7 +470,9 @@ class Unparser extends Indentation implements Visitor { |
void minusMinusSpace(Node other) { |
if (other != null && opString == '-') { |
Token beginToken = other.getBeginToken(); |
- if (beginToken != null && beginToken.stringValue != null && beginToken.stringValue.startsWith('-')) { |
+ if (beginToken != null && |
+ beginToken.stringValue != null && |
+ beginToken.stringValue.startsWith('-')) { |
sb.write(' '); |
spacesNeeded = false; |
} |
@@ -576,7 +579,7 @@ class Unparser extends Indentation implements Visitor { |
visitDoWhile(DoWhile node) { |
write(node.doKeyword.value); |
- if (node.body is !Block) { |
+ if (node.body is! Block) { |
write(' '); |
} else { |
space(); |
@@ -651,7 +654,6 @@ class Unparser extends Indentation implements Visitor { |
visit(node.body); |
} |
- |
visitSyncForIn(SyncForIn node) { |
write(node.forToken.value); |
space(); |
@@ -668,7 +670,7 @@ class Unparser extends Indentation implements Visitor { |
visitLabel(Label node) { |
visit(node.identifier); |
write(node.colonToken.value); |
- } |
+ } |
visitLabeledStatement(LabeledStatement node) { |
visit(node.labels); |
@@ -718,9 +720,10 @@ class Unparser extends Indentation implements Visitor { |
newline(); |
} |
- unparseImportTag(String uri, {String prefix, |
- List<String> shows: const <String>[], |
- bool isDeferred: false}) { |
+ unparseImportTag(String uri, |
+ {String prefix, |
+ List<String> shows: const <String>[], |
+ bool isDeferred: false}) { |
String deferredString = isDeferred ? ' deferred' : ''; |
String prefixString = prefix == null ? '' : ' as $prefix'; |
String showString = shows.isEmpty ? '' : ' show ${shows.join(", ")}'; |