On 2012-08-01 10:40, Jonathan M Davis wrote:
It could certainly be added, but unless the lexer always knows it (and I'm pretty sure that it doesn't), then keeping track of that entails extra overhead. But maybe it's worth that overhead. I'll have to look at what I have and see. Worst case, the caller can just use walkLength on str, but if it has to do that all the time, then that's not exactly conducive to good performance.
Doing a syntax highlighter and calculate the length (walkLength) for each token would most likely slow it down a bit.
-- /Jacob Carlborg
