Ternary Operators + Coloring Patterns [message #272728] |
Mon, 27 September 2004 05:32 |
Eclipse User |
|
|
|
Originally posted by: leo.nowhere.com
We have in our project already implemented some kind of coloring patterns.
This works quite fine, as long as we use only two operators and is
implemented like
pat = new PatternRule(span.getStart(), span.getEnd(), defaultToken,
mode.getDefaultRuleSet().getEscape(), false, true);
A ternary operator would look like
<s/></></>
And here I have the difficulties. I have already tried to split it simply
into two parts like
<s/></> and </></>
but this naturally leads to two // which are not required in the
language-spec.
I thought about specifing the .getEnd() with another Rule but this does
not hit the point. So, has anybody an idea, how to create a Pattern for a
ternary Operator?
|
|
|
Powered by
FUDForum. Page generated in 0.03902 seconds