Alias declarations now have ddoc parsed

This commit is contained in:
Hackerpilot 2014-03-03 23:48:41 -08:00
parent 8070c39551
commit fdce684849
2 changed files with 6 additions and 1 deletions

View File

@ -36,7 +36,10 @@ class XMLPrinter : ASTVisitor
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)

View File

@ -188,6 +188,8 @@ class Parser
mixin(traceEnterAndExit!(__FUNCTION__));
auto node = allocate!AliasDeclaration;
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 f = extern(C) void function();' => not supported in both DMD and DScanner. See D Bugzilla 10471.