Re: Upcoming release
"'Neil Hodgson' via scite-interest" <[email protected]> Tue, 21 May 2024 09:17:52 +1000
| Newsgroups | gmane.editors.scite.general |
|---|---|
| Message-ID | <[email protected]> |
jenny.venus: > i want colorrise label in my script. > it needs to search backward when the lexer working, such as a label, > syntax like efcc2088, this is a hexadecimal number, > and efcc2088: is a label. It's common to set the current state to 'identifier' then when the ':' is seen, call ChangeState to say its really a label. > > I modified the underlying function of lexer to implement the effect before. > I think this approach is not good and I read Some lexer codes, not found any code that implements similar functions > > so I would like to ask you how to implement StyleContext look back. You can examine the previous characters with GetRelative or use the underlying LexAccessor methods like SafeGetCharAt. You can also look at the previously set style with StyleAt and BufferStylesAt. Neil -- You received this message because you are subscribed to the Google Groups "scite-interest" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/scite-interest/9CC4952D-44DF-4C81-AF6D-538025599EF4%40me.com.