From 6f109184e32450c52a04f480b03d761b62d2bbcf Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Tue, 2 Jun 2020 17:38:07 +0300 Subject: [PATCH] $ op for the specialized Confutils types --- confutils/defs.nim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/confutils/defs.nim b/confutils/defs.nim index b2d8542..47adcd7 100644 --- a/confutils/defs.nim +++ b/confutils/defs.nim @@ -17,9 +17,14 @@ type Unspecified* = object Txt* = object + SomeDistinctString = InputFile|InputDir|OutPath|OutDir|OutFile + template `/`*(dir: InputDir|OutDir, path: string): auto = string(dir) / path +template `$`*(x: SomeDistinctString): string = + string(x) + template desc*(v: string) {.pragma.} template name*(v: string) {.pragma.} template abbr*(v: string) {.pragma.}