Author Topic: C++ Lexer: Coloring error with /** in strings  (Read 4651 times)

Offline AndiDog

  • Single posting newcomer
  • *
  • Posts: 6
C++ Lexer: Coloring error with /** in strings
« on: May 19, 2008, 09:47:51 am »
The C++ Lexer recognizes /** inside strings as documentation:

Code
#define TEST1            "/**"

everything in between is doxymentation-colored

#define TEST2            "*/"

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: C++ Lexer: Coloring error with /** in strings
« Reply #1 on: May 19, 2008, 05:15:11 pm »
That is a bug in the wxScintilla component we are using. As a workaround you can simply escape one or more of the characters (as it's a string) like:
Code
#define BLAH "\/\*\*"
    cout << "Hello world!" << BLAH << endl;
#define BLUBB "*\/"
You will receive a compiler warning about an unknown escape sequence but you can safely igonere it.
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