Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: danselmi on December 16, 2010, 11:27:36 pm

Title: StyledTextCtrl:IsComment() and friends language independant, was C/C++ only
Post by: danselmi on December 16, 2010, 11:27:36 pm
Hi
Patch #3103 extends cbStyledTextCtrl in a way that
Code
IsCharacter(), IsString(), IsPreprocessor() and IsComment() 
are not C/C++ only anymore. The needed Information is stored in the lexer configuration files. The configuration files for C/C++, D, verilog and VHDL are adjusted in the patch. We need to adjust the other language files step by step (if ithe patch will find it's way into trunk).

regards danselmi
Title: Re: StyledTextCtrl:IsComment() and friends language independant, was C/C++ only
Post by: MortenMacFly on December 18, 2010, 01:48:36 pm
For the record: I am already testing this patch on windows and it looks OK so far. danselmi and I had discussed to bring this patch into public for further testing. Any feedback is welcome! Especially on Linux / Mac.
Title: Re: StyledTextCtrl:IsComment() and friends language independant, was C/C++ only
Post by: oBFusCATed on December 18, 2010, 01:52:40 pm
I can test it, but what are the user visible changes/bugs, I should look for?
Title: Re: StyledTextCtrl:IsComment() and friends language independant, was C/C++ only
Post by: danselmi on December 20, 2010, 04:42:57 pm
There are no user visible changes. The four methods compared the style against constants from the c/c++ lexer for example wxSCI_C_CHARACTER. With this patch the styles have to be configured for the different lexers (in the respective xml file) and not hardcoded in cbstyledtextctrl.cpp anymore.

These methods are mainly used for auto-indent and cc.
Title: Re: StyledTextCtrl:IsComment() and friends language independant, was C/C++ only
Post by: MortenMacFly on December 23, 2010, 07:23:18 am
...any news / comment soon this one from other devs?

I tend to apply this to trunk as I believe it's a way better style that the one currently...