Mercurial > projects > ddmd
comparison dmd/CompileStatement.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 | 460959608115 |
children | e28b18c23469 |
comparison
equal
deleted
inserted
replaced
71:8e24ef1dd139 | 72:2e2a5c3f943a |
---|---|
22 { | 22 { |
23 super(loc); | 23 super(loc); |
24 this.exp = exp; | 24 this.exp = exp; |
25 } | 25 } |
26 | 26 |
27 Statement syntaxCopy() | 27 override Statement syntaxCopy() |
28 { | 28 { |
29 Expression e = exp.syntaxCopy(); | 29 Expression e = exp.syntaxCopy(); |
30 CompileStatement es = new CompileStatement(loc, e); | 30 CompileStatement es = new CompileStatement(loc, e); |
31 return es; | 31 return es; |
32 } | 32 } |
33 | 33 |
34 void toCBuffer(OutBuffer buf, HdrGenState* hgs) | 34 override void toCBuffer(OutBuffer buf, HdrGenState* hgs) |
35 { | 35 { |
36 buf.writestring("mixin("); | 36 buf.writestring("mixin("); |
37 exp.toCBuffer(buf, hgs); | 37 exp.toCBuffer(buf, hgs); |
38 buf.writestring(");"); | 38 buf.writestring(");"); |
39 if (!hgs.FLinit.init) | 39 if (!hgs.FLinit.init) |
40 buf.writenl(); | 40 buf.writenl(); |
41 } | 41 } |
42 | 42 |
43 Statements flatten(Scope sc) | 43 override Statements flatten(Scope sc) |
44 { | 44 { |
45 //printf("CompileStatement::flatten() %s\n", exp->toChars()); | 45 //printf("CompileStatement::flatten() %s\n", exp->toChars()); |
46 exp = exp.semantic(sc); | 46 exp = exp.semantic(sc); |
47 exp = resolveProperties(sc, exp); | 47 exp = resolveProperties(sc, exp); |
48 exp = exp.optimize(WANT.WANTvalue | WANT.WANTinterpret); | 48 exp = exp.optimize(WANT.WANTvalue | WANT.WANTinterpret); |
63 a.push(cast(void*)s); | 63 a.push(cast(void*)s); |
64 } | 64 } |
65 return a; | 65 return a; |
66 } | 66 } |
67 | 67 |
68 Statement semantic(Scope sc) | 68 override Statement semantic(Scope sc) |
69 { | 69 { |
70 //printf("CompileStatement::semantic() %s\n", exp->toChars()); | 70 //printf("CompileStatement::semantic() %s\n", exp->toChars()); |
71 Statements a = flatten(sc); | 71 Statements a = flatten(sc); |
72 if (!a) | 72 if (!a) |
73 return null; | 73 return null; |