nimsuggest: chk checks the full project lazily; much better suggestions orderings

This commit is contained in:
Andreas Rumpf 2017-03-08 00:38:48 +01:00
commit 91a4b448fd
8 changed files with 164 additions and 68 deletions

View file

@ -12,9 +12,9 @@ from strutils import toLowerAscii
type
PrefixMatch* {.pure.} = enum
None, ## no prefix detected
Prefix, ## prefix does match the symbol
Substr, ## prefix is a substring of the symbol
Abbrev ## prefix is an abbreviation of the symbol
Substr, ## prefix is a substring of the symbol
Prefix, ## prefix does match the symbol
proc prefixMatch*(p, s: string): PrefixMatch =
template eq(a, b): bool = a.toLowerAscii == b.toLowerAscii