Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: killerbot on April 13, 2015, 04:07:59 pm

Title: code coloring changed and incorrect for keyword "override"
Post by: killerbot on April 13, 2015, 04:07:59 pm
the keyword "override" is no longer coloured.

Could be this problem is present for some time, today updated a pc to trunk (last time that one was updated was months ago) , back then override was nicely "blue" coloured.
Title: Re: code coloring changed and incorrect for keyword "override"
Post by: oBFusCATed on April 13, 2015, 07:39:29 pm
Check the c++ lexer related files. Probably someone has removed it from one of the keywords lists.
Title: Re: code coloring changed and incorrect for keyword "override"
Post by: MortenMacFly on April 13, 2015, 08:57:01 pm
Probably someone has removed it from one of the keywords lists.
Its not there. I also can't remember that is has been there at all. Maybe you did it manually within C::B (changing/extending the lexer keywords I mean)?
Title: Re: code coloring changed and incorrect for keyword "override"
Post by: killerbot on April 23, 2015, 12:25:15 am
I still have a system on rev 10053 (24 dec 2014), and there the override keyword is still nicely blue coloured.
Title: Re: code coloring changed and incorrect for keyword "override"
Post by: MortenMacFly on April 23, 2015, 04:48:29 am
Ok, then you know what to do... :-)
Title: Re: code coloring changed and incorrect for keyword "override"
Post by: killerbot on April 23, 2015, 10:28:52 am
Yes, i do. i Will be back ...
Title: Re: code coloring changed and incorrect for keyword "override"
Post by: Jenna on April 25, 2015, 09:28:39 am
http://sourceforge.net/p/codeblocks/code/10132/
Title: Re: code coloring changed and incorrect for keyword "override"
Post by: killerbot on April 25, 2015, 12:22:04 pm
Thanks, @thomas, what was the rationale of kicking 'final, override' out of the list ?
Title: Re: code coloring changed and incorrect for keyword "override"
Post by: thomas on April 25, 2015, 02:48:30 pm
Unintentional, please feel free to re-add these!

I first added noexcept because it was really annoying that this one wasn't highlighted. Doing that, I stumbled over the obsolete N2018 types and corrected these to the final standard ones, and promptly detected the obsolete proposal align_union which I removed.

Then I said to myself, well, that is all nice and good, but there's already so many things, let's make sure no other mistake has creeped in.

So I tossed it all overboard and took the complete list of valid keywords (including one reserved keyword) from the standard. This is where override and final got unintentionally dropped. Happens that they aren't keywords at all, but obviously one would want to color them as such anyway. Sorry about that.
Title: Re: code coloring changed and incorrect for keyword "override"
Post by: oBFusCATed on April 25, 2015, 06:37:27 pm
They're context-aware-keywords or something like this.
This is done in order to not break code which uses override/final for identifier/function names. :)
Title: Re: code coloring changed and incorrect for keyword "override"
Post by: killerbot on April 26, 2015, 10:57:39 pm
fixed on trunk