Mercurial > projects > ddmd
annotate dmd/ErrorExp.d @ 0:10317f0c89a5
Initial commit
author | korDen |
---|---|
date | Sat, 24 Oct 2009 08:42:06 +0400 |
parents | |
children | 2e2a5c3f943a |
rev | line source |
---|---|
0 | 1 module dmd.ErrorExp; |
2 | |
3 import dmd.OutBuffer; | |
4 import dmd.IntegerExp; | |
5 import dmd.Loc; | |
6 import dmd.HdrGenState; | |
7 import dmd.Type; | |
8 | |
9 /* Use this expression for error recovery. | |
10 * It should behave as a 'sink' to prevent further cascaded error messages. | |
11 */ | |
12 | |
13 class ErrorExp : IntegerExp | |
14 { | |
15 this() | |
16 { | |
17 super(Loc(0), 0, Type.terror); | |
18 } | |
19 | |
20 void toCBuffer(OutBuffer buf, HdrGenState* hgs) | |
21 { | |
22 buf.writestring("__error"); | |
23 } | |
24 } | |
25 |