On Sun, Aug 2, 2009 at 9:30 PM, Walter Bright<[email protected]> wrote: > Chad J wrote: >> >> This makes things more difficult for syntax highlighters. A number of >> them will just not work correctly because they don't actually parse the >> code. > > That's true. Another thing keywords provide are "anchors" that enable better > error recovery.
I've often wondered about how useful parser recovery really is. Most of the time, parsing errors after the first are complete bull anyway, so the compiler's just filling up my console with garbage. If you combine that with the fact that recompiles are extremely cheap with D and modern machines, and that D's module organization limits the scope of parsing errors to a single file (instead of with C/C++, where a parsing error in a header can cascade into a number of following headers and the source), I wonder how useful it really is to continue to try to parse after the first error.
