[Lazarus] SynEdit - SQL highlighter with $ in keywords

Gerd Sager lists-gsa at bg-gs.de
Sun Nov 10 19:51:17 CET 2019


Am Sun, 10 Nov 2019 14:33:03 +0100
schrieb Gabor Boros via lazarus <lazarus at lists.lazarus-ide.org>:

> Hi All,
> 
> I try to extend TSynSQLSyn with keyword lists of Firebird 2.5, 3.0
> and 4.0. Every keyword included in one list/version and used as tKey
> (e.g. sqlFirebird30: EnumerateKeywords(Ord(tkKey), Firebird30KW,
> IdentChars, @DoAddKeyword);). Some keywords contains a $ sign
> (RDB$DB_KEY, RDB$GET_CONTEXT, RDB$RECORD_VERSION, RDB$SET_CONTEXT).
> If I try to use the new highlighters got "Keyword "RDB" already in
> list with value "sqlFirebird30"". (I tried with actual trunk.) Any
> idea why and how to solve the problem?
> 
> Gabor

Hi Gabor,

have a look at the implementation of TSynSQLSyn.GetIdentChars().

You could add somthing like

  if fDialect = sqlFirebird30 then
    Include(Result, '$');

Gerd


More information about the lazarus mailing list