mirror of
https://github.com/status-im/nim-confutils.git
synced 2025-01-21 01:18:59 +00:00
Hidden configuration fields (initial faux version)
This commit is contained in:
parent
f9415621f8
commit
39456fa3d5
@ -588,6 +588,9 @@ proc generateFieldSetters(RecordType: NimNode): NimNode =
|
||||
var settersArray = newTree(nnkBracket)
|
||||
|
||||
for field in recordFields(recordDef):
|
||||
if field.readPragma("hidden") != nil:
|
||||
continue
|
||||
|
||||
var
|
||||
setterName = ident($field.name & "Setter")
|
||||
fieldName = field.name
|
||||
@ -649,6 +652,9 @@ proc cmdInfoFromType(T: NimNode): CmdInfo =
|
||||
fieldIdx = 0
|
||||
|
||||
for field in recordFields(recordDef):
|
||||
if field.readPragma("hidden") != nil:
|
||||
continue
|
||||
|
||||
let
|
||||
isImplicitlySelectable = field.readPragma"implicitlySelectable" != nil
|
||||
defaultValue = field.readPragma"defaultValue"
|
||||
|
@ -49,6 +49,7 @@ template defaultValue*(v: untyped) {.pragma.}
|
||||
template required* {.pragma.}
|
||||
template command* {.pragma.}
|
||||
template argument* {.pragma.}
|
||||
template hidden* {.pragma.}
|
||||
template inlineConfiguration* {.pragma.}
|
||||
|
||||
template implicitlySelectable* {.pragma.}
|
||||
|
Loading…
x
Reference in New Issue
Block a user