News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Feature request (or is it already available??)

Started by daniloz, September 17, 2009, 09:10:55 AM

Previous topic - Next topic

daniloz

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:

#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

Seronis

This has absolutely nothing to do with "CodeCompletion redesign". ...

daniloz

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...

Seronis

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.

Ceniza

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.