Mercurial > projects > dil
diff trunk/src/cmd/DDoc.d @ 766:0af3b145a405
Revised TemplateParameterList parsing functions.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Sat, 16 Feb 2008 21:14:40 +0100 |
parents | bc812843603c |
children | 26d8ed59806d |
line wrap: on
line diff
--- a/trunk/src/cmd/DDoc.d Sat Feb 16 20:18:42 2008 +0100 +++ b/trunk/src/cmd/DDoc.d Sat Feb 16 21:14:40 2008 +0100 @@ -160,7 +160,6 @@ return Token.textSpan(left, right); } - bool isTemplatized; /// True if an aggregate declaration is templatized. TemplateParameters tparams; /// The template parameters of the declaration. DDocComment cmnt; /// Current comment. @@ -416,10 +415,9 @@ void writeTemplateParams() { - if (!isTemplatized) + if (!tparams) return; - write("(", (tparams ? escape(textSpan(tparams.begin, tparams.end)) : ""), ")"); - isTemplatized = false; + write(escape(textSpan(tparams.begin, tparams.end))); tparams = null; } @@ -581,12 +579,10 @@ D visit(TemplateDeclaration d) { - this.isTemplatized = true; this.tparams = d.tparams; if (d.begin.kind != TOK.Template) { // This is a templatized class/interface/struct/union/function. super.visit(d.decls); - this.isTemplatized = false; this.tparams = null; return d; }