diff --git a/libdparse b/libdparse index 4be8420..5323bfc 160000 --- a/libdparse +++ b/libdparse @@ -1 +1 @@ -Subproject commit 4be84200a7a786ca74726fa9f239f05b47549b1a +Subproject commit 5323bfc2c5f8303dee8ed3d66eeaa3c0944485f0 diff --git a/src/astprinter.d b/src/astprinter.d index 47da69b..e3738dc 100644 --- a/src/astprinter.d +++ b/src/astprinter.d @@ -134,7 +134,6 @@ class XMLPrinter : ASTVisitor override void visit(const Attribute attribute) { - if (attribute.attribute == tok!"") { output.writeln(""); @@ -592,7 +591,23 @@ class XMLPrinter : ASTVisitor override void visit(const LinkageAttribute linkageAttribute) { if (linkageAttribute.hasPlusPlus) - output.writeln(""); + { + output.write(" 0) + { + output.write(" namespace=\""); + format(output.lockingTextWriter, linkageAttribute.identifierChain); + output.writeln("\"/>"); + } + else if (linkageAttribute.classOrStruct == tok!"class") + output.writeln(" mangleAs=\"class\"/>"); + else if (linkageAttribute.classOrStruct == tok!"struct") + output.writeln(" mangleAs=\"struct\"/>"); + else + output.writeln("/>"); + } + else if (linkageAttribute.identifier.text == "Objective") + output.writeln(""); else output.writeln("");