Mercurial > projects > dang
comparison ast/Decl.d @ 145:a14ac9e5c858
Changes Scope to use char[]'s insted of Identifiers for lookup.
author | Anders Johnsen <skabet@gmail.com> |
---|---|
date | Mon, 21 Jul 2008 17:56:33 +0200 |
parents | 6e6355fb5f0f |
children | 6c5a3c0bb4fb |
comparison
equal
deleted
inserted
replaced
144:6e6355fb5f0f | 145:a14ac9e5c858 |
---|---|
84 { | 84 { |
85 } | 85 } |
86 | 86 |
87 override DType type() | 87 override DType type() |
88 { | 88 { |
89 return env.findType(varType); | 89 return env.findType(varType.get); |
90 } | 90 } |
91 | 91 |
92 Identifier varType, identifier; | 92 Identifier varType, identifier; |
93 Exp init; | 93 Exp init; |
94 } | 94 } |
175 { | 175 { |
176 if (myType !is null) | 176 if (myType !is null) |
177 return myType; | 177 return myType; |
178 | 178 |
179 auto t = new DFunction(identifier); | 179 auto t = new DFunction(identifier); |
180 t.returnType = env.findType(returnType); | 180 t.returnType = env.findType(returnType.get); |
181 SmallArray!(DType) array; | 181 SmallArray!(DType) array; |
182 foreach (a; funcArgs) | 182 foreach (a; funcArgs) |
183 array ~= a.type(); | 183 array ~= a.type(); |
184 t.params = array.safe(); | 184 t.params = array.safe(); |
185 t.firstParamIsReturnValue = this.sret; | 185 t.firstParamIsReturnValue = this.sret; |
212 { | 212 { |
213 } | 213 } |
214 | 214 |
215 override DType type() | 215 override DType type() |
216 { | 216 { |
217 return env.findType(identifier); | 217 return env.findType(identifier.get); |
218 } | 218 } |
219 | 219 |
220 Identifier identifier; | 220 Identifier identifier; |
221 Decl[] decls; | 221 Decl[] decls; |
222 private DType myType; | 222 private DType myType; |
244 { | 244 { |
245 } | 245 } |
246 | 246 |
247 override DType type() | 247 override DType type() |
248 { | 248 { |
249 return env.findType(identifier); | 249 return env.findType(identifier.get); |
250 } | 250 } |
251 | 251 |
252 Identifier identifier; | 252 Identifier identifier; |
253 Identifier[] baseClasses; | 253 Identifier[] baseClasses; |
254 Decl[] decls; | 254 Decl[] decls; |
277 { | 277 { |
278 } | 278 } |
279 | 279 |
280 override DType type() | 280 override DType type() |
281 { | 281 { |
282 return env.findType(identifier); | 282 return env.findType(identifier.get); |
283 } | 283 } |
284 | 284 |
285 Identifier identifier; | 285 Identifier identifier; |
286 Identifier[] baseClasses; | 286 Identifier[] baseClasses; |
287 Decl[] decls; | 287 Decl[] decls; |