I sure hope this is a duplicate, since that would mean at least a few more people were annoyed by it :)
The c++11 standard introduced the "final" keyword to force classes to become leaf classes (i.e., subclassing them will cause errors at compile time). Geany 1.23 (git >= 306eaab) does not handle this keyword properly. In any class definition,
class SomeClass final : public scope::SomeBaseClass<templateArgs> {
....
};
or even as simple as
class SomeClass final {
...
};
Geany will highlight the "final" keyword, but not the class name. This erroneous highlighting is propagated to all other files in the project, e.g., "SomeClass" will not be highlighted anywhere else when used. This strikes me as somewhat strange, since autocompletion of the classname seems to work without any hickups.
I use Geany 1.23 (git >= 306eaab), Ubuntu Linux 11.04, kernel 2.6.38-13 (no, I am not allowed to upgrade :)
c++ syntax highlighting failure with "final"
No this isn't a duplicate.
The simple fact is that neither the Scintilla lexer or the symbol parser is C++11 compliant, so both are likely to be confused by the extra keyword after the "class xxx" (and other more complicated places it is allowed).
Patches are welcome.
This is now fixed in Git, thanks for reporting!
@elextr: I don't think Scintilla have any problem here, the missing highlight comes from ctags not parsing the class so we don't register it as a type.
Now fixed in Git, thanks for reporting.