Index
Modules:
argparse
,
argparse/backend
,
argparse/filler
,
argparse/macrohelp
.
API symbols
`$`:
backend: `$`(b: Builder): string
backend: `$`(state: ref ParseState): string
add:
macrohelp: add(n: ref UnfinishedCase; opt: int; body: NimNode)
macrohelp: add(n: ref UnfinishedCase; opt: NimNode; body: NimNode)
macrohelp: add(n: ref UnfinishedCase; opt: seq[NimNode]; body: NimNode)
macrohelp: add(n: ref UnfinishedCase; opts: seq[string]; body: NimNode)
macrohelp: add(n: ref UnfinishedCase; opt: string; body: NimNode)
macrohelp: add(n: ref UnfinishedIf; cond: NimNode; body: NimNode)
add_command:
backend: add_command(name: string; group: string; content: proc ())
addElse:
macrohelp: addElse(n: ref UnfinishedCase; body: NimNode)
macrohelp: addElse(n: ref UnfinishedIf; body: NimNode)
addObjectField:
macrohelp: addObjectField(objtypedef: UnfinishedObjectTypeDef; name: string; kind: NimNode)
macrohelp: addObjectField(objtypedef: UnfinishedObjectTypeDef; name: string; kind: string; isref: bool = false)
addParser:
backend: addParser(name: string; group: string; content: proc ()): Builder
add_runProc:
backend: add_runProc(body: NimNode)
allChildren:
backend: allChildren(builder: Builder): seq[Builder]
arg:
argparse: arg(varname: string; default = none(); env = ""; help = ""; nargs = 1)
ArgArgument:
ComponentKind.ArgArgument
ArgFiller:
filler: ArgFiller
ArgFlag:
ComponentKind.ArgFlag
ArgOption:
ComponentKind.ArgOption
ARGPARSE_STDOUT:
backend: ARGPARSE_STDOUT
Builder:
backend: Builder
BuilderObj:
backend: BuilderObj
builderStack:
backend: builderStack
channels:
filler: channels(filler; nargs: int): seq[FillChannel]
clear:
macrohelp: clear(point: InsertionPoint): int
command:
argparse: command(name: string; group: string; content: untyped): untyped
argparse: command(name: string; content: untyped): untyped
Component:
backend: Component
ComponentKind:
backend: ComponentKind
consume:
backend: consume(state: ref ParseState; thing: ComponentKind)
FillChannel:
filler: FillChannel
finalize:
macrohelp: finalize(n: ref UnfinishedCase): NimNode
macrohelp: finalize(n: ref UnfinishedIf): NimNode
flag:
argparse: flag(name1: string; name2 = ""; multiple = false; help = ""; hidden = false; shortcircuit = false)
generate:
filler: generate(filler; containerName: string): NimNode
generateDefs:
backend: generateDefs(builder: Builder): NimNode
GenResponse:
backend: GenResponse
getHelpText:
backend: getHelpText(b: Builder): string
getInsertionPoint:
macrohelp: getInsertionPoint(node: var NimNode; name: string): InsertionPoint
hasElse:
macrohelp: hasElse(n: ref UnfinishedCase): bool
hasVariableArgs:
filler: hasVariableArgs(filler): bool
hasWildcard:
filler: hasWildcard(filler): bool
help:
argparse: help(helptext: string)
helpProcDef:
backend: helpProcDef(b: Builder): NimNode
ident:
macrohelp: ident
isValid:
macrohelp: isValid(n: ref UnfinishedCase): bool
macrohelp: isValid(n: ref UnfinishedIf): bool
minArgs:
filler: minArgs(filler): int
missing:
filler: missing(filler; nargs: int): seq[string]
newArgFiller:
filler: newArgFiller(): ref ArgFiller
newBuilder:
backend: newBuilder(name = ""): Builder
newCaseStatement:
macrohelp: newCaseStatement(key: NimNode): ref UnfinishedCase
macrohelp: newCaseStatement(key: string): ref UnfinishedCase
newIdentNode:
macrohelp: newIdentNode
newIfStatement:
macrohelp: newIfStatement(): ref UnfinishedIf
newObjectTypeDef:
macrohelp: newObjectTypeDef(name: string; isref: bool = false): UnfinishedObjectTypeDef
newParser:
argparse: newParser(name: string; body: untyped): untyped
argparse: newParser(body: untyped): untyped
newParseState:
backend: newParseState(args: openArray[string]): ref ParseState
nimRepr:
macrohelp: nimRepr(n: NimNode): string
nohelpflag:
argparse: nohelpflag()
numArgsAfterWildcard:
filler: numArgsAfterWildcard(filler): int
option:
argparse: option(name1: string; name2 = ""; help = ""; default = none(); env = ""; multiple = false; choices: seq[string] = @[]; required = false; hidden = false)
Optional:
SlotKind.Optional
optional:
filler: optional(filler; argname: string)
optsTypeDef:
backend: optsTypeDef(b: Builder): NimNode
parentOf:
macrohelp: parentOf(node: NimNode; child: NimNode): InsertionPoint
macrohelp: parentOf(node: NimNode; name: string): InsertionPoint
parseProcDef:
backend: parseProcDef(b: Builder): NimNode
parserTypeDef:
backend: parserTypeDef(b: Builder): NimNode
ParseState:
backend: ParseState
popleft:
backend: popleft[T](s: var seq[T]): T
popright:
backend: popright[T](s: var seq[T]; n = 0): T
raiseShortCircuit:
backend: raiseShortCircuit(flagname: string; help: string)
replace:
macrohelp: replace(point: InsertionPoint; newnode: NimNode)
replaceNodes:
macrohelp: replaceNodes(ast: NimNode): NimNode
Required:
SlotKind.Required
required:
filler: required(filler; argname: string; nargs = 1)
run:
argparse: run(body: untyped): untyped
setOrAdd:
backend: setOrAdd(x: var seq[string]; val: string)
backend: setOrAdd(x: var string; val: string)
ShortCircuit:
backend: ShortCircuit
skip:
backend: skip(state: ref ParseState)
SlotKind:
filler: SlotKind
toVarname:
backend: toVarname(x: string): string
UnfinishedCase:
macrohelp: UnfinishedCase
UnfinishedObjectTypeDef:
macrohelp: UnfinishedObjectTypeDef
upperBreakpoint:
filler: upperBreakpoint(filler): int
UsageError:
backend: UsageError
Wildcard:
SlotKind.Wildcard
wildcard:
filler: wildcard(filler; argname: string)