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..e6136f2cade277e7ac5247227fb4a1bc24c5978f 100644 |
| --- a/lib/compiler/implementation/tree/unparser.dart |
| +++ b/lib/compiler/implementation/tree/unparser.dart |
| @@ -194,6 +194,23 @@ class Unparser implements Visitor { |
| } |
| visitSend(Send node) { |
| + // Special case. Simple expr is T is represented as Send(expr, 'is', T), |
|
Anton Muhin
2012/05/23 19:41:11
this is rather ugly.
I try to emit expr is! Type
ahe
2012/05/24 09:30:52
This is the result of an allergic reaction to http
ahe
2012/05/24 09:30:52
Extra space after period.
ahe
2012/05/24 09:30:52
I suggest that you put code snippets in [:...:], f
Anton Muhin
2012/05/24 14:15:12
I see, still prefixing a type with negation looks
Anton Muhin
2012/05/24 14:15:12
Now obsolete. So you don't use two spaces after p
Anton Muhin
2012/05/24 14:15:12
Now obsolete, but will do next time.
On 2012/05/2
|
| + // while expr is! T is represented as Send(expr, 'is', Send.prefix('!', T)). |
| + if (node.isOperator && node.selector.token.value.stringValue == 'is') { |
| + visit(node.receiver); |
| + sb.add(' is'); |
| + bool notForm = node.arguments.head is Send; |
| + if (notForm) sb.add('!'); |
| + sb.add(' '); |
| + if (notForm) { |
| + visit(node.arguments.head.receiver); |
| + } else { |
| + visit(node.argumentsNode); |
| + } |
| + |
| + return; |
| + } |
| + |
| unparseSendPart(node); |
| visit(node.argumentsNode); |
| } |