How to get the initialization block of the constructor?
littleGnAl opened this issue · 3 comments
littleGnAl commented
I want to get the initialization block of the constructor, so I can get the default value of the member variable, e.g.
struct AudioTrackConfig {
bool enableLocalPlayback;
AudioTrackConfig() : enableLocalPlayback(true) {}
};
It seems there's not enough information to do this by parsing the cpp_constructor
, can you give me some guide to do this?
foonathan commented
That is part of the definition, and cppast doesn't expose the definitions of entities. You have to use libclang or libtooling directly.
littleGnAl commented
Is possible for cppast to support it?
foonathan commented
Not without a lot of work, which I don't have the time or energy for.