A Perspective on D from game industry
Jacob Carlborg via Digitalmars-d
digitalmars-d at puremagic.com
Tue Jun 17 01:23:07 PDT 2014
On 17/06/14 06:44, H. S. Teoh via Digitalmars-d wrote:
> String mixins? Auto-completion? I dunno, that sounds like a stretch to
> me. How would an IDE handle autocompletion for things like like:
>
> string generateCode() {
> string code = "int x=";
> if (solveFermatsLastTheorem()) {
> code ~= "1";
> } else {
> code ~= "2";
> }
> code ~= ";";
> return code;
> }
> int func() {
> mixin(generateCode());
> }
That would require semantic analysis. Basically evaluate the string
mixin and to autocomplete on the resulted code.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list