Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: AndiDog on May 19, 2008, 09:47:51 am

Title: C++ Lexer: Coloring error with /** in strings
Post by: AndiDog 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            "*/"
Title: Re: C++ Lexer: Coloring error with /** in strings
Post by: MortenMacFly 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.