From b5e9281f1b60e6b57c33b4e95193e006a06a0583 Mon Sep 17 00:00:00 2001 From: Hackerpilot <briancschott@gmail.com> Date: Thu, 17 Mar 2016 03:09:45 -0700 Subject: [PATCH] #313 --- libdparse | 2 +- src/astprinter.d | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/libdparse b/libdparse index a10f598..04d176b 160000 --- a/libdparse +++ b/libdparse @@ -1 +1 @@ -Subproject commit a10f5988b2b130ad2cae28c90a668067f98c82a7 +Subproject commit 04d176b699ffbcf755eff7276ddf989e6c35aaac diff --git a/src/astprinter.d b/src/astprinter.d index 96e422d..47da69b 100644 --- a/src/astprinter.d +++ b/src/astprinter.d @@ -126,10 +126,9 @@ class XMLPrinter : ASTVisitor override void visit(const AtAttribute atAttribute) { output.writeln("<atAttribute>"); - if (atAttribute.identifier.type == tok!"") - atAttribute.accept(this); - else + if (atAttribute.identifier.type != tok!"") output.writeln("<identifier>", atAttribute.identifier.text, "</identifier>"); + atAttribute.accept(this); output.writeln("</atAttribute>"); } @@ -286,11 +285,10 @@ class XMLPrinter : ASTVisitor override void visit(const Deprecated deprecated_) { - if (deprecated_.stringLiterals.length > 0) + if (deprecated_.assignExpression !is null) { output.writeln("<deprecated>"); - foreach (literal; deprecated_.stringLiterals) - output.writeln("<stringLiteral>", xmlEscape(literal.text), "</stringLiteral>"); + visit(deprecated_.assignExpression); output.writeln("</deprecated>"); } else