Mercurial > projects > ddmd
changeset 42:24674203f62c
IsExp.syntaxCopy implemented
author | korDen |
---|---|
date | Sat, 21 Aug 2010 07:19:03 +0400 |
parents | f23312cb6f2e |
children | a509c8688fbd |
files | dmd/IsExp.d |
diffstat | 1 files changed, 20 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/dmd/IsExp.d Sat Aug 21 07:17:13 2010 +0400 +++ b/dmd/IsExp.d Sat Aug 21 07:19:03 2010 +0400 @@ -55,7 +55,26 @@ Expression syntaxCopy() { - assert(false); + // This section is identical to that in TemplateDeclaration.syntaxCopy() + TemplateParameters p = null; + if (parameters) + { + p = new TemplateParameters(); + p.setDim(parameters.dim); + for (int i = 0; i < p.dim; i++) + { + TemplateParameter tp = cast(TemplateParameter)parameters.data[i]; + p.data[i] = cast(void*)tp.syntaxCopy(); + } + } + + return new IsExp(loc, + targ.syntaxCopy(), + id, + tok, + tspec ? tspec.syntaxCopy() : null, + tok2, + p); } Expression semantic(Scope sc)