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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
1 module dmd.condition.util.findCondition;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
2
114
e28b18c23469 added a module dmd.common for commonly used stuff
Trass3r
parents: 0
diff changeset
3 import dmd.common;
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
4 import dmd.String;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
5 import dmd.Array;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
6 import dmd.Identifier;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
7
129
010eb8f0e18d further work on dmd test suite
korDen
parents: 114
diff changeset
8 bool findCondition(Vector!string ids, Identifier ident)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
9 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
10 if (ids)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
11 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
12 for (int i = 0; i < ids.dim; i++)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
13 {
129
010eb8f0e18d further work on dmd test suite
korDen
parents: 114
diff changeset
14 string id = ids[i];
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
15
129
010eb8f0e18d further work on dmd test suite
korDen
parents: 114
diff changeset
16 if (id == ident.toChars()) {
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
17 return true;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
18 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
19 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
20 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
21
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
22 return false;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
23 }