On Wed, Jun 24, 2009 at 10:45 AM, Edward K. Ream <edream...@gmail.com>wrote:
> > That's all for now. I was hoping that writing this would > spur some new ideas. It may happen, but not yet :-) I'm beginning to get the sense that supporting delegates directly might not be too hard. It's related to the mental trick that created the Aha of using restarters: namely, just pretend that a simple, straightforward solution exists, and then look for it :-) In this case, we can tell whether a delegate extends past the present line by having it return len(s) + 1 when it has started matching a cross-line pattern. In that case, we remain in the *delegated* stated. Otherwise, we continue in the *delegator* (caller) state. For example, the difference between: #define WIPEOUT 0 /* * comment line 1. and #define /* comment */ WIPEOUT 0 is that the delegate returns len(s) + 1 in the first case and n < len(s) in the second. It might work. Another way of thinking of this is that no matter what is happening, we are "really" only colorizing the current line. It should be simply a matter of keeping track of what colorizing state we are in, and passing that state to qt at the end of the line :-) Edward --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~----------~----~----~----~------~----~------~--~---