Discussion:
SCI_SETKEYWORDS - only lower case keywords?
(too old to reply)
Timothy Roughton
2005-03-02 07:41:21 UTC
Permalink
I resently added exact case keywords to my keywords list this coursed
them to not be highlighted, despite the fact that they where typed in
the editor in exact case as they where in the SCI_SETKEYWORDS list, am I
seeing things or does this mean only lower case keywords can be added to
the lexer by lowercase?

Or is there some sort of setting to turn this on?

I'd hoped to use efficentcy, and use the keyword list memory for the
auto completion, however it appears as though I might have to resort to
loading the thing twice.

Regards.
Neil Hodgson
2005-03-02 08:05:51 UTC
Permalink
Post by Timothy Roughton
I resently added exact case keywords to my keywords list this coursed
them to not be highlighted, despite the fact that they where typed in
the editor in exact case as they where in the SCI_SETKEYWORDS list, am I
seeing things or does this mean only lower case keywords can be added to
the lexer by lowercase?
Each lexer is responsible for implementing the rules of its
language. Some languages are case-sensitive (C++, Python) and others
are case-insensitive (Pascal, SQL, Basic variants). For case
insensitive languages, the convention is for the keyword lists to be
entered in lower case for performance and simplicity reasons.
Post by Timothy Roughton
I'd hoped to use efficentcy, and use the keyword list memory for the
auto completion, however it appears as though I might have to resort to
loading the thing twice.
Scintilla copies keyword lists into its own data structure so you
can't save anything.

Neil
Timothy Roughton
2005-03-03 06:26:45 UTC
Permalink
Post by Neil Hodgson
Post by Timothy Roughton
I resently added exact case keywords to my keywords list this coursed
them to not be highlighted, despite the fact that they where typed in
the editor in exact case as they where in the SCI_SETKEYWORDS list, am I
seeing things or does this mean only lower case keywords can be added to
the lexer by lowercase?
Each lexer is responsible for implementing the rules of its
language. Some languages are case-sensitive (C++, Python) and others
are case-insensitive (Pascal, SQL, Basic variants). For case
insensitive languages, the convention is for the keyword lists to be
entered in lower case for performance and simplicity reasons.
Post by Timothy Roughton
I'd hoped to use efficentcy, and use the keyword list memory for the
auto completion, however it appears as though I might have to resort to
loading the thing twice.
Scintilla copies keyword lists into its own data structure so you
can't save anything.
Thanks Neil, perhaps when your not to busy you could amend the docs with
that vital infomation.

Regard

Loading...