Index
Modules:
union
,
union/astutils
,
union/ortraits
,
union/typeutils
,
union/uniontraits
.
API symbols
`$`:
union: proc `$`[T: Union](u: T): string
`*`:
uniontraits: proc `*`(a, b: UnionTy): seq[NimNode]
`<-`:
union: template `<-`[T; U: Union](dst: var U; src: T): untyped
`==`:
union: proc `==`[U, V: Union](a: U; b: V): bool
union: template `==`[T: not Union; U: Union](x: T; u: U): untyped
union: template `==`[T: not Union; U: Union](u: U; x: T): untyped
ortraits: proc `==`(a, b: OrTy): bool
uniontraits: proc `==`(a: typeof(nil); b: UnionTy): bool
uniontraits: proc `==`(a: UnionTy; b: typeof(nil)): bool
`as`:
union: macro `as`(x: typed; U: typedesc[Union]): untyped
union: macro `as`[U: Union](x: U; T: typedesc): untyped
union: macro `as`[U, V: Union](x: U; T: typedesc[V]): untyped
`of`:
union: macro `of`[U: Union](x: U; T: typedesc): bool
union: macro `of`[U, V: Union](x: U; T: typedesc[V]): bool
add:
ortraits: proc add(o: OrTy; n: NimNode)
ortraits: proc add(o: OrTy; an: openArray[NimNode])
ortraits: proc add(o: OrTy; n: OrTy)
uniontraits: proc add(u: UnionTy; enm, typ: NimNode)
applyLineInfo:
astutils: proc applyLineInfo(n, info: NimNode): NimNode
contains:
ortraits: proc contains(o: OrTy; n: NimNode): bool
ortraits: proc contains(a: OrTy; b: OrTy): bool
uniontraits: proc contains(u: UnionTy; n: NimNode): bool
uniontraits: proc contains(a, b: UnionTy): bool
uniontraits: macro contains[U, V: Union](A: typedesc[U]; B: typedesc[V]): bool
uniontraits: macro contains(U: typedesc[Union]; T: typedesc): bool
convertible:
union: macro convertible(T: typedesc[Union]): untyped
currentType:
uniontraits: macro currentType[T: Union](x: T): untyped
desym:
astutils: proc desym(n: NimNode): NimNode
exprFilter:
astutils: proc exprFilter(n: NimNode; fn: FilterFn): NimNode
filter:
astutils: proc filter(n: NimNode; fn: FilterFn): NimNode
FilterFn:
astutils: type FilterFn
getOrType:
ortraits: proc getOrType(n: NimNode): OrTy
getTypeImplSkip:
typeutils: proc getTypeImplSkip(n: NimNode; skip = Skippable): NimNode
getTypeInstSkip:
typeutils: proc getTypeInstSkip(n: NimNode; skip = SkippableInst): NimNode
getTypeSkip:
typeutils: proc getTypeSkip(n: NimNode; skip = Skippable): NimNode
getUnionType:
uniontraits: proc getUnionType(n: NimNode): UnionTy
getVariant:
uniontraits: proc getVariant(u: UnionTy; n: NimNode): Option[tuple[enm, field, typ: NimNode]]
hasCommonTypes:
uniontraits: macro hasCommonTypes[U, V: Union](A: typedesc[U]; B: typedesc[V]): bool
hash:
astutils: proc hash(n: NimNode): Hash
instantiation:
ortraits: proc instantiation(o: OrTy): NimNode
isNil:
uniontraits: proc isNil(u: UnionTy): bool
isUnionTy:
uniontraits: proc isUnionTy(n: NimNode): bool
makeUnion:
union: macro makeUnion(expr: untyped): untyped
multiReplace:
astutils: proc multiReplace(n: NimNode; replacements: varargs[tuple[orig, replace: NimNode]]): NimNode
newTypedesc:
typeutils: proc newTypedesc(n: NimNode): NimNode
newUnionType:
uniontraits: proc newUnionType(enumType: NimNode): UnionTy
numTypes:
ortraits: proc numTypes(o: OrTy): int
OrTy:
ortraits: type OrTy
sameType:
typeutils: proc sameType(a, b: NimNode): bool
uniontraits: proc sameType(a: NimNode; b: UnionTy): bool
uniontraits: proc sameType(a: UnionTy; b: NimNode): bool
Skippable:
typeutils: const Skippable
SkippableInst:
typeutils: const SkippableInst
toNimNode:
ortraits: converter toNimNode(n: OrTy): NimNode
typeAt:
ortraits: proc typeAt(o: NimNode; idx: Natural): NimNode
typeField:
uniontraits: proc typeField(u: UnionTy): NimNode
types:
ortraits: iterator types(o: OrTy): NimNode
union:
union: template union(T: untyped): untyped
Union:
uniontraits: object Union
UnionTy:
uniontraits: type UnionTy
unpack:
union: macro unpack[T: Union](u: T; body: untyped): untyped
union: macro unpack[T: Union](u: T; ident, body: untyped): untyped
variants:
uniontraits: iterator variants(u: UnionTy): tuple[enm, field, typ: NimNode]