Hi,
Dje asked to highlight only words with same case.
I use cb for c++ and vhdl development. VHDL is not not case sensitive, c++ is case sensitive.
Would it not be nice to store some info about the language together with the lexer configuration?
Example for c/c++ configuration:
<LanguageAttributes
LineComment="//"
StreamCommentStart="/*"
StreamCommentEnd="*/"
BoxCommentStart="/* "
BoxCommentMid=" * "
BoxCommentEnd=" */"
CaseSensitive="1"/>
And define an interface (like the colorset) to get these information during runtime.
(something like Manager::Get()->GetEditorManager()->GetLanguageAttributeSet()->GetCommentToken(lang) )
So we have not to change main.cpp from cb for every new language and the plugins/app can also get these information:
- Occurrence highlighting likes to know if the language is case sensitive or not
- Code Statistics only collects these infos about file comments in its config dialog
- For the todo plugin it should be relatively easy to generate a dynamic line parser (boost::spirit) to find the todos not only in c/c++ files
- Other things we don't know yet.
What do you think?
regards daniel