Clang error recovery

Walter Bright newshound1 at digitalmars.com
Tue Apr 6 15:59:10 PDT 2010


Brad Roberts wrote:
> Consider trying increasing distances (with some relatively low max).  If 
> you hit a single suggestable correction, substitute it.  ie, for uint64, 
> nothing at 0 or 1, one at 2 (uint64_t) so use it (but still error, 
> obviously).

Of course if you do more distances, pick the shortest match!

> 
> This could be particularly useful for simple 2 letter transpositions, if 
> those are found by the checker.. a common thing for a lot of people for 
> length, for instance.

Transpositions count as 1. See the dmd source file speller.c.



More information about the Digitalmars-d mailing list