Mercurial > projects > ddmd
annotate dmd/condition/util/findCondition.d @ 129:010eb8f0e18d
further work on dmd test suite
author | korDen |
---|---|
date | Sun, 05 Sep 2010 15:32:22 +0400 |
parents | e28b18c23469 |
children |
rev | line source |
---|---|
0 | 1 module dmd.condition.util.findCondition; |
2 | |
114 | 3 import dmd.common; |
0 | 4 import dmd.String; |
5 import dmd.Array; | |
6 import dmd.Identifier; | |
7 | |
129 | 8 bool findCondition(Vector!string ids, Identifier ident) |
0 | 9 { |
10 if (ids) | |
11 { | |
12 for (int i = 0; i < ids.dim; i++) | |
13 { | |
129 | 14 string id = ids[i]; |
0 | 15 |
129 | 16 if (id == ident.toChars()) { |
0 | 17 return true; |
18 } | |
19 } | |
20 } | |
21 | |
22 return false; | |
23 } |