Types
Call = distinct NormNode
- opaque sum: call node of some variety, see macros.CallNodes and macros.nnkCallKinds Source Edit
CallKind = Call
- opaque sum: call node of some variety, see macros.nnkCallKinds, this is an alias as it's not really useful to distinguish the two. Source Edit
DefLike = IdentDefLike | DefVarLet | TupleDefVarLet
- abstract over any IdentDef or VarTuple from a VarLet or a RoutineParam Source Edit
FormalParams = distinct NormNode
- formal params for a routine, includes return param, then calling params Source Edit
IdentDef = distinct NormNode
- currently this is nnkIdentDefs mostly in a var let section, in reality these are also for routine and generic param definitions. A normalized IdentDef should only have one identifier. Source Edit
IdentDefLet = distinct IdentDefVarLet
- opaque sum: identdef defintion from a let section Source Edit
IdentDefLike = IdentDef | RoutineParam | IdentDefVarLet | IdentDefLet | IdentDefVar
- abstract over a single var or let sections IdentDef, or a routine param definition Source Edit
IdentDefVar = distinct IdentDefVarLet
- opaque sum: identdef defintion from a var section Source Edit
IdentDefVarLet = distinct DefVarLet
- opaque sum: identdef defintion from a var or let section Source Edit
LetIdentDef = distinct VarLetIdentDef
- a let section with a single nnkIdentDefs, never a vartuple Source Edit
LetSection = distinct VarLet
- a let section, with a single nnkIdentDefs or vartuple Source Edit
LetSectionLike = LetSection | IdentDefLet
- abstract over various forms of let sections, used to define operations over or allow abstracting over this type class further Source Edit
Name = distinct NormNode
- opaque sum: Ident | Sym This lets you query and use name like things, which is often required as transformations need to resym, desym, bind, all over the place Source Edit
PragmaAtom = distinct NormNode
- opaque sum: a single pragma expressions (eg: atom, colon, call, ...) Source Edit
PragmaBlock = distinct Pragma
- an nnkPragmaBlock, like {.cast(noSideEffect).}: ... Source Edit
PragmaExpr = distinct Pragma
- an nnkPragmaExpr, such as foo{.praggy, maggy.} Source Edit
PragmaHaver = RoutineDef | ProcDef | Call | TypeExprObj | TypeExprRef | TypeDef
- abstract over things that have pragmas to provide a uniform interface Source Edit
PragmaLike = PragmaBlock | PragmaExpr | PragmaStmt
- abstract over any pragma like thing and provide common operations Source Edit
PragmaStmt = distinct Pragma
- an nnkPragma node, contains 0 or more child PragmaAtom Source Edit
ProcDef = distinct RoutineDef
- an nnkProcDef node which has been normalized Source Edit
RoutineDef = distinct NormNode
- any kind under macros.RoutineNodes which has been normalized Source Edit
RoutineParam = distinct IdentDef
- each calling params of proc/func/etc definition is an nnkIdentDefs Source Edit
TupleDefVarLet = distinct DefVarLet
- opaque sum: tuple defintion from a var or let section Source Edit
TypeExpr = distinct NormNode
- opaque sum: see TypeExprKinds the type part of a let or var definition, routine param, or type def or section. Source Edit
TypeExprLike = Name | TypeExpr
- Any expression that could go into the type part of a routine parameter, the identdef of a var or let section, etc. Source Edit
TypeExprObj = distinct TypeExpr
- nnkObjTy Source Edit
TypeExprRef = distinct TypeExpr
- nnkRefTy Source Edit
TypeSection = distinct NormNode
- nnkTypeSection Source Edit
VarIdentDef = distinct VarLetIdentDef
- a var section with a single nnkIdentDefs, never a vartuple Source Edit
VarLet = distinct NormNode
- opqaue sum: a var or let section, with a single define ident or tuple Source Edit
VarLetIdentDef = distinct VarLet
- opaque sum: a var or let section, but with a single identdefs, eg: var a: int = 10 Source Edit
VarLetIdentDefLike = VarLetIdentDef
- abstract over let or var sections with identdefs within Source Edit
VarLetLike = VarLet | VarLetTuple | VarLetIdentDef | LetSectionLike | VarSectionLike
- abstract over various let or var sections types Source Edit
VarLetTuple = distinct VarLet
- opaque sum: a var or let section, but with a tuple defintion within Source Edit
VarSection = distinct VarLet
- a var section, with a single nnkIdentDefs or vartuple Source Edit
VarSectionLike = VarSection | IdentDefVar
- abstract over various var sections types Source Edit
Consts
AccessNodes = {nnkNone..nnkNilLit, nnkBracketExpr, nnkDotExpr, nnkDerefExpr, nnkHiddenAddr..nnkHiddenDeref}
- AST nodes for operations accessing a resource Source Edit
ConstructNodes = {nnkBracket, nnkObjConstr, nnkTupleConstr}
- AST nodes for construction operations Source Edit
HiddenNodes = {nnkHiddenCallConv, nnkHiddenStdConv, nnkHiddenSubConv, nnkHiddenAddr, nnkHiddenDeref}
- "Hidden" AST nodes Source Edit
NilNimNode = nil
- Source Edit
NilNormNode = nil
- Source Edit
Procs
proc `[]`[R: RecursiveNode; T, U](n: R; x: HSlice[T, U]): seq[R]
- grab an inclusive n slice of normalized children Source Edit
proc `[]`[T: RecursiveNode](n: T; i: BackwardsIndex): T
- grab the i'th child of a normalized node should be normalized itself Source Edit
proc `[]`[T: RecursiveNode](n: T; i: int): T
- grab the i'th child of a normalized node should be normalized itself Source Edit
proc add(f: NimNode; c: NormNode): NormNode {.discardable, ...raises: [], tags: [], forbids: [].}
- add a child node, and return the parent for further chaining. created in order to fix ambiguous call issues ... again. Source Edit
proc add(f: NormNode; c: NormNode): NormNode {.discardable, ...raises: [], tags: [], forbids: [].}
- add a child node, and return the parent for further chaining. created in order to fix ambiguous call issues Source Edit
proc add[T: RecursiveNode](f: T; cs: NormalizedVarargs): T {.discardable.}
- add a child node, and return the parent for further chaining. created in order to fix ambiguous call issues Source Edit
proc addPragma(n: RoutineDefLike; prag: Name)
- add a pragma (prag) to the definition: {.prag.} Source Edit
proc addPragma(n: RoutineDefLike; prag: Name; pragArg: Name)
- adds a pragma as follows {.prag: pragArg.} in a colon expression Source Edit
proc addPragma(n: RoutineDefLike; prag: Name; pragArg: NimNode)
- adds a pragma as follows {.prag: pragArg.} in a colon expression Source Edit
proc addPragma(n: RoutineDefLike; prag: Name; pragArgs: openArray[Name])
- add pragmas of the form {.raise: [IOError, OSError].} Source Edit
proc addPragma(n: RoutineDefLike; prag: string)
- add the pragma (prag) as an ident to this definition Source Edit
func asCallKind(n`gensym105: NormNode): CallKind {....raises: [], tags: [], forbids: [].}
- coerces a node n or errors out Source Edit
proc asIdentDefs(n: NimNode): IdentDef {....raises: [], tags: [], forbids: [].}
- return an IdentDef or error out Source Edit
proc asName(n: string; info: NormNode = NilNormNode): Name {....raises: [], tags: [], forbids: [].}
- nnkIdent as Name Source Edit
func asNameAllowEmpty(n: NimNode): Name {....raises: [], tags: [], forbids: [].}
- coerce to Name, allow nnkEmpty, error out otherwise Source Edit
func asNameAllowEmpty(n`gensym53: NormNode): Name {....raises: [], tags: [], forbids: [].}
- coerces a node n or errors out Source Edit
proc asPragmaAtom(n: Name): PragmaAtom {....raises: [], tags: [], forbids: [].}
- convert a Name to a PragmaAtom Source Edit
func asPragmaBlock(n`gensym103: NormNode): PragmaBlock {....raises: [], tags: [], forbids: [].}
- coerces a node n or errors out Source Edit
proc asPragmaStmt(n: Name): PragmaStmt {....raises: [], tags: [], forbids: [].}
- validate and coerce into a PragmaStmt Source Edit
func asPragmaStmt(n`gensym101: NormNode): PragmaStmt {....raises: [], tags: [], forbids: [].}
- coerces a node n or errors out Source Edit
func asRoutineDef(n`gensym112: NormNode): RoutineDef {....raises: [], tags: [], forbids: [].}
- coerces a node n or errors out Source Edit
func asTypeExpr(n`gensym72: NormNode): TypeExpr {....raises: [], tags: [], forbids: [].}
- coerces a node n or errors out Source Edit
func asTypeExprAllowEmpty(n`gensym74: NormNode): TypeExpr {....raises: [], tags: [], forbids: [].}
- coerces a node n or errors out Source Edit
func asTypeExprObj(n`gensym76: NormNode): TypeExprObj {....raises: [], tags: [], forbids: [].}
- coerces a node n or errors out Source Edit
func asTypeExprRef(n`gensym78: NormNode): TypeExprRef {....raises: [], tags: [], forbids: [].}
- coerces a node n or errors out Source Edit
func asTypeSection(n`gensym68: NormNode): TypeSection {....raises: [], tags: [], forbids: [].}
- coerces a node n or errors out Source Edit
proc asVarLetIdentDef(n: VarLet): VarLetIdentDef {....raises: [], tags: [], forbids: [].}
- return a VarLetIdentDef if the def is an IdentDef, otherwise error out Source Edit
proc asVarLetTuple(n: VarLet): VarLetTuple {....raises: [], tags: [], forbids: [].}
- return a VarLetTuple if the def is a VarTuple, otherwise error out Source Edit
proc body(n: RoutineDef): NormNode {....raises: [], tags: [], forbids: [].}
- Source Edit
proc body=(n: RoutineDef; b: NormNode) {....raises: [], tags: [], forbids: [].}
- Source Edit
proc copyLineInfo(arg, info: NormNode) {.borrow, ...raises: [], tags: [], forbids: [].}
- Source Edit
proc copyLineInfo(arg: NormNode; info: NimNode) {.borrow, ...raises: [], tags: [], forbids: [].}
- Source Edit
proc copyNimNode(n: NormNode): NormNode {.borrow, ...raises: [], tags: [], forbids: [].}
- Source Edit
proc copyNimTree(n: NormNode): NormNode {.borrow, ...raises: [], tags: [], forbids: [].}
- Source Edit
func def(n: VarLetLike): DefVarLet | TupleDefVarLet
- an IdentDef or VarTuple as a not very specific type DefVarLet for VarLetTuple a more specific type TupleDefVarLet is returned Source Edit
proc firstCallParam(n: RoutineDef): RoutineParam {....raises: [], tags: [], forbids: [].}
- returns the first call param for this proc def, useful due to CPS proc often just have one continuation parameter that we access often. Source Edit
func formalParams(n: RoutineDef): FormalParams {....raises: [], tags: [], forbids: [].}
- fetch the formal params, first one is the return param Source Edit
proc formalParams=(n: RoutineDef; f: FormalParams) {....raises: [], tags: [], forbids: [].}
- set the formal params for this routine, first one is the return param Source Edit
proc genProcName(a, b: string; info = NilNormNode): Name {....raises: [ValueError], tags: [], forbids: [].}
- Source Edit
proc genProcName(a: string; info = NilNormNode): Name {....deprecated, raises: [ValueError], tags: [], forbids: [].}
- Source Edit
proc genSymField(n: string; info: NormNode = NilNormNode): Name {....raises: [], tags: [], forbids: [].}
- genSym an nskField Source Edit
proc genSymProc(n: string; info: NormNode = NilNormNode): Name {....raises: [], tags: [], forbids: [].}
- genSym an nskProc Source Edit
proc genSymType(n: string; info: NormNode = NilNormNode): Name {....raises: [], tags: [], forbids: [].}
- genSym an nskType Source Edit
proc genSymUnknown(n: string; info: NormNode = NilNormNode): Name {....raises: [], tags: [], forbids: [].}
- genSym an nskUnknown Source Edit
proc genTypeName(a, b: string; info = NilNormNode): Name {....raises: [ValueError], tags: [], forbids: [].}
- Source Edit
proc getPragmaName(n: NimNode): NimNode {. ...deprecated: "Replace with Pragma version", raises: [], tags: [], forbids: [].}
- Source Edit retrieve the symbol/identifier from the child node of a nnkPragma
proc getPragmaName(n: PragmaAtom): Name {....raises: [], tags: [], forbids: [].}
- retrieve the symbol/identifier from the child node of a PragmaAtom, or if it's an atom then return itself. Source Edit
proc getTypeInst(n: NormNode): TypeExpr {.borrow, ...raises: [], tags: [], forbids: [].}
- return the type instance, via getTypeInst of a NimNode Source Edit
func hasPragma(n: PragmaHaver; s: static[string]): bool
- true if the n holds the pragma s Source Edit
func hasPragma(n: PragmaLike; s: static[string]): bool
- true if the n holds the pragma s Source Edit
func hasValue(n: DefLike): bool
- has a non-Empty initial value defined for the ident, sym or tuple Yes, proc, you ARE a good proc. You have value, hasValue, in fact. Source Edit
func hasValue(n: VarLetLike): bool
- whether an initial value has been specified Source Edit
func identdef(n: VarLetIdentDefLike): IdentDef {....raises: [], tags: [], forbids: [].}
- retrieve the inner IdentDef Source Edit
func impl(n: Call): RoutineDef {....raises: [], tags: [], forbids: [].}
- return the RoutineDef associated to this Call n Source Edit
func inferTypFromImpl(n: DefLike): TypeExpr
- returns the typ if specified or uses macro.getTypeImpl to infer it Source Edit
func inferTypFromImpl(n: VarLetIdentDefLike): TypeExpr {....raises: [], tags: [], forbids: [].}
- returns the typ if specified or uses macro.getTypeImpl to infer it Source Edit
func isExported(n: Name): bool {....raises: [], tags: [], forbids: [].}
- true if this has been exported Source Edit
func isTuple(n: VarLetLike): bool
- Source Edit
func kind(n: NormNode): NimNodeKind {.borrow, ...raises: [], tags: [], forbids: [].}
- the kind (NimNodeKind) of the underlying NimNode Source Edit
func kind(n: VarLetLike): NimNodeKind
- Source Edit
func last[T: RecursiveNode](n: T): T
- last child Source Edit
func name(n: IdentDefLike): Name
- retrieve the name of this IdentDefLike Source Edit
func name(n: PragmaExpr): Name {....raises: [], tags: [], forbids: [].}
- Source Edit
func name(n: RoutineDef): Name {....raises: [], tags: [], forbids: [].}
- get the name of this RoutineDef Source Edit
func name(n: VarLetIdentDefLike): Name {....raises: [], tags: [], forbids: [].}
- Name (ident|sym) of the identifer, as we only have a single identdefs it will have the name Source Edit
proc name=(callee: Call; newName: Name) {....raises: [], tags: [], forbids: [].}
- set the callee's name to newName Source Edit
proc name=(n: RoutineDef; name: Name) {....raises: [], tags: [], forbids: [].}
- set the name of this RoutineDef Source Edit
proc newCall(n: Name; args: AnyNodeVarargs): Call {....raises: [], tags: [], forbids: [].}
- create a new call, with n as name some args Source Edit
proc newEmptyNormNode(): NormNode {....raises: [], tags: [], forbids: [].}
- create a new empty node (nnkEmpty) Source Edit
proc newFormalParams(ret: TypeExpr; ps: varargs[IdentDef]): FormalParams {. ...raises: [], tags: [], forbids: [].}
- create new formal params, with a return of ret, and calling params ps Source Edit
proc newIdentDef(n: Name; t: TypeExprLike; val = newEmptyNode()): IdentDef
- create a single assignment nnkIdentDefs, we drop the plural to indicate the singleton nature Source Edit
proc newIdentDef(n: Name; val: NormNode): IdentDef {....raises: [], tags: [], forbids: [].}
- create a single assignment nnkIdentDefs, we drop the plural to indicate the singleton nature Source Edit
proc newIdentDef(n: string; t: TypeExprLike; val = newEmptyNode()): IdentDef
- create a single assignment nnkIdentDefs, we drop the plural to indicate the singleton nature Source Edit
proc newIdentDefVar(i: IdentDef): IdentDefVar {....raises: [], tags: [], forbids: [].}
- create a var section with an identdef ie: newVarSection(i), where i is 'foo: int = 2` -> var foo: int = 2 Source Edit
proc newIdentDefVar(n: Name; t: TypeExprLike; val = newEmptyNode()): IdentDefVar
- create a var section with an identdef, eg: n: t = val Source Edit
proc newLetIdentDef(i: IdentDef): LetIdentDef {....raises: [], tags: [], forbids: [].}
- create a let section with an identdef ie: newLetSection(i), where i is 'foo: int = 2` -> let foo: int = 2 Source Edit
proc newLetIdentDef(n: Name; t: TypeExprLike; val = newEmptyNode()): LetIdentDef
- create a let section with an identdef, eg: n: t = val Source Edit
proc newLetIdentDef(n: Name; val: NormNode): LetIdentDef {....raises: [], tags: [], forbids: [].}
- Source Edit
proc newPragmaColonExpr(n: static[string]; r: NormNode): PragmaAtom
- create a new PragmaAtom that's a colon expression Source Edit
proc newPragmaStmt(es: varargs[PragmaAtom]): PragmaStmt {....raises: [], tags: [], forbids: [].}
- create a new PragmaStmt node with es pragma exprs, but returns an empty node if none are provided. Source Edit
proc newPragmaStmt(n: Name): PragmaStmt {....raises: [], tags: [], forbids: [].}
- create a new PragmaStmt node with n as a PragmaAtom Source Edit
proc newPragmaStmtWithInfo(inf: NormNode; es: varargs[PragmaAtom]): PragmaStmt {. ...raises: [], tags: [], forbids: [].}
- create a new PragmaStmt node with es pragma exprs, but returns an empty node if none are provided, and sets the line info Source Edit
proc newRefType(n: Name): TypeExprRef {....raises: [], tags: [], forbids: [].}
- create a new ref type from n Source Edit
proc newStmtList(stmts: AnyNodeVarargs): NormNode {....raises: [], tags: [], forbids: [].}
- create a new normalized statement Source Edit
proc newVarIdentDef(i: IdentDef): VarIdentDef {....raises: [], tags: [], forbids: [].}
- create a var section with an identdef ie: newVarSection(i), where i is 'foo: int = 2` -> var foo: int = 2 Source Edit
proc newVarLetIdentDef(kind: NimNodeKind; i: IdentDef): VarLetIdentDef {. ...raises: [], tags: [], forbids: [].}
- create a new VarLetIdentDef Source Edit
proc newVarLetIdentDef(kind: NimNodeKind; name: Name; typ: TypeExprLike; val: NimNode): VarLetIdentDef
- create a new VarLetIdentDef Source Edit
proc newVarSection(i: IdentDef): VarSection {....raises: [], tags: [], forbids: [].}
- create a var section with an identdef ie: newVarSection(i), where i is 'foo: int = 2` -> var foo: int = 2 Source Edit
proc newVarSection(n: Name; t: TypeExprLike; val = newEmptyNode()): VarSection
- create a var section with an identdef, eg: n: t = val Source Edit
proc normalizeCall(n: NimNode): Call {....raises: [Exception], tags: [RootEffect], forbids: [].}
- ensure this is a normalized procd definition Source Edit
proc normalizeProcDef(n: NimNode): ProcDef {....raises: [Exception], tags: [RootEffect], forbids: [].}
- ensure this is a normalized procd definition Source Edit
proc onlyNormalizedNode[T: distinct](n: T): NormNode
- used for conversion in an vararg scenarios primarily Source Edit
func pragma(n: PragmaHaver): PragmaLike
- fetch all pragma declared on this routine definition or a callee Source Edit
proc pragma=(n: ProcDef; p: PragmaStmt) {....raises: [], tags: [], forbids: [].}
- set the pragma Source Edit
proc pragma=(n: RoutineDef; p: PragmaStmt) {....raises: [], tags: [], forbids: [].}
- set the pragma for this routine, replace the previous one entirely Source Edit
proc prependArg(n: Call; arg: NormNode) {....raises: [], tags: [], forbids: [].}
- add an argument to the call in the first position of the call Source Edit
func returnParam(n: ProcDef): TypeExpr {....raises: [], tags: [], forbids: [].}
- the return param or empty if void Source Edit
proc returnParam=(n: ProcDef; ret: Name) {....raises: [], tags: [], forbids: [].}
- set the return param Source Edit
proc sinkAnnotated(n: NormNode): TypeExpr {....raises: [], tags: [], forbids: [].}
- create a sink annotated type expression from n Source Edit
func smartSniffer(n: VarLetLike): TypeExpr
- perform some type-fu for tuple type sniffing Source Edit
proc typ(n: Conv): TypeExpr {....raises: [], tags: [], forbids: [].}
- the type being converted to Source Edit
func typ(n: VarLetLike): TypeExpr
- the type of this definition (IdentDef or VarTuple) Source Edit
proc upgradeToNormalizedNode[T](n: T): NormNode
- used for conversion in varargs, will convert NimNode to NormNode Source Edit
func val(n: VarLetLike): NormNode
- the ident or sym being defined, or tuple being defined Source Edit
Iterators
iterator callingParams(n: ProcDef): RoutineParam {....raises: [], tags: [], forbids: [].}
- iterate over formal parameters used to call this routine, excludes the return parameter. Source Edit
iterator indexNamePairs(n: VarLetTuple): (int, Name) {....raises: [], tags: [], forbids: [].}
- return the names of fields on the lhs of a var/let tuple assignment Source Edit
iterator items(n: NormNode): NormNode {....raises: [], tags: [], forbids: [].}
- iterate through the kiddos Source Edit
iterator items(n: PragmaLike): PragmaAtom
- fetch the individual atoms Source Edit
Converters
converter cCallToNormNode(n`gensym26: Call): NormNode {....raises: [], tags: [], forbids: [].}
- Source Edit
converter cConvToNormNode(n`gensym27: Conv): NormNode {....raises: [], tags: [], forbids: [].}
- Source Edit
converter cDefVarLetToNormNode(n`gensym40: DefVarLet): NormNode {....raises: [], tags: [], forbids: [].}
- Source Edit
converter cFormalParamsToNormNode(n`gensym33: FormalParams): NormNode {. ...raises: [], tags: [], forbids: [].}
- Source Edit
converter cIdentDefLetToIdentDef(n`gensym43: IdentDefLet): IdentDef {. ...raises: [], tags: [], forbids: [].}
- Source Edit
converter cIdentDefLetToNormNode(n`gensym41: IdentDefLet): NormNode {. ...raises: [], tags: [], forbids: [].}
- Source Edit
converter cIdentDefToNimNode(n`gensym1: IdentDef): NimNode {....raises: [], tags: [], forbids: [].}
- Source Edit
converter cIdentDefToNormNode(n`gensym30: IdentDef): NormNode {....raises: [], tags: [], forbids: [].}
- Source Edit
converter cIdentDefVarToIdentDef(n`gensym44: IdentDefVar): IdentDef {. ...raises: [], tags: [], forbids: [].}
- Source Edit
converter cIdentToNimNode(n`gensym2: Ident): NimNode {....raises: [], tags: [], forbids: [].}
- Source Edit
converter cLetIdentDefToVarLetIdentDef(n`gensym46: LetIdentDef): VarLetIdentDef {. ...raises: [], tags: [], forbids: [].}
- Source Edit
converter cLetSectionToNormNode(n`gensym36: LetSection): NormNode {....raises: [], tags: [], forbids: [].}
- Source Edit
converter cNameToNormNode(n`gensym24: Name): NormNode {....raises: [], tags: [], forbids: [].}
- Source Edit
converter cNormNodeToNimNode(n`gensym0: NormNode): NimNode {....raises: [], tags: [], forbids: [].}
- Source Edit
converter cPragmaAtomToNormNode(n`gensym29: PragmaAtom): NormNode {....raises: [], tags: [], forbids: [].}
- Source Edit
converter cPragmaStmtToNormNode(n`gensym28: PragmaStmt): NormNode {....raises: [], tags: [], forbids: [].}
- Source Edit
converter cProcDefToNormNode(n`gensym32: ProcDef): NormNode {....raises: [], tags: [], forbids: [].}
- Source Edit
converter cProcDefToRoutineDef(n`gensym48: ProcDef): RoutineDef {....raises: [], tags: [], forbids: [].}
- Source Edit
converter cRoutineDefToNimNode(n`gensym4: RoutineDef): NimNode {....raises: [], tags: [], forbids: [].}
- Source Edit
converter cRoutineDefToNormNode(n`gensym31: RoutineDef): NormNode {....raises: [], tags: [], forbids: [].}
- Source Edit
converter cRoutineParamToIdentDef(n`gensym45: RoutineParam): IdentDef {. ...raises: [], tags: [], forbids: [].}
- Source Edit
converter cRoutineParamToNormNode(n`gensym34: RoutineParam): NormNode {. ...raises: [], tags: [], forbids: [].}
- Source Edit
converter cSymToName(n`gensym64: Sym): Name {....raises: [], tags: [], forbids: [].}
- Source Edit
converter cSymToNormNode(n`gensym42: Sym): NormNode {....raises: [], tags: [], forbids: [].}
- Source Edit
converter cTypeExprRefToTypeExpr(n`gensym49: TypeExprRef): TypeExpr {. ...raises: [], tags: [], forbids: [].}
- Source Edit
converter cTypeExprToNormNode(n`gensym25: TypeExpr): NormNode {....raises: [], tags: [], forbids: [].}
- Source Edit
converter cVarIdentDefToVarLetIdentDef(n`gensym47: VarIdentDef): VarLetIdentDef {. ...raises: [], tags: [], forbids: [].}
- Source Edit
converter cVarLetIdentDefToNormNode(n`gensym38: VarLetIdentDef): NormNode {. ...raises: [], tags: [], forbids: [].}
- Source Edit
converter cVarLetToNormNode(n`gensym37: VarLet): NormNode {....raises: [], tags: [], forbids: [].}
- Source Edit
converter cVarLetTupleToNormNode(n`gensym39: VarLetTuple): NormNode {. ...raises: [], tags: [], forbids: [].}
- Source Edit
converter cVarSectionToNimNode(n`gensym3: VarSection): NimNode {....raises: [], tags: [], forbids: [].}
- Source Edit
converter cVarSectionToNormNode(n`gensym35: VarSection): NormNode {....raises: [], tags: [], forbids: [].}
- Source Edit
converter seqNormalizedToSeqNimNode(n: seq[NormNode]): seq[NimNode] {. ...raises: [], tags: [], forbids: [].}
- convert a seq[NormNode] to seq[NimNode] for ease of use Source Edit
Templates
template copyNodeAndTransformIt(n: NimNode; body: untyped): untyped
- copies a node n into it, transforms it with body, and provides it as the expression result. Assumes n and it are Normalized. Source Edit
template ifCallKindThenIt(n: NormNode; body: untyped)
- if n is a nnCallKinds then run the body with it as Call Source Edit
template ifCallThenIt(n: NormNode; body: untyped)
- if n is a CallNodes then run the body with it as Call Source Edit
template newNodeAndTransformIt(n: NimNode; body: untyped): untyped
- creates a node it, transformed by the body, and provides the result. Info and kind of node are derived from n. This proc is useful for when type information of n needs to be wiped, otherwise use copyNodeAndTransformIt. Assumes n and it are Normalized. Source Edit