Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Parsing code under inactive #if or #ifdef


I'm trying to use AST/PDOM for parsing a project in goal to build
browsable view of the code (outside of Eclipse, some set of WEB

For this purpose I would like to have inactive code to be parsed too.
As I can see, now this is prevented by CPreprocessor class. Method
executeIfdef() and other similar methods call

I would like to propose some enchancement for this. I believe some
scanner options could be added that changes default behaviour. If this
option is active, CPreprocessor will not call
skipOverConditionalCode() thus making parser to handle all the code.

I suppose, some methods should also be changed (like values of macro
defined inside active/inactive branches).

What do you think about such feature? Perhaps, CDT already have some
plans for similar enchancement?

I'm going to test this approach with CDT 5.0. If you have some
thoughts that could help me with it, please let me know.


Back to the top