From ec14694db19cb5f8e143ac58474bd9b0ad9931d2 Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Fri, 25 Sep 2015 14:40:53 -0700 Subject: [PATCH] Fix duplicated output for unary expressions --- src/astprinter.d | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/astprinter.d b/src/astprinter.d index c6d53ee..5fa93f0 100644 --- a/src/astprinter.d +++ b/src/astprinter.d @@ -911,15 +911,18 @@ class XMLPrinter : ASTVisitor ""); unaryExpression.unaryExpression.accept(this); } - if (unaryExpression.suffix != tok!"") - { - assert(unaryExpression.suffix.text == ""); - unaryExpression.unaryExpression.accept(this); - output.writeln("", str(unaryExpression.suffix.type), - ""); - } else - unaryExpression.accept(this); + { + if (unaryExpression.suffix != tok!"") + { + assert(unaryExpression.suffix.text == ""); + unaryExpression.unaryExpression.accept(this); + output.writeln("", str(unaryExpression.suffix.type), + ""); + } + else + unaryExpression.accept(this); + } output.writeln(""); }