News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

C++ Lexer: Coloring error with /** in strings

Started by AndiDog, May 19, 2008, 09:47:51 AM

Previous topic - Next topic

AndiDog

The C++ Lexer recognizes /** inside strings as documentation:

#define TEST1            "/**"

everything in between is doxymentation-colored

#define TEST2            "*/"

MortenMacFly

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:

#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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]