Accessing the ReservedWordToken PatternGroup via code

SyntaxEditor for Windows Forms Forum

Posted 12 years ago by Matthew Smith - Developer, One Plus One Solutions Pty Limited
Version: 4.0.0245
Avatar
Hi,

Using the latest 4.0 version

Sorry for the stupid question. I cannot find how to access the ReservedWordToken Pattern Group via VB.Net so I can inject my own token words. I recently upgraded from v2.5 and just can't find how to do this!!

[Edit: answered myself thanks]

Dim lexicalStates As DynamicLexicalState = language.LexicalStates("DefaultState")
Dim keywordPatternGroup As LexicalPatternGroup = lexicalStates.LexicalPatternGroups("ReservedWorkToken")

Add a 'Key' of ReservedWordToken' your dynamic language

[Modified at 03/10/2007 12:40 AM]

Regards, Matt

Comments (2)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
That indexer runs against the Key property of a LexicalPatternGroup, not the TokenKey. So if you go into the XML definition and add a Key="ReservedWordToken" attribute to the ExplicitPatternGroup tag for reserved words, that should get you going.


Actipro Software Support

Posted 12 years ago by Matthew Smith - Developer, One Plus One Solutions Pty Limited
Avatar
Yep - got that thanks!

Thanks again.

Regards, Matt

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

Add Comment

Please log in to a validated account to post comments.