comparison ast/Decl.d @ 102:cd066f3b539a new_gen

Parsing methods in structs - error on semantics though.
author Anders Johnsen <skabet@gmail.com>
date Thu, 08 May 2008 10:32:41 +0200
parents fea8d61a2451
children 189c049cbfcc
comparison
equal deleted inserted replaced
101:fea8d61a2451 102:cd066f3b539a
164 { 164 {
165 this(Identifier identifier) 165 this(Identifier identifier)
166 { 166 {
167 super(DeclType.StructDecl); 167 super(DeclType.StructDecl);
168 this.identifier = identifier; 168 this.identifier = identifier;
169 this.vars = vars;
170 } 169 }
171 170
172 void addMember(Identifier type, Identifier name, Exp exp) 171 void addMember(Decl decl)
173 { 172 {
174 vars ~= new VarDecl(type, name, exp); 173 decls ~= decl;
175 } 174 }
176 175
177 void simplify() 176 void simplify()
178 { 177 {
179 } 178 }
182 { 181 {
183 return env.findType(identifier); 182 return env.findType(identifier);
184 } 183 }
185 184
186 Identifier identifier; 185 Identifier identifier;
187 VarDecl[] vars; 186 Decl[] decls;
188 private DType myType; 187 private DType myType;
189 } 188 }
190 189