PatternValue Question

SyntaxEditor for Windows Forms Forum

Posted 11 years ago by Shawn Nanto
Version: 4.0.0274
Avatar
In my custom language the "@" symbol represents a Database Field. It can be expressed as @FieldName or @[Field Name With Spaces].

In my XML is the following token definition:

<PatternGroups>
<RegexPatternGroup TokenKey="FieldToken" Style="FieldStyle" PatternValue="@ {WordMacro}+" LookAhead="{NonWordMacro}|\z" />
</PatterGroups>

Currently the @FieldName is formatted correctly, and identified correctly as a FieldToken, but @[Field Name With Spaces] is not identified correctly.

How should I change the Pattern Value to also allow @[*]?

Thanks,

Shawn Nanto
shawn<at>protelus<..dot..>com

Comments (1)

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Shawn,

You can just make a second pattern group with the same TokenKey and Style but use a pattern that allows your alternate syntax. This way either one will be valid and will appear the same if you parse tokens later.


Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 9 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.