Chromium Code Reviews| Index: dart/lib/compiler/implementation/tree/unparser.dart |
| diff --git a/dart/lib/compiler/implementation/tree/unparser.dart b/dart/lib/compiler/implementation/tree/unparser.dart |
| index 8eda6371f0e8af805c210d71917a21d30d29440d..da5868d13441f417b43deb7c4c1354504f49bf01 100644 |
| --- a/dart/lib/compiler/implementation/tree/unparser.dart |
| +++ b/dart/lib/compiler/implementation/tree/unparser.dart |
| @@ -271,9 +271,11 @@ class Unparser implements Visitor { |
| if (spacesNeeded) sb.add(' '); |
| // Also add a space for sequences like x + +1 and y - -y. |
| if (opString === '-' || opString === '+') { |
| - Token beginToken = node.argumentsNode.getBeginToken(); |
| - if (beginToken !== null && beginToken.stringValue === opString) { |
| - sb.add(' '); |
| + if (node.argumentsNode != null) { |
|
karlklose
2012/10/15 07:59:26
You could add this condition to the if above.
Lasse Reichstein Nielsen
2012/10/15 08:34:37
And eventually remove the '+' case when we drop su
|
| + Token beginToken = node.argumentsNode.getBeginToken(); |
| + if (beginToken !== null && beginToken.stringValue === opString) { |
| + sb.add(' '); |
| + } |
| } |
| } |
| visit(node.argumentsNode); |