How to get 'import' clauses from d file?
alex.khmara at gmail.com
Sat Jan 15 00:58:18 PST 2011
I'm trying to make some home-grown d build system, but and one of my tasks
is to get module dependencies. Yes, I know about -deps DMD switch, but it
when all needed modules are given to compiler. But if some dependencies
just aborts with error "module foo is in file "foo.d" that can not be
Of course, I can extract "foo" from this string, deal with it and repeat,
one module at a time is not a much fun. Seems like I need to parse d
source and extract
"import" clauses without compiler help - but may be I missed something?
And if not -
what tools can I use for parsing?
More information about the Digitalmars-d-learn