Update C++ linkage attribute handling
This commit is contained in:
parent
e4426081dd
commit
18bfad3619
|
@ -1 +1 @@
|
|||
Subproject commit 4be84200a7a786ca74726fa9f239f05b47549b1a
|
||||
Subproject commit 5323bfc2c5f8303dee8ed3d66eeaa3c0944485f0
|
|
@ -134,7 +134,6 @@ class XMLPrinter : ASTVisitor
|
|||
|
||||
override void visit(const Attribute attribute)
|
||||
{
|
||||
|
||||
if (attribute.attribute == tok!"")
|
||||
{
|
||||
output.writeln("<attribute>");
|
||||
|
@ -592,7 +591,23 @@ class XMLPrinter : ASTVisitor
|
|||
override void visit(const LinkageAttribute linkageAttribute)
|
||||
{
|
||||
if (linkageAttribute.hasPlusPlus)
|
||||
output.writeln("<linkageAttribute linkage=\"c++\"/>");
|
||||
{
|
||||
output.write("<linkageAttribute linkage=\"C++\"");
|
||||
if (linkageAttribute.identifierChain !is null && linkageAttribute.identifierChain.identifiers.length > 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("<linkageAttribute linkage=\"Objective-C\"/>");
|
||||
else
|
||||
output.writeln("<linkageAttribute linkage=\"",
|
||||
linkageAttribute.identifier.text, "\"/>");
|
||||
|
|
Loading…
Reference in New Issue