root/trunk/src/import.h

Revision 428, 1.7 kB (checked in by walter, 2 years ago)

remove tabs, any trailing spaces

  • Property svn:eol-style set to native
Line 
1 // Compiler implementation of the D programming language
2 // Copyright (c) 1999-2007 by Digital Mars
3 // All Rights Reserved
4 // written by Walter Bright
5 // http://www.digitalmars.com
6 // License for redistribution is by either the Artistic License
7 // in artistic.txt, or the GNU General Public License in gnu.txt.
8 // See the included readme.txt for details.
9
10 #ifndef DMD_IMPORT_H
11 #define DMD_IMPORT_H
12
13 #ifdef __DMC__
14 #pragma once
15 #endif /* __DMC__ */
16
17 #include "dsymbol.h"
18
19
20 struct Identifier;
21 struct Scope;
22 struct OutBuffer;
23 struct Module;
24 struct Package;
25 struct AliasDeclaration;
26 #ifdef _DH
27 struct HdrGenState;
28 #endif
29
30 struct Import : Dsymbol
31 {
32     Array *packages;            // array of Identifier's representing packages
33     Identifier *id;             // module Identifier
34     Identifier *aliasId;
35     int isstatic;               // !=0 if static import
36
37     // Pairs of alias=name to bind into current namespace
38     Array names;
39     Array aliases;
40
41     Array aliasdecls;           // AliasDeclarations for names/aliases
42
43     Module *mod;
44     Package *pkg;               // leftmost package/module
45
46     Import(Loc loc, Array *packages, Identifier *id, Identifier *aliasId,
47         int isstatic);
48     void addAlias(Identifier *name, Identifier *alias);
49
50     const char *kind();
51     Dsymbol *syntaxCopy(Dsymbol *s);    // copy only syntax trees
52     void load(Scope *sc);
53     void importAll(Scope *sc);
54     void semantic(Scope *sc);
55     void semantic2(Scope *sc);
56     Dsymbol *toAlias();
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);
61
62     Import *isImport() { return this; }
63 };
64
65 #endif /* DMD_IMPORT_H */
Note: See TracBrowser for help on using the browser.