Author Topic: Extending the CPP Lexer  (Read 17705 times)

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Extending the CPP Lexer
« Reply #15 on: July 19, 2012, 10:43:55 pm »
Here is the quick hack.  (To do it properly, this should actually be connected to a checkbox in the settings.)
Code
Index: src/sdk/wxscintilla/src/scintilla/lexers/LexCPP.cxx
===================================================================
--- src/sdk/wxscintilla/src/scintilla/lexers/LexCPP.cxx (revision 8148)
+++ src/sdk/wxscintilla/src/scintilla/lexers/LexCPP.cxx (working copy)
@@ -221,7 +221,7 @@
  bool highlightWxSmith;
 /* C::B end */
  OptionsCPP() {
- stylingWithinPreprocessor = false;
+ stylingWithinPreprocessor = true;
  identifiersAllowDollars = true;
  trackPreprocessor = true;
  updatePreprocessor = true;

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Extending the CPP Lexer
« Reply #16 on: July 20, 2012, 02:22:14 pm »
(To do it properly, this should actually be connected to a checkbox in the settings.)
Which are roughly 3 lines of code and a checkbox in a XRC file you can modify with C::B. Patches are welcome. (Not from you, Alpha - you've done enough already...)

Edit: See:
http://svn.berlios.de/wsvn/codeblocks/branches/xml_compiler/?op=revision&rev=8136&peg=8136
(Only the files editor_configuration.xrc, editorconfigurationdlg.cpp and cbeditor.cpp)
« Last Edit: July 20, 2012, 02:26:46 pm by MortenMacFly »
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ