Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => CodeCompletion redesign => Topic started by: daniloz on September 17, 2009, 09:10:55 am

Title: Feature request (or is it already available??)
Post by: daniloz on September 17, 2009, 09:10:55 am
Hi,

I don't know if this is already available and I don't know how to use it, but if not available, is it difficult to include this, please, please, please?  8) ;)

Given the code below:
Code
#ifdef ENUM1
    enum TNoNoCpp {ENUM_1,ENUM_2};
#end

#ifdef ENUM2
    enum TNoNoCpp {ENUM_10,ENUM_20};
#endif

I'd like the parser to only parse the relevant enum based on the definition of either ENUM1 or ENUM2. Right now I have all four ENUM_1, ENUM_2, ENUM_10 and ENUM_20 as members (or children) or "TNoNoCpp".

I have tried to define ENUM1 or ENUM2 in "Project / Build options / Compiler settings / #defines" to no avail... Am I missing something??

Thx a lot,
daniloz
Title: Re: Feature request (or is it already available??)
Post by: Seronis on September 18, 2009, 12:32:02 am
This has absolutely nothing to do with "CodeCompletion redesign". ...
Title: Re: Feature request (or is it already available??)
Post by: daniloz on September 18, 2009, 12:09:42 pm
Well, IMHO, this is a code completion issue (parser actually, which belongs to CC) and, if not implemented, it'd be a suggestion to be taken care while "redesigning" it...
Title: Re: Feature request (or is it already available??)
Post by: Seronis on September 18, 2009, 03:02:00 pm
Apologies, I misread the post as you asking how to get the given code to work using #defines in the project settings not as how to have CC recognize only the one.  My Mistake.
Title: Re: Feature request (or is it already available??)
Post by: Ceniza on September 18, 2009, 07:49:18 pm
That's an issue that can only be solved with a full preprocessing stage before parsing. As far as I know the current implementation does very simplistic assumptions just in order to continue parsing. Of course it should make part of the redesign.