comparison dmd/GotoDefaultStatement.d @ 64:4290d870944a

More fixes
author korDen
date Mon, 23 Aug 2010 20:29:15 +0400
parents cab4c37afb89
children ee3a9f34dc48
comparison
equal deleted inserted replaced
63:cab4c37afb89 64:4290d870944a
21 sw = null; 21 sw = null;
22 } 22 }
23 23
24 Statement syntaxCopy() 24 Statement syntaxCopy()
25 { 25 {
26 assert(false); 26 GotoDefaultStatement s = new GotoDefaultStatement(loc);
27 return s;
27 } 28 }
28 29
29 Statement semantic(Scope sc) 30 Statement semantic(Scope sc)
30 { 31 {
31 assert(false); 32 sw = sc.sw;
33 if (!sw)
34 error("goto default not in switch statement");
35 return this;
32 } 36 }
33 37
34 Expression interpret(InterState istate) 38 Expression interpret(InterState istate)
35 { 39 {
36 assert(false); 40 assert(false);
37 } 41 }
38 42
39 BE blockExit() 43 BE blockExit()
40 { 44 {
41 assert(false); 45 return BEgoto;
42 } 46 }
43 47
44 void toCBuffer(OutBuffer buf, HdrGenState* hgs) 48 void toCBuffer(OutBuffer buf, HdrGenState* hgs)
45 { 49 {
46 assert(false); 50 buf.writestring("goto default;\n");
47 } 51 }
48 52
49 void toIR(IRState *irs) 53 void toIR(IRState *irs)
50 { 54 {
51 assert(false); 55 assert(false);