Looks like you need to escape your backslash in the comment about trailing ones. I'm sure you weren't concerned with trailing apostrophe esses. :-)
I gave it a quick test spin and I couldn't break it. Well, except for one teensy minor thing: Leaving a quote off the end of a quoted string the highlight spills over to the next line. My g++ will bark about that missing quote, so it seems that the syntax highlight should end with the line, unless other commonly used C++ compilers accept multi-line strings. I've been contemplating various syntactic elements and I think without a trailing '\' the only C++ format that crosses lines is the /* ... */ remark format.
I suppose one could always debate whether the directive highlight should extend beyond the directive. You turned on quote highlighting in there but what about other C++ syntactic elements? For example:
#define MyWonderMacro(WIN) \
WIN *appwin; \
int main(int argc, char **argv) { \
appwin = new WIN(); \
appwin->show(argc, argv); \
return Fl::run(); \
}
OK not very wonderful, but you often see some significant C/C++ code tucked in macros. C++ templates reduce some of that. So... do you highlight the whole as language syntax or paint it in the directive color?
I think my preference would be to limit the directive highlight to the directive itself, and paint the remainder with standard syntax highlights. But others probably have different takes on that.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
[ Direct Link to Message ] |