Mercurial > projects > ddmd
comparison dmd/IdentifierExp.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 |
---|---|
37 { | 37 { |
38 assert(false); | 38 assert(false); |
39 super(loc, TOK.init, 0); | 39 super(loc, TOK.init, 0); |
40 } | 40 } |
41 | 41 |
42 Expression semantic(Scope sc) | 42 override Expression semantic(Scope sc) |
43 { | 43 { |
44 Dsymbol s; | 44 Dsymbol s; |
45 Dsymbol scopesym; | 45 Dsymbol scopesym; |
46 | 46 |
47 version (LOGSEMANTIC) { | 47 version (LOGSEMANTIC) { |
133 error("undefined identifier %s", ident.toChars()); | 133 error("undefined identifier %s", ident.toChars()); |
134 type = Type.terror; | 134 type = Type.terror; |
135 return this; | 135 return this; |
136 } | 136 } |
137 | 137 |
138 string toChars() | 138 override string toChars() |
139 { | 139 { |
140 return ident.toChars(); | 140 return ident.toChars(); |
141 } | 141 } |
142 | 142 |
143 void dump(int indent) | 143 override void dump(int indent) |
144 { | 144 { |
145 assert(false); | 145 assert(false); |
146 } | 146 } |
147 | 147 |
148 void toCBuffer(OutBuffer buf, HdrGenState* hgs) | 148 override void toCBuffer(OutBuffer buf, HdrGenState* hgs) |
149 { | 149 { |
150 if (hgs.hdrgen) | 150 if (hgs.hdrgen) |
151 buf.writestring(ident.toHChars2()); | 151 buf.writestring(ident.toHChars2()); |
152 else | 152 else |
153 buf.writestring(ident.toChars()); | 153 buf.writestring(ident.toChars()); |
154 } | 154 } |
155 | 155 |
156 int isLvalue() | 156 override int isLvalue() |
157 { | 157 { |
158 return 1; | 158 return 1; |
159 } | 159 } |
160 | 160 |
161 Expression toLvalue(Scope sc, Expression e) | 161 override Expression toLvalue(Scope sc, Expression e) |
162 { | 162 { |
163 static if (false) { | 163 static if (false) { |
164 tym = tybasic(e1.ET.Tty); | 164 tym = tybasic(e1.ET.Tty); |
165 if (!(tyscalar(tym) || tym == TYM.TYstruct || tym == TYM.TYarray && e.Eoper == TOK.TOKaddr)) | 165 if (!(tyscalar(tym) || tym == TYM.TYstruct || tym == TYM.TYarray && e.Eoper == TOK.TOKaddr)) |
166 synerr(EM_lvalue); // lvalue expected | 166 synerr(EM_lvalue); // lvalue expected |