Comment -> Exclude Pattern

SyntaxEditor for Windows Forms Forum

Posted 17 years ago by Christian Söllig
Version: 1.0.68
Avatar
Hello,

i work with the demo from SyntaxEditor.
It's a very nice Control.

I have only one Problem.
The Custom Language from my Company has as Comment-Sign "!".

But wo also use for instance " i != 100".

So the Color from != 100 are green, this shouldn't be.

How i can realize this?

The Comments Section in my Language XML looks so:

<State Key="CommentState" TokenKey="CommentDefaultToken" Style="CommentDefaultStyle">

<Scopes>
<Scope>
<RegexPatternGroup Type="StartScope" TokenKey="CommentStartToken" Style="CommentDelimiterStyle" PatternValue="!" />
<RegexPatternGroup Type="EndScope" TokenKey="CommentStartToken" Style="CommentDelimiterStyle" PatternValue="['\n]" />
</Scope>
</Scopes>

<PatternGroups>
<RegexPatternGroup TokenKey="CommentDefaultToken" PatternValue="!" />
</PatternGroups>
</State>

Greetings,
Christian Soellig

P.S. Sorry about by bad english.

Comments (2)

Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Christian,

I don't recall if v1.0 supported look-aheads yet but if it does, you can add something like this to your start scope:
LookAhead="[^=]"


Actipro Software Support

Posted 17 years ago by Christian Söllig
Avatar
thanks...it works very nice.
The latest build of this product (v24.1.0) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.