2 // Compiler implementation of the D programming language
3 // Copyright (c) 1999-2007 by Digital Mars
5 // written by Walter Bright
6 // http://www.digitalmars.com
7 // License for redistribution is by either the Artistic License
8 // in artistic.txt, or the GNU General Public License in gnu.txt.
9 // See the included readme.txt for details.
26 struct AliasDeclaration
;
31 struct Import
: Dsymbol
33 Array
*packages
; // array of Identifier's representing packages
34 Identifier
*id
; // module Identifier
36 int isstatic
; // !=0 if static import
38 // Pairs of alias=name to bind into current namespace
42 Array aliasdecls
; // AliasDeclarations for names/aliases
45 Package
*pkg
; // leftmost package/module
47 Import(Loc loc
, Array
*packages
, Identifier
*id
, Identifier
*aliasId
,
49 void addAlias(Identifier
*name
, Identifier
*alias
);
52 Dsymbol
*syntaxCopy(Dsymbol
*s
); // copy only syntax trees
54 void semantic(Scope
*sc
);
55 void semantic2(Scope
*sc
);
57 int addMember(Scope
*sc
, ScopeDsymbol
*s
, int memnum
);
58 Dsymbol
*search(Loc loc
, Identifier
*ident
, int flags
);
59 int overloadInsert(Dsymbol
*s
);
60 void toCBuffer(OutBuffer
*buf
, HdrGenState
*hgs
);
62 Import
*isImport() { return this; }
65 #endif /* DMD_IMPORT_H */