DIP 50 - AST macros
Jacob Carlborg
doob at me.com
Wed Nov 13 04:26:43 PST 2013
On 2013-11-13 09:34, luka8088 wrote:
> What about something like this?
>
> class Person {
>
> macro where (Context context, Statement statement) {
> // ...
> }
>
> }
>
> auto foo = "John";
> auto result = Person.where(e => e.name == foo);
>
> // is replaced by
> auto foo = "John";
> auto result = Person.query("select * from person where person.name = " ~
> sqlQuote(foo) ~ ";");
That's basically what would happen.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list