From fdce684849a0d2fc67203220e33367b4d3692f15 Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Mon, 3 Mar 2014 23:48:41 -0800 Subject: [PATCH] Alias declarations now have ddoc parsed --- astprinter.d | 5 ++++- stdx/d/parser.d | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/astprinter.d b/astprinter.d index b86b341..011e66d 100644 --- a/astprinter.d +++ b/astprinter.d @@ -36,7 +36,10 @@ class XMLPrinter : ASTVisitor override void visit(const AliasDeclaration aliasDeclaration) { - mixin (tagAndAccept!"aliasDeclaration"); + output.writeln(""); + writeDdoc(aliasDeclaration.comment); + aliasDeclaration.accept(this); + output.writeln(""); } override void visit(const AliasInitializer aliasInitializer) diff --git a/stdx/d/parser.d b/stdx/d/parser.d index 07f52b0..19271b8 100644 --- a/stdx/d/parser.d +++ b/stdx/d/parser.d @@ -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.