comparison dmd/ConditionalStatement.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 4290d870944a
children e28b18c23469
comparison
equal deleted inserted replaced
71:8e24ef1dd139 72:2e2a5c3f943a
21 this.condition = condition; 21 this.condition = condition;
22 this.ifbody = ifbody; 22 this.ifbody = ifbody;
23 this.elsebody = elsebody; 23 this.elsebody = elsebody;
24 } 24 }
25 25
26 Statement syntaxCopy() 26 override Statement syntaxCopy()
27 { 27 {
28 Statement e = null; 28 Statement e = null;
29 if (elsebody) 29 if (elsebody)
30 e = elsebody.syntaxCopy(); 30 e = elsebody.syntaxCopy();
31 ConditionalStatement s = new ConditionalStatement(loc, condition.syntaxCopy(), ifbody.syntaxCopy(), e); 31 ConditionalStatement s = new ConditionalStatement(loc, condition.syntaxCopy(), ifbody.syntaxCopy(), e);
32 return s; 32 return s;
33 } 33 }
34 34
35 Statement semantic(Scope sc) 35 override Statement semantic(Scope sc)
36 { 36 {
37 //printf("ConditionalStatement.semantic()\n"); 37 //printf("ConditionalStatement.semantic()\n");
38 38
39 // If we can short-circuit evaluate the if statement, don't do the 39 // If we can short-circuit evaluate the if statement, don't do the
40 // semantic analysis of the skipped code. 40 // semantic analysis of the skipped code.
50 elsebody = elsebody.semantic(sc); 50 elsebody = elsebody.semantic(sc);
51 return elsebody; 51 return elsebody;
52 } 52 }
53 } 53 }
54 54
55 Statements flatten(Scope sc) 55 override Statements flatten(Scope sc)
56 { 56 {
57 Statement s; 57 Statement s;
58 58
59 if (condition.include(sc, null)) 59 if (condition.include(sc, null))
60 s = ifbody; 60 s = ifbody;
65 a.push(cast(void*)s); 65 a.push(cast(void*)s);
66 66
67 return a; 67 return a;
68 } 68 }
69 69
70 bool usesEH() 70 override bool usesEH()
71 { 71 {
72 assert(false); 72 assert(false);
73 } 73 }
74 74
75 BE blockExit() 75 override BE blockExit()
76 { 76 {
77 assert(false); 77 assert(false);
78 } 78 }
79 79
80 void toCBuffer(OutBuffer buf, HdrGenState* hgs) 80 override void toCBuffer(OutBuffer buf, HdrGenState* hgs)
81 { 81 {
82 assert(false); 82 assert(false);
83 } 83 }
84 } 84 }