DIP 50 - AST macros
Jacob Carlborg
doob at me.com
Mon Nov 11 04:32:30 PST 2013
On 2013-11-11 12:08, Rikki Cattermole wrote:
> I was referring to the use case as to why we should have the ability to
> get scoped variables from the initiation point.
> Example:
>
> void func(int i) {
> bool b;
> macr {}
> }
>
> macro foo (Context context, Ast!(string) str)
> {
> writeln(context.scopeVariables!int("i"));
> writeln(context.scopeVariables!bool("b"));
> return "";
> }
Ok, I see. Please add additional examples to the DIP if you think it's
missing.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list