1 module dsymbol.type_lookup;
2 
3 import dsymbol.string_interning;
4 import containers.unrolledlist;
5 
6 /**
7  * The type lookup kind.
8  */
9 enum TypeLookupKind : ubyte
10 {
11 	inherit,
12 	aliasThis,
13 	initializer,
14 	mixinTemplate,
15 	varOrFunType,
16 	selectiveImport,
17 }
18 
19 /**
20  * information used by the symbol resolver to determine types, inheritance,
21  * mixins, and alias this.
22  */
23 struct TypeLookup
24 {
25 	this(TypeLookupKind kind)
26 	{
27 		this.kind = kind;
28 	}
29 
30 	this(istring name, TypeLookupKind kind)
31 	{
32 		breadcrumbs.insert(name);
33 		this.kind = kind;
34 	}
35 
36 	/// Strings used to resolve the type
37 	UnrolledList!istring breadcrumbs;
38 	/// The kind of type lookup
39 	TypeLookupKind kind;
40 }