| Syntax highlighting of prefixes [message #247867] |
Tue, 01 June 2004 08:28  |
Eclipse User |
|
|
|
Originally posted by: pieter.west.NOSPAM.nl
I'm creating an editor with syntax highlighting. This proves not to be
that difficult accept for one part: I would like to be able to highlight
only a prefix of certain words. For example: is_bool
In this case I would like to highlight is_ or at least is_bool. However,
in stead of bool, any (sequence of) character(s) could be attached to the
prefix is_
How can I create a rul for this?
|
|
|
| Re: Syntax highlighting of prefixes [message #248080 is a reply to message #247867] |
Tue, 01 June 2004 17:20  |
Eclipse User |
|
|
|
Originally posted by: strykeleader.hotmail.com
Admittedly, I have only just started learning this stuff, so I could be
wrong, but here's a possibility. You could try creating an IRule that, in
the evaluate, uses the scanner to read in characters until it reaches an
underscore, then checking if that word is a keyword, then return the proper
token type.
- Parhaum
"Pieter" <pieter@west.NOSPAM.nl> wrote in message
news:c9hsps$f6k$1@eclipse.org...
> I'm creating an editor with syntax highlighting. This proves not to be
> that difficult accept for one part: I would like to be able to highlight
> only a prefix of certain words. For example: is_bool
> In this case I would like to highlight is_ or at least is_bool. However,
> in stead of bool, any (sequence of) character(s) could be attached to the
> prefix is_
> How can I create a rul for this?
>
|
|
|
Powered by
FUDForum. Page generated in 0.03371 seconds