Also added const as it may as well include type modifiers.
Actually for C++ these are all reserved keywords, so should be in the primary list with the other keywords.
If you are going to include qualifiers then it should include volatile
constinit
constexpr
constexpr
mutable
, and what about alignas
(_Alignas
in C).
But const
and several of those can also be used in non-CV qualification context as well1, so since Scintilla can't detect context they will be wrongly coloured in one context or the other. Only treating them as a keyword is context free and fits the Scintilla model.
So separating some keywords from others is not the right thing to do for C++, so this PR should not happen.
Might be ok for C since it tends not to re-use keywords in more than one context, but C23 adds a lot more built-in types, see but again they are keywords.
C++ has a tendency to re-use keywords in other contexts rather than defining new keywords that might clash with valid
names in existing code. So over time many keywords are becoming more than one thing (not to mention words that are
keywords only in contexts where user names are illegal, eg override
in:
struct S {
int override;
virtual int foo() = 0;
};
struct DS : public S {
int foo() override { override = 1; return 2; }
};
Geany shows all cases of override
as keyword, but VScode shows only the override
after foo()
as a keyword, and the others as member variables. Thats something the current Geany/uctags/Scintilla combination can't handle).
And C++ avoids using the ugly _Caps
that C does.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.