Mercurial > projects > ddmd
comparison dmd/DotIdExp.d @ 130:60bb0fe4563e
dmdfe 2.037 first main iteration
author | Eldar Insafutdinov <e.insafutdinov@gmail.com> |
---|---|
date | Thu, 09 Sep 2010 22:51:44 +0100 |
parents | e28b18c23469 |
children | 9d194c848e3a |
comparison
equal
deleted
inserted
replaced
129:010eb8f0e18d | 130:60bb0fe4563e |
---|---|
54 this.ident = ident; | 54 this.ident = ident; |
55 } | 55 } |
56 | 56 |
57 override Expression semantic(Scope sc) | 57 override Expression semantic(Scope sc) |
58 { | 58 { |
59 // Indicate we didn't come from CallExp::semantic() | |
60 return semantic(sc, 0); | |
61 } | |
62 | |
63 Expression semantic(Scope sc, int flag) | |
64 { | |
59 Expression e; | 65 Expression e; |
60 Expression eleft; | 66 Expression eleft; |
61 Expression eright; | 67 Expression eright; |
62 | 68 |
63 version (LOGSEMANTIC) { | 69 version (LOGSEMANTIC) { |
185 | 191 |
186 /* Disable access to another module's private imports. | 192 /* Disable access to another module's private imports. |
187 * The check for 'is sds our current module' is because | 193 * The check for 'is sds our current module' is because |
188 * the current module should have access to its own imports. | 194 * the current module should have access to its own imports. |
189 */ | 195 */ |
190 Dsymbol s = ie.sds.search(loc, ident, | 196 Dsymbol s = ie.sds.search(loc, ident, //0); |
191 (ie.sds.isModule() && ie.sds != sc.module_) ? 1 : 0); | 197 (ie.sds.isModule() && ie.sds != sc.module_) ? 1 : 0); |
192 if (s) | 198 if (s) |
193 { | 199 { |
194 s = s.toAlias(); | 200 s = s.toAlias(); |
195 checkDeprecated(sc, s); | 201 checkDeprecated(sc, s); |
353 } | 359 } |
354 ///} | 360 ///} |
355 else | 361 else |
356 { | 362 { |
357 e = e1.type.dotExp(sc, e1, ident); | 363 e = e1.type.dotExp(sc, e1, ident); |
358 e = e.semantic(sc); | 364 if (!(flag && e.op == TOK.TOKdotti)) // let CallExp::semantic() handle this |
365 e = e.semantic(sc); | |
359 return e; | 366 return e; |
360 } | 367 } |
361 } | 368 } |
362 | 369 |
363 override void toCBuffer(OutBuffer buf, HdrGenState* hgs) | 370 override void toCBuffer(OutBuffer buf, HdrGenState* hgs) |