Page 1 of 1

CL doesnt parse #if preprocessors properly

Posted: Tue Oct 28, 2008 10:57 am
by hbr_in
Hi,

i have been using CL everyday now and have fell in love with it. Thanks for the cool IDE.

Now i have few doubts & requests for the same

1. CL doesnt parse #if preprocessors properly. I mean it doesnt properly display the code under else part of #if 0

Code: Select all

#if 0
  do_a();
#else
  do_b();
#endif
Here both do_a() & do_b() are greyed out. The same when it is #if 1. Both are displayed.

Many a times a MACRO under a #if preprocessor is not considered correctly. Its a random behaviour so i cannot give u sure shot examples

#define MACRO1 1

#ifdef MACRO1
#define NEED_DATA
#else
#undef NEED_DATA
#endif

#ifdef NEED_DATA
do_code_a();
#else
do_code_b();
#endif

If i right click on NEED_DATA above & select show definitions, sometimes it says #define NEED_DATA & sometimes it says #undef NEED_DATA. But its very random.

I tried to re-tag project, file, workspace, but it still is random.

Hope u understand what i am saying

Regards
Gururraja

Re: CL doesnt parse #if preprocessors properly

Posted: Tue Oct 28, 2008 1:55 pm
by eranif
First, CodeLite does not parse preprocessor at all

The colour changes you see ("if 0" coloured in grey) are part of Scintilla's lexing and not by CodeLite code-completion engine.

There is a known bug with the

Code: Select all

#if 0
. Since this is not going to be officially supported by Scintilla any time soon, and the current implementation is very poor, I am going to remove this feature until it does.

Eran