Each token listed with text

SyntaxEditor for Windows Forms Forum

Posted 14 years ago by Joe
Version: 4.0.0285
Hi guys,

I have a further question.
Up to now I use this code to write my parsed document in another file.
Unfortunately that's a string and I can not detect each single token, but that's what I want.
I need something like this:
ActiproSoftware.SyntaxEditor.TokenCollection tokenCollection = this.editor.Document.Tokens;
Here I have all the tokens listed in the correct order. But instead of
"[Simple Token: Identifier (0, 11)]" I'd like to have the correct names like it appears in the document. For example: "[Simple Token: FunctionName (0, 11)]".
Is there a way to do this?


Comments (2)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Joe,

The Tokens give you their type (via Key) but to get the actual document text represented by them you'd have to do a GetSubstring on the document with the token's text range.

Actipro Software Support

Posted 14 years ago by Joe
Thanks a lot!
The latest build of this product (v24.1.0) was released 4 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.