Mercurial > projects > ddmd
comparison dmd/IsExp.d @ 42:24674203f62c
IsExp.syntaxCopy implemented
author | korDen |
---|---|
date | Sat, 21 Aug 2010 07:19:03 +0400 |
parents | 427f8aa74d28 |
children | adf6f7f216ea |
comparison
equal
deleted
inserted
replaced
41:f23312cb6f2e | 42:24674203f62c |
---|---|
53 this.parameters = parameters; | 53 this.parameters = parameters; |
54 } | 54 } |
55 | 55 |
56 Expression syntaxCopy() | 56 Expression syntaxCopy() |
57 { | 57 { |
58 assert(false); | 58 // This section is identical to that in TemplateDeclaration.syntaxCopy() |
59 TemplateParameters p = null; | |
60 if (parameters) | |
61 { | |
62 p = new TemplateParameters(); | |
63 p.setDim(parameters.dim); | |
64 for (int i = 0; i < p.dim; i++) | |
65 { | |
66 TemplateParameter tp = cast(TemplateParameter)parameters.data[i]; | |
67 p.data[i] = cast(void*)tp.syntaxCopy(); | |
68 } | |
69 } | |
70 | |
71 return new IsExp(loc, | |
72 targ.syntaxCopy(), | |
73 id, | |
74 tok, | |
75 tspec ? tspec.syntaxCopy() : null, | |
76 tok2, | |
77 p); | |
59 } | 78 } |
60 | 79 |
61 Expression semantic(Scope sc) | 80 Expression semantic(Scope sc) |
62 { | 81 { |
63 Type tded; | 82 Type tded; |