In LexCPP.cpp I added:
In colourisecppdoc():
        WordList &keywords5 = *keywordlists[4];
        WordList &keywords6 = *keywordlists[5];
        WordList &keywords7 = *keywordlists[6];
        WordList &keywords8 = *keywordlists[7];
        WordList &keywords9 = *keywordlists[8];
        WordList &keywords10 = *keywordlists[9];

Then in the switch:

                                        else
                                        if (keywords4.InList(s))
                                        {
                                                
sc.ChangeState(SCE_C_GLOBALCLASS);
                                        }
                                        
                                        // 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                                        // added from here
                                        // 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

                                        else
                                        if (keywords5.InList(s))
                                        {
                                                sc.ChangeState(SCE_C_BASETYPE);
                                        }
                                        else
                                        if (keywords6.InList(s))
                                        {
                                                
sc.ChangeState(SCE_C_INSTRUCTION);
                                        }
                                        else
                                        if (keywords7.InList(s))
                                        {
                                                sc.ChangeState(SCE_C_MODIFIER);
                                        }
                                        else
                                        if (keywords8.InList(s))
                                        {
                                                
sc.ChangeState(SCE_C_CLASSRELATED);
                                        }
                                        else
                                        if (keywords9.InList(s))
                                        {
                                                sc.ChangeState(SCE_C_MISC);
                                        }
                                        else
                                        if (keywords10.InList(s))
                                        {
                                                sc.ChangeState(SCE_C_OPERTEXT);
                                        }
                                        // add end
                                        
                                        sc.SetState(SCE_C_DEFAULT);

I also added all SCE_C_* in SciLexer.h, from 20 to 25.

Now it just crashes, segfault apparently.

On Tue, Nov 9, 2010 at 12:45, Jonas O. <[email protected]> wrote:
> Yes I already looked, but there are a lot of if/else in a long switch,
> and that's hard to read (or at least to me), I'm not used to inlined
> curly brackets... (like "if(true) {" or "} else if {")
>
> I'll try to tweak the code and recompile, but I feel like I'm gonna
> break everything...
>
> On Mon, Nov 8, 2010 at 23:32, Phil Thompson <[email protected]> 
> wrote:
>> On Mon, 8 Nov 2010 23:24:16 +0100, "Jonas O." <[email protected]> wrote:
>>> Any clue to what I should modify (I don't intend to keep to myself
>>> anyway...) ?
>>
>> Have you actually looked? It's easy enough to follow how the lexer uses
>> keywords - search for "keywords" in LexCPP.cpp.
>>
>> Phil
>>
>
_______________________________________________
QScintilla mailing list
[email protected]
http://www.riverbankcomputing.com/mailman/listinfo/qscintilla

Reply via email to