comparison src/dil/semantic/Package.d @ 816:35d238d502cb

The ModuleManager handles packages as well now. Added options -ps and -pm to command compile.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Wed, 12 Mar 2008 22:41:45 +0100
parents 615c1386b18d
children
comparison
equal deleted inserted replaced
815:615c1386b18d 816:35d238d502cb
18 Module[] modules; /// The modules contained in this package. 18 Module[] modules; /// The modules contained in this package.
19 19
20 /// Constructs a Package object. 20 /// Constructs a Package object.
21 this(string pckgName) 21 this(string pckgName)
22 { 22 {
23 auto ident = IdTable.inStatic(pckgName); 23 auto ident = IdTable.lookup(pckgName);
24 super(SYM.Package, ident, null); 24 super(SYM.Package, ident, null);
25 this.pckgName = pckgName; 25 this.pckgName = pckgName;
26 } 26 }
27 27
28 /// Returns true if this is the root package. 28 /// Returns true if this is the root package.
41 } 41 }
42 42
43 /// Adds a module to this package. 43 /// Adds a module to this package.
44 void add(Module modul) 44 void add(Module modul)
45 { 45 {
46 modul.parent = this;
46 modules ~= modul; 47 modules ~= modul;
47 insert(modul, modul.name); 48 insert(modul, modul.name);
48 } 49 }
49 50
50 /// Adds a package to this package. 51 /// Adds a package to this package.
51 void add(Package pckg) 52 void add(Package pckg)
52 { 53 {
54 pckg.parent = this;
53 packages ~= pckg; 55 packages ~= pckg;
54 insert(pckg, pckg.name); 56 insert(pckg, pckg.name);
55 } 57 }
56 } 58 }