Mercurial > projects > ddmd
annotate dmd/LineInitExp.d @ 137:09c858522d55
merge
author | Trass3r |
---|---|
date | Mon, 13 Sep 2010 23:29:00 +0200 |
parents | 60bb0fe4563e |
children | e3afd1303184 |
rev | line source |
---|---|
72 | 1 module dmd.LineInitExp; |
2 | |
114 | 3 import dmd.common; |
72 | 4 import dmd.Expression; |
5 import dmd.Loc; | |
6 import dmd.Scope; | |
7 import dmd.DefaultInitExp; | |
8 import dmd.IntegerExp; | |
9 import dmd.TOK; | |
10 import dmd.Type; | |
11 | |
12 class LineInitExp : DefaultInitExp | |
13 { | |
14 this(Loc loc) | |
15 { | |
16 super(loc, TOK.TOKline, this.sizeof); | |
17 } | |
18 | |
19 override Expression semantic(Scope sc) | |
20 { | |
21 type = Type.tint32; | |
22 return this; | |
23 } | |
24 | |
130
60bb0fe4563e
dmdfe 2.037 first main iteration
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
114
diff
changeset
|
25 override Expression resolveLoc(Loc loc, Scope sc) |
72 | 26 { |
27 Expression e = new IntegerExp(loc, loc.linnum, Type.tint32); | |
28 e = e.castTo(sc, type); | |
29 return e; | |
30 } | |
31 } |