comparison ast/Decl.d @ 99:857f0d530789 new_gen

Imports and improved module statement Allow "module a.b.c" Supports most forms of D's import. import A, B; import A, B = C; import A, B : a = b, c;
author Anders Halager <halager@gmail.com>
date Tue, 06 May 2008 21:59:22 +0200
parents 621cedba53ea
children fea8d61a2451
comparison
equal deleted inserted replaced
98:7f9240d4ddc1 99:857f0d530789
12 basic.SmallArray; 12 basic.SmallArray;
13 13
14 enum DeclType 14 enum DeclType
15 { 15 {
16 VarDecl, 16 VarDecl,
17 ImportDecl,
17 FuncDecl, 18 FuncDecl,
18 StructDecl, 19 StructDecl,
19 } 20 }
20 21
21 class Decl 22 class Decl
55 return env.find(identifier).type; 56 return env.find(identifier).type;
56 } 57 }
57 58
58 Identifier varType, identifier; 59 Identifier varType, identifier;
59 Exp init; 60 Exp init;
61 }
62
63 class ImportDecl : Decl
64 {
65 this()
66 {
67 super(DeclType.ImportDecl);
68 }
69
70 bool isStatic = false;
71
72 Identifier[] packages;
73 Identifier name;
74 Identifier aliasedName;
75
76 Identifier[2][] explicitSymbols;
60 } 77 }
61 78
62 class FuncDecl : Decl 79 class FuncDecl : Decl
63 { 80 {
64 this(Identifier type, Identifier identifier) 81 this(Identifier type, Identifier identifier)