Hi,<br><br>I wanted to try out to do some hacking into DMD. I ran in a problem that I have no clue how to solve.<br><br>I did the following to generate some function with an alternative syntax :<br> Type* type = new TypeIdentifier(loc, typeId);<br>
Parameters* ps = new Parameters();<br> ps->push(new Parameter(0, type, new Identifier("argument", TOKidentifier), NULL));<br> <br> Statement* body = parseStatement(PScurly);<br> f = new FuncDeclaration(loc, this->loc, id, STCundefined, new TypeFunction(ps, type, 0, LINKd, STCundefined));<br>
f->fbody = body;<br> <br> Dsymbols *decldefs = new Dsymbols();<br> decldefs->push(f);<br> <br> return new TemplateDeclaration(loc, id, tpl, constraint, decldefs, 0);<br><br>It works great, except that I can't use argument in the function body. I got an identifier missing message. What is missing to enable this identifier to be resolved as a regular function parameter ?<br>