You 're right. You see, C::B evolved much faster than I would expect it to and now we 're trying to catch up
I don't think it should be done using the lexers. We shouldn't mix the editor and compiler configuration like this.
What we could do is have a different configuration file, parsed at the beginning, specifying the file types.
E.g.:
<FileTypes>
<File type="ftSource"
name="C source"
ext="*.c"
compile="1"
link="1"
compiler="CC">
<File type="ftHeader"
name="C header"
ext="*.h"
compile="0"
link="0"
compiler="CC">
<File type="ftSource"
name="C++ source"
ext="*.cc,*.cpp.*.c++,*.cxx"
compile="1"
link="1"
compiler="CPP">
<File type="ftHeader"
name="C++ header"
ext="*.hh,*.hpp.*.h++,*.hxx"
compile="0"
link="0"
compiler="CPP">
</FileTypes>
This way, C::B could be extended to understand more about a file by editing this config file.
What do you think?
Yiannis.