D parsing
Jacob Carlborg
doob at me.com
Mon Nov 11 00:00:37 PST 2013
On 2013-11-11 02:54, Andrei Alexandrescu wrote:
> What do you have in mind? I find it difficult to grab e.g. the file and
> the line unless there's some plumbing in the language that allows you to.
The language just need to provide a way to introspect the AST. If we're
talking about a specific API I can think of something like this:
macro foo (Context context, Ast!(string) str)
{
auto line = context.caller.line;
auto file = context.caller.file;
}
foo("asd");
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list