[QScintilla] What does the "set" argument of "QsciLexer::keywords" stand for ?

Phil Thompson phil at riverbankcomputing.com
Fri Dec 7 16:14:20 GMT 2007


On Friday 07 December 2007, Xavier Noëlle wrote:
> Hi,
> Since I'm writing a new lexer, I need to define this function but I
> don't really understand its first and unique argument.
>
> In qscilexercpp.cpp, it is implemented like that:
> > if (set == 1)
> >    return
> >      "and and_eq asm auto bitand bitor bool break case "
> > [...]
> > if (set == 3)
> >    return
> >     "a addindex addtogroup anchor arg attention author b "
> > [...]
> > return 0;
>
> First I thought that it was related to styles, but it seems that no,
> since in the bash lexer, if set = 1, built-ins and keywords are
> returned, and the style with the "1" value is Error...
> If it is arbitrary, I don't really understand why the set "2" is skipped.
>
> Any precision would be appreciated :-)

They are keyword sets (which start from 1) and have nothing to do with styles. 
How the sets are interpreted, and how many there are, is down to the lexer. 
The values in QScintilla are taken from Scite. Get the Scite source code and 
look at the *.properties files in the src directory.

Phil



More information about the QScintilla mailing list