Mercurial > projects > ddmd
comparison dmd/AttribDeclaration.d @ 77:ad4792a1cfd6
more D-ification container accessing
author | Eldar Insafutdinov <e.insafutdinov@gmail.com> |
---|---|
date | Sun, 29 Aug 2010 14:36:55 +0100 |
parents | 7e0d548de9e6 |
children | 43073c7c7769 |
comparison
equal
deleted
inserted
replaced
74:7e0d548de9e6 | 77:ad4792a1cfd6 |
---|---|
32 | 32 |
33 if (d) | 33 if (d) |
34 { | 34 { |
35 foreach(s; d) | 35 foreach(s; d) |
36 m |= s.addMember(sc, sd, m | memnum); | 36 m |= s.addMember(sc, sd, m | memnum); |
37 /* for (uint i = 0; i < d.dim; i++) | |
38 { | |
39 auto s = d[i]; | |
40 m |= s.addMember(sc, sd, m | memnum); | |
41 } | |
42 */ | |
43 } | 37 } |
44 | 38 |
45 return m; | 39 return m; |
46 } | 40 } |
47 | 41 |
61 newsc.linkage = linkage; | 55 newsc.linkage = linkage; |
62 newsc.protection = protection; | 56 newsc.protection = protection; |
63 newsc.explicitProtection = explicitProtection; | 57 newsc.explicitProtection = explicitProtection; |
64 newsc.structalign = structalign; | 58 newsc.structalign = structalign; |
65 } | 59 } |
66 for (uint i = 0; i < decl.dim; i++) | 60 foreach(Dsymbol s; decl) |
67 { | |
68 Dsymbol s = cast(Dsymbol)decl.data[i]; | |
69 s.setScope(newsc); // yes, the only difference from semanticNewSc() | 61 s.setScope(newsc); // yes, the only difference from semanticNewSc() |
70 } | |
71 if (newsc != sc) | 62 if (newsc != sc) |
72 { | 63 { |
73 sc.offset = newsc.offset; | 64 sc.offset = newsc.offset; |
74 newsc.pop(); | 65 newsc.pop(); |
75 } | 66 } |
92 newsc.linkage = linkage; | 83 newsc.linkage = linkage; |
93 newsc.protection = protection; | 84 newsc.protection = protection; |
94 newsc.explicitProtection = explicitProtection; | 85 newsc.explicitProtection = explicitProtection; |
95 newsc.structalign = structalign; | 86 newsc.structalign = structalign; |
96 } | 87 } |
97 for (uint i = 0; i < decl.dim; i++) | 88 foreach(Dsymbol s; decl) |
98 { | |
99 Dsymbol s = cast(Dsymbol)decl.data[i]; | |
100 s.semantic(newsc); | 89 s.semantic(newsc); |
101 } | |
102 if (newsc != sc) | 90 if (newsc != sc) |
103 { | 91 { |
104 sc.offset = newsc.offset; | 92 sc.offset = newsc.offset; |
105 newsc.pop(); | 93 newsc.pop(); |
106 } | 94 } |