Mercurial > projects > ddmd
comparison dmd/GotoDefaultStatement.d @ 72:2e2a5c3f943a
reduced warnings by adding override to the methods
think this also normalizes different line endings used all over the place
author | Trass3r |
---|---|
date | Sat, 28 Aug 2010 16:19:48 +0200 |
parents | ee3a9f34dc48 |
children | e28b18c23469 |
comparison
equal
deleted
inserted
replaced
71:8e24ef1dd139 | 72:2e2a5c3f943a |
---|---|
24 { | 24 { |
25 super(loc); | 25 super(loc); |
26 sw = null; | 26 sw = null; |
27 } | 27 } |
28 | 28 |
29 Statement syntaxCopy() | 29 override Statement syntaxCopy() |
30 { | 30 { |
31 GotoDefaultStatement s = new GotoDefaultStatement(loc); | 31 GotoDefaultStatement s = new GotoDefaultStatement(loc); |
32 return s; | 32 return s; |
33 } | 33 } |
34 | 34 |
35 Statement semantic(Scope sc) | 35 override Statement semantic(Scope sc) |
36 { | 36 { |
37 sw = sc.sw; | 37 sw = sc.sw; |
38 if (!sw) | 38 if (!sw) |
39 error("goto default not in switch statement"); | 39 error("goto default not in switch statement"); |
40 return this; | 40 return this; |
41 } | 41 } |
42 | 42 |
43 Expression interpret(InterState istate) | 43 override Expression interpret(InterState istate) |
44 { | 44 { |
45 assert(false); | 45 assert(false); |
46 } | 46 } |
47 | 47 |
48 BE blockExit() | 48 override BE blockExit() |
49 { | 49 { |
50 return BEgoto; | 50 return BEgoto; |
51 } | 51 } |
52 | 52 |
53 void toCBuffer(OutBuffer buf, HdrGenState* hgs) | 53 override void toCBuffer(OutBuffer buf, HdrGenState* hgs) |
54 { | 54 { |
55 buf.writestring("goto default;\n"); | 55 buf.writestring("goto default;\n"); |
56 } | 56 } |
57 | 57 |
58 void toIR(IRState *irs) | 58 override void toIR(IRState *irs) |
59 { | 59 { |
60 block *b; | 60 block *b; |
61 Blockx *blx = irs.blx; | 61 Blockx *blx = irs.blx; |
62 block *bdest = irs.getDefaultBlock(); | 62 block *bdest = irs.getDefaultBlock(); |
63 | 63 |