Posted 20 years ago
by Steven Liu
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
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