Mercurial > projects > ddmd
annotate dmd/TypeExp.d @ 16:5c9b78899f5d
Implemented methods for Tuples, fixed some linking issues.
author | Robert Clipsham <robert@octarineparrot.com> |
---|---|
date | Sun, 04 Apr 2010 22:41:11 +0100 |
parents | 10317f0c89a5 |
children | 2e2a5c3f943a |
rev | line source |
---|---|
0 | 1 module dmd.TypeExp; |
2 | |
3 import dmd.Expression; | |
4 import dmd.backend.elem; | |
5 import dmd.Type; | |
6 import dmd.OutBuffer; | |
7 import dmd.Loc; | |
8 import dmd.Scope; | |
9 import dmd.IRState; | |
10 import dmd.HdrGenState; | |
11 import dmd.TOK; | |
12 | |
13 class TypeExp : Expression | |
14 { | |
15 this(Loc loc, Type type) | |
16 { | |
17 super(loc, TOK.TOKtype, TypeExp.sizeof); | |
18 //printf("TypeExp::TypeExp(%s)\n", type->toChars()); | |
19 this.type = type; | |
20 } | |
21 | |
22 version (DumbClone) { | |
23 } else { | |
24 Type clone() | |
25 { | |
26 assert(false); | |
27 } | |
28 } | |
29 Expression syntaxCopy() | |
30 { | |
31 //printf("TypeExp.syntaxCopy()\n"); | |
32 return new TypeExp(loc, type.syntaxCopy()); | |
33 } | |
34 | |
35 Expression semantic(Scope sc) | |
36 { | |
37 //printf("TypeExp::semantic(%s)\n", type->toChars()); | |
38 type = type.semantic(loc, sc); | |
39 return this; | |
40 } | |
41 | |
42 void rvalue() | |
43 { | |
44 assert(false); | |
45 } | |
46 | |
47 void toCBuffer(OutBuffer buf, HdrGenState* hgs) | |
48 { | |
16
5c9b78899f5d
Implemented methods for Tuples, fixed some linking issues.
Robert Clipsham <robert@octarineparrot.com>
parents:
0
diff
changeset
|
49 type.toCBuffer(buf, null, hgs); |
0 | 50 } |
51 | |
52 Expression optimize(int result) | |
53 { | |
54 return this; | |
55 } | |
56 | |
57 elem* toElem(IRState* irs) | |
58 { | |
59 assert(false); | |
60 } | |
61 } | |
62 |