Alias declarations now have ddoc parsed
This commit is contained in:
parent
8070c39551
commit
fdce684849
|
@ -36,7 +36,10 @@ class XMLPrinter : ASTVisitor
|
||||||
|
|
||||||
override void visit(const AliasDeclaration aliasDeclaration)
|
override void visit(const AliasDeclaration aliasDeclaration)
|
||||||
{
|
{
|
||||||
mixin (tagAndAccept!"aliasDeclaration");
|
output.writeln("<aliasDeclaration line=\"", aliasDeclaration.name.line, "\">");
|
||||||
|
writeDdoc(aliasDeclaration.comment);
|
||||||
|
aliasDeclaration.accept(this);
|
||||||
|
output.writeln("</aliasDeclaration>");
|
||||||
}
|
}
|
||||||
|
|
||||||
override void visit(const AliasInitializer aliasInitializer)
|
override void visit(const AliasInitializer aliasInitializer)
|
||||||
|
|
|
@ -188,6 +188,8 @@ class Parser
|
||||||
mixin(traceEnterAndExit!(__FUNCTION__));
|
mixin(traceEnterAndExit!(__FUNCTION__));
|
||||||
auto node = allocate!AliasDeclaration;
|
auto node = allocate!AliasDeclaration;
|
||||||
if (expect(tok!"alias") is null) return null;
|
if (expect(tok!"alias") is null) return null;
|
||||||
|
node.comment = comment;
|
||||||
|
comment = null;
|
||||||
|
|
||||||
// 'alias extern(C) void function() f;' => supported in DMD and DScanner.
|
// 'alias extern(C) void function() f;' => supported in DMD and DScanner.
|
||||||
// 'alias f = extern(C) void function();' => not supported in both DMD and DScanner. See D Bugzilla 10471.
|
// 'alias f = extern(C) void function();' => not supported in both DMD and DScanner. See D Bugzilla 10471.
|
||||||
|
|
Loading…
Reference in New Issue