Chromium Code Reviews| Index: lib/compiler/implementation/tree/unparser.dart |
| diff --git a/lib/compiler/implementation/tree/unparser.dart b/lib/compiler/implementation/tree/unparser.dart |
| index 05b24260254451bb67f314f740ba13b5e4956b95..dc922882d01240cd834b166bfdad765f3255d26a 100644 |
| --- a/lib/compiler/implementation/tree/unparser.dart |
| +++ b/lib/compiler/implementation/tree/unparser.dart |
| @@ -181,16 +181,28 @@ class Unparser implements Visitor { |
| unparseSendPart(Send node) { |
| + Operator op = node.selector.asOperator(); |
| + bool isCheck = op !== null && op.source.stringValue == 'is'; |
| + // is check requires trailing space if it's not is! form. |
|
ahe
2012/05/29 13:40:07
Not a proper sentence. First word should be capita
Anton Muhin
2012/05/31 14:44:44
Now obsolete.
|
| + bool requiresSpace = isCheck && node.arguments.head is! Send; |
|
ahe
2012/05/29 13:40:07
The style we use is this:
node.arguments.head is
Bob Nystrom
2012/05/30 21:46:51
This was a surprise to me. In SEA I think we all u
Anton Muhin
2012/05/31 14:44:44
That was a surprise for me as well.
On 2012/05/30
|
| + |
| if (node.isPrefix) { |
| visit(node.selector); |
| } |
| if (node.receiver !== null) { |
| visit(node.receiver); |
| - if (node.selector is !Operator) sb.add('.'); |
| + if (op === null) { |
| + sb.add('.'); |
| + } else if (isCheck) { |
| + sb.add(' '); |
| + } |
| } |
| if (!node.isPrefix) { |
| visit(node.selector); |
| } |
| + if (requiresSpace) { |
|
ahe
2012/05/29 13:40:07
This expression:
1 is !Object
Is printed as:
1
Anton Muhin
2012/05/31 14:44:44
Yes, that was planned as I thought that preferred
|
| + sb.add(' '); |
| + } |
| } |
| visitSend(Send node) { |