Changeset 149
- Timestamp:
- 11/28/07 03:24:28 (10 months ago)
- Files:
-
- trunk/blade/SyntaxTree.d (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/blade/SyntaxTree.d
r148 r149 355 355 char [] mixin_valueOf(char [] sym) 356 356 { 357 // This function would just return sym.stringof, except for a couple of compiler bugs.358 // (1) 1.23.stringof fails to compile .359 // Fortunately (1.23).stringof works. IF you append "" to it!357 // This function would just return sym.stringof, except that: 358 // (1) 1.23.stringof fails to compile (compiler bug). 359 // Fortunately (1.23).stringof works. 360 360 // (2) x.stringof doesn't compile, if x is a function. Just return x instead. 361 361 // We also return x if x doesn't compile (eg, is an undefined variable). 362 362 if (sym[0]>='0' && sym[0]<='9') { // numeric literal 363 return `(` ~ sym ~ `).stringof ~""`;363 return `(` ~ sym ~ `).stringof`; 364 364 } 365 365 return `mixin(is(typeof(` ~ sym ~ `)==function) || !is(typeof(` ~ sym ~ `))?"\"` ~ enquote(sym, `\\\`) ~ `\"":"` ~ enquote(sym ~ ".stringof") ~ `")`;
