I was wondering about performance issues when parsing a source file that is being edited by the user (for example, when you need to give a syntax highlight).
I think that the simplest approach is to parse every time the code changes, get the results, and replace the current code with the highlighted one. With large files this may be a problem though. Is there a better way to do that?
I suppose a solution may be to parse just the "area" where there was the last edit. Is this a good idea?