Mercurial > projects > dang
comparison sema/Symbol.d @ 158:57b0b4464a0b
Parsing "new", putting it in AST and performs some tests on it. Eg. if the contructor exists and the params matches.
author | Anders Johnsen <skabet@gmail.com> |
---|---|
date | Tue, 22 Jul 2008 00:33:58 +0200 |
parents | 2be29b296081 |
children | 7982eb63c0eb |
comparison
equal
deleted
inserted
replaced
157:bb01c1dc452a | 158:57b0b4464a0b |
---|---|
41 | 41 |
42 /** | 42 /** |
43 Try to find a contained symbol with the given name - returns null if not | 43 Try to find a contained symbol with the given name - returns null if not |
44 found | 44 found |
45 **/ | 45 **/ |
46 Symbol findMember(char[] member) | 46 Symbol[] findMembers(char[] member) |
47 { | 47 { |
48 Symbol[] res; | |
48 foreach (possible; actual.contained) | 49 foreach (possible; actual.contained) |
49 if (possible.name == member) | 50 if (possible.name == member) |
50 return possible; | 51 res ~= possible; |
51 return null; | 52 return res; |
52 } | 53 } |
53 | 54 |
54 /** | 55 /** |
55 Get the members of the symbol | 56 Get the members of the symbol |
56 **/ | 57 **/ |