Author Topic: Feature request (or is it already available??)  (Read 7077 times)

Offline daniloz

  • Regular
  • ***
  • Posts: 268
Feature request (or is it already available??)
« 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

Offline Seronis

  • Almost regular
  • **
  • Posts: 197
Re: Feature request (or is it already available??)
« Reply #1 on: September 18, 2009, 12:32:02 am »
This has absolutely nothing to do with "CodeCompletion redesign". ...

Offline daniloz

  • Regular
  • ***
  • Posts: 268
Re: Feature request (or is it already available??)
« Reply #2 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...

Offline Seronis

  • Almost regular
  • **
  • Posts: 197
Re: Feature request (or is it already available??)
« Reply #3 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.

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Feature request (or is it already available??)
« Reply #4 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.