I have been always tinkering with ways of syntax highlighting. and Have wondered a main thing in general. When the highlighting procedure triggers should a object(being the part of text to highlight) be checked to see if it has been colored already? Or should it just be ignored and treated like it wasn't?
Checking beforehand often prevents flickering of interfaces. It sort of depends on how often you run the highlight scanner.