|
From: | Michael Terry |
Subject: | Re: [Beaver-devel] Syntax Highlighting |
Date: | Fri, 21 Mar 2003 13:32:20 -0500 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030319 |
Leslie Polzer wrote:
So, I have a record of every ascii character's keyword status -- whether it appears in a keyword, whether it starts a keyword, or whether it ends a keyword. I go backward from start iter to find first character that isn't in a keyword or the first delimiter. The same for end iter, except I always go at least one forward, I think.Seems expensive.
Not really. The lookups are cheap (in a 256-size array), and it only usually expands until a whitespace.
If the character starts a 'special string' like a string or char marker, a line comment starter, or a block comment start or end, it creates a GtkTextMark and adds it to a list for the buffer.I suppose we could do brace matching with this...?
Yeah, I anticipated doing something similar. Probably with its own GtkTextMark stack, but yeah.
That's the basic idea. Want any more info?Kind of. Are you going to put that syntax highlighting stuff into a separate file?
Oh, I didn't know I was in charge of that. :) Sure, I can do that sometime. But, today isn't a good day for it -- I can get to it tomorrow.
-mt
pgpGd_wIH6GeQ.pgp
Description: PGP signature
[Prev in Thread] | Current Thread | [Next in Thread] |