On Mon, 11 Jun 2007, Allan Odgaard wrote:
So the problem boils down to, given just the first line of a construct, can you say what the construct is? In C you sometimes can’t, in most other languages you generally can.
How about scanning the file backwards from the insertion point to find the start of a multi-line construct whenever the parser finds itself in ambiguous territory?
How does it currently handle things like double-quoted strings or '/*' comments spanning lines?