Close a scope in code

SyntaxEditor for Windows Forms Forum

Posted 20 years ago by Steven Liu
Avatar
I encountered a number of difficulties when dealing with scopes that does not have explicit closing keyword. I found that sometimes the end result depends on the internal logic of SyntaxEditor. e.g. when multiple scopes have overlapping closing pattern, which one takes precedence? It may not behave as I expected.

I begin to think that a better approach may be to use code to fine tune the behavior. I want to define a coarse pattern (such as "\n") to close the scope in syntax definition. Then at runtime, each closing scope match will trigger an event, so I can write code in the event handler to decide whether I really want to close the scope, by looking ahead into the token stream and do complex conditional processing. Something like "SyntacticalParser" as opposed to "SemanticParser".

Is there a way to do that now, or something to be considered in future release?
Steven

Comments (3)

Posted 20 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Right now there isn't a way to do that. I'll add that to our TODO list though.


Actipro Software Support

Posted 18 years ago by Steven Liu
Avatar
Hi,
I am wondering if 4.0 has this feature.
Steven
Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Not built into dynamic (v3.1 style) languages. However if you write a programmatic lexical parser (new in v4.0) I believe you can do this. You can download the beta to try it out.


Actipro Software Support

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.