Mercurial > projects > ddmd
comparison dmd/WhileStatement.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 | cab4c37afb89 |
children | e28b18c23469 |
comparison
equal
deleted
inserted
replaced
71:8e24ef1dd139 | 72:2e2a5c3f943a |
---|---|
22 super(loc); | 22 super(loc); |
23 condition = c; | 23 condition = c; |
24 body_ = b; | 24 body_ = b; |
25 } | 25 } |
26 | 26 |
27 Statement syntaxCopy() | 27 override Statement syntaxCopy() |
28 { | 28 { |
29 WhileStatement s = new WhileStatement(loc, condition.syntaxCopy(), body_ ? body_.syntaxCopy() : null); | 29 WhileStatement s = new WhileStatement(loc, condition.syntaxCopy(), body_ ? body_.syntaxCopy() : null); |
30 return s; | 30 return s; |
31 } | 31 } |
32 | 32 |
33 Statement semantic(Scope sc) | 33 override Statement semantic(Scope sc) |
34 { | 34 { |
35 /* Rewrite as a for(;condition;) loop | 35 /* Rewrite as a for(;condition;) loop |
36 */ | 36 */ |
37 | 37 |
38 Statement s = new ForStatement(loc, null, condition, null, body_); | 38 Statement s = new ForStatement(loc, null, condition, null, body_); |
39 s = s.semantic(sc); | 39 s = s.semantic(sc); |
40 return s; | 40 return s; |
41 } | 41 } |
42 | 42 |
43 bool hasBreak() | 43 override bool hasBreak() |
44 { | 44 { |
45 return true; | 45 return true; |
46 } | 46 } |
47 | 47 |
48 bool hasContinue() | 48 override bool hasContinue() |
49 { | 49 { |
50 assert(false); | 50 assert(false); |
51 } | 51 } |
52 | 52 |
53 bool usesEH() | 53 override bool usesEH() |
54 { | 54 { |
55 assert(false); | 55 assert(false); |
56 } | 56 } |
57 | 57 |
58 BE blockExit() | 58 override BE blockExit() |
59 { | 59 { |
60 assert(false); | 60 assert(false); |
61 } | 61 } |
62 | 62 |
63 bool comeFrom() | 63 override bool comeFrom() |
64 { | 64 { |
65 assert(false); | 65 assert(false); |
66 } | 66 } |
67 | 67 |
68 Expression interpret(InterState istate) | 68 override Expression interpret(InterState istate) |
69 { | 69 { |
70 assert(false); | 70 assert(false); |
71 } | 71 } |
72 | 72 |
73 void toCBuffer(OutBuffer buf, HdrGenState* hgs) | 73 override void toCBuffer(OutBuffer buf, HdrGenState* hgs) |
74 { | 74 { |
75 assert(false); | 75 assert(false); |
76 } | 76 } |
77 | 77 |
78 Statement inlineScan(InlineScanState* iss) | 78 override Statement inlineScan(InlineScanState* iss) |
79 { | 79 { |
80 assert(false); | 80 assert(false); |
81 } | 81 } |
82 | 82 |
83 void toIR(IRState* irs) | 83 override void toIR(IRState* irs) |
84 { | 84 { |
85 assert(false); | 85 assert(false); |
86 } | 86 } |
87 } | 87 } |