spellcheck-tree.c
3.23 KB
-
spellcheck.h: add best_match template; implement early-reject · 6a3f203c
gcc/c/ChangeLog: * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h. gcc/cp/ChangeLog: * search.c: Include spellcheck-tree.h rather than spellcheck.h. gcc/ChangeLog: * spellcheck-tree.c: Include spellcheck-tree.h rather than spellcheck.h. (find_closest_identifier): Reimplement in terms of best_match<tree,tree>. * spellcheck-tree.h: New file. * spellcheck.c (struct edit_distance_traits<const char *>): New struct. (find_closest_string): Reimplement in terms of best_match<const char *, const char *>. * spellcheck.h (levenshtein_distance): Move prototype of tree-based overload to spellcheck-tree.h. (find_closest_identifier): Likewise. (struct edit_distance_traits<T>): New template. (class best_match): New class. From-SVN: r237471
David Malcolm committed