Using Scintilla in IUP

45 views
Skip to first unread message

Milind Gupta

unread,
Jun 15, 2016, 11:20:46 PM6/15/16
to scintilla-interest
Hi,
I am using Scintilla in the GUI toolkit IUP (http://webserver2.tecgraf.puc-rio.br/iup/).

I am using the lexer to color the text. I am using the lexer for the Lua Language.
If I have 'table' in the keywords set then if I write 'table' in the editor it colors it right. If I write 'table:hello' it again colors 'table' correctly. But if I write 'table.unpack' then it does not color table properly. How can I make the '.' also respect the lexer color scheme?

In the current toolkit release it uses Scintilla version 3.6.2. Any help and guidance would be appreciated.

Thanks,
Milind

KHMan

unread,
Jun 15, 2016, 11:55:29 PM6/15/16
to scintilla...@googlegroups.com
They are using different styles. In Scintilla, primary keywords
uses SCE_LUA_WORD. Try SciTE, I think 'table' uses SCE_LUA_WORD2
while 'table.unpack' uses SCE_LUA_WORD3.

For 'table.unpack', the lexer will match 'table.unpack' but not
'table'. So you need to have a keyword entry for 'table.unpack'.
The intention I guess was to allow different styling for library
functions, and so that the user can uniquely style own libraries
as well by adding to the property lists.

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia

Milind Gupta

unread,
Jun 16, 2016, 1:16:13 PM6/16/16
to scintilla-interest
Thank you for explaining that.

Regards,
Milind
Reply all
Reply to author
Forward
0 new messages