Mercurial > projects > ddmd
comparison dmd/ProtDeclaration.d @ 79:43073c7c7769
updated to 2.035
also implemented a few missing functions
still crashes in Import.importAll though
author | Trass3r |
---|---|
date | Mon, 30 Aug 2010 03:57:51 +0200 |
parents | 7e0d548de9e6 |
children | 50ebb404ddd9 b17640f0e4e8 |
comparison
equal
deleted
inserted
replaced
78:b98fa8a4bf04 | 79:43073c7c7769 |
---|---|
27 assert(!s); | 27 assert(!s); |
28 pd = new ProtDeclaration(protection, Dsymbol.arraySyntaxCopy(decl)); | 28 pd = new ProtDeclaration(protection, Dsymbol.arraySyntaxCopy(decl)); |
29 return pd; | 29 return pd; |
30 } | 30 } |
31 | 31 |
32 override void importAll(Scope sc) | |
33 { | |
34 Scope newsc = sc; | |
35 if (sc.protection != protection || sc.explicitProtection != 1) | |
36 { | |
37 // create new one for changes | |
38 newsc = new Scope(sc); | |
39 newsc.flags &= ~SCOPE.SCOPEfree; | |
40 newsc.protection = protection; | |
41 newsc.explicitProtection = 1; | |
42 } | |
43 | |
44 foreach (Dsymbol s; decl) | |
45 s.importAll(newsc); | |
46 | |
47 if (newsc !is sc) | |
48 newsc.pop(); | |
49 } | |
50 | |
32 override void setScope(Scope sc) | 51 override void setScope(Scope sc) |
33 { | 52 { |
34 if (decl) | 53 if (decl) |
35 { | 54 { |
36 setScopeNewSc(sc, sc.stc, sc.linkage, protection, 1, sc.structalign); | 55 setScopeNewSc(sc, sc.stc, sc.linkage, protection, 1, sc.structalign); |