As a fyi for everyone, the tough part of the hilighting code appears to be
somewhat functional.
Screenshot is at (little embracing lines will be dropped but are there for
debugging purposes) :http://www.boekhorst.net/snapshot.bmp
This is not the interesting part - the interesting part is what controls
the hilighting; for that, see the small code attachment.
Tricky parts of the code is partial updating in case of changes and there
are still a few bugs in this area... (Idea being not to re-scan the entire
file for things like multi-line comments, but only that part which, based
on "sound judgement" is "needed").
Also, use of regular expressions has some undesirable consequences in that
finding the start of a line (eg. #ifdef hilighting) is non-trivial and may
require extensions (first line has no newline and cannot thus be used). I
need to work on this.
Finally, benefit of using regexp's, is that hilighting for other languages
becomes a terribly trivial endavour, requiring only a few regexp's to
match the scanner of the language's compiler.
Cheers, Martijn.
ps1. Comments welcome
ps2. Comments containing words "UTF-8, Unicode" will be automatically
filtered and sent to my ignore basket :-) Please, not yet.ps3. hopefully this mail formats itself a bit better....
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
- application/x-unknown-content-type-cfile attachment: excerpt.c
Received on Wed Jun 5 17:14:50 2002