Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2019-11

SynEdit - SQL highlighter with $ in keywords

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Gabor Boros

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

Reply by email

Gerd Sager
to Gabor Boros

Am Sun, 10 Nov 2019 14:33:03 +0100
schrieb Gabor Boros via lazarus :

Show quoted text 12 lines
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

Reply by email

Gabor Boros
to Gerd Sager

2019. 11. 10. 19:51 keltezéssel, Gerd Sager via lazarus írta:

Show quoted text 10 lines
Hi Gabor, have a look at the implementation of TSynSQLSyn.GetIdentChars(). You could add somthing like if fDialect = sqlFirebird30 then Include(Result, '$'); Gerd

Works like a charm. Thank you very much Gerd!

Gabor

Reply by email