This commit is contained in:
Flaviu Tamas 2018-11-18 20:25:59 -05:00
commit 22b3e9df27
No known key found for this signature in database
GPG key ID: D6BF32C876496756
4 changed files with 16 additions and 12 deletions

View file

@ -10,7 +10,11 @@ proc fget*[K, V](self: Table[K, V], key: K): V =
const Ident = {'a'..'z', 'A'..'Z', '0'..'9', '_', '\128'..'\255'}
const StartIdent = Ident - {'0'..'9'}
template checkNil(arg: string): string = arg
proc checkNil(arg: string): string =
if arg == nil:
raise newException(ValueError, "Cannot use nil capture")
else:
return arg
template formatStr*(howExpr, namegetter, idgetter): untyped =
let how = howExpr