Types
TIdentIter = object next*: int32 name* {.cursor.}: PIdent
- Source Edit
TIIPairSeq = seq[TIIPair]
- Source Edit
TIITable {.final.} = object counter*: int data*: TIIPairSeq
- Source Edit
Consts
InvalidKey = -9223372036854775808
- Source Edit
SumTypeDiscriminatorName = "`kind"
- no identifier can contain a backtick, so user code cannot name it Source Edit
Procs
proc debug(n: PNode; conf: ConfigRef = nil) {.exportc: "debugNode", ...deprecated, raises: [ValueError, KeyError, OSError, Exception], tags: [ReadEnvEffect, ReadIOEffect, ReadDirEffect, RootEffect], forbids: [].}
- Source Edit
proc enumOrSumTypeEnum(t: PType): PType {. ...raises: [KeyError, OSError, Exception, ValueError], tags: [ReadEnvEffect, ReadIOEffect, ReadDirEffect, RootEffect], forbids: [].}
- The enum whose fields come along when the type t is imported or exported: t itself if it is an enum, the enum of branch names if it is a sum type. Source Edit
proc firstIdentExcluding(ti: var TIdentIter; tab: TStrTable; s: PIdent; excluding: IntSet): PSym {....raises: [], tags: [], forbids: [].}
- Source Edit
proc fromSystem(op: PSym): bool {.inline, ...raises: [KeyError, OSError, Exception, ValueError], tags: [ReadEnvEffect, ReadIOEffect, ReadDirEffect, RootEffect], forbids: [].}
- Source Edit
proc getNamedParamFromList(list: PNode; ident: PIdent): PSym {....raises: [], tags: [], forbids: [].}
-
Named parameters are special because a named parameter can be gensym'ed and then they have '`<number>' suffix that we need to ignore, see compiler / evaltempl.nim, snippet:
result.add newIdentNode(getIdent(c.ic, x.name.s & "\`gensym" & $x.id), if c.instLines: actual.info else: templ.info)
Source Edit proc getOrDefault[T](t: TIdTable[T]; key: ItemId): T
- Source Edit
proc iiTableGet(t: TIITable; key: int): int {....raises: [], tags: [], forbids: [].}
- Source Edit
proc iiTablePut(t: var TIITable; key, val: int) {....raises: [], tags: [], forbids: [].}
- Source Edit
proc initIdentIter(ti: var TIdentIter; tab: TStrTable; s: PIdent): PSym {. ...raises: [], tags: [], forbids: [].}
- Source Edit
proc initIITable(x: var TIITable) {....raises: [], tags: [], forbids: [].}
- Source Edit
proc isDiscriminantField(n: PNode): bool {. ...raises: [KeyError, OSError, Exception, ValueError], tags: [ReadEnvEffect, ReadIOEffect, ReadDirEffect, RootEffect], forbids: [].}
- Source Edit
proc isSumTypeDiscriminator(s: PSym): bool {.inline, ...raises: [KeyError, OSError, Exception, ValueError], tags: [ReadEnvEffect, ReadIOEffect, ReadDirEffect, RootEffect], forbids: [].}
- Source Edit
proc listSymbolNames(symbols: openArray[PSym]): string {....raises: [], tags: [], forbids: [].}
- Source Edit
proc nextIdentExcluding(ti: var TIdentIter; tab: TStrTable; excluding: IntSet): PSym {. ...raises: [], tags: [], forbids: [].}
- Source Edit
proc nextIdentIter(ti: var TIdentIter; tab: TStrTable): PSym {....raises: [], tags: [], forbids: [].}
- Source Edit
proc objectSetContains(t: TObjectSet; obj: RootRef): bool {....raises: [], tags: [], forbids: [].}
- Source Edit
proc objectSetContainsOrIncl(t: var TObjectSet; obj: RootRef): bool {. ...raises: [], tags: [], forbids: [].}
- Source Edit
proc objectSetIncl(t: var TObjectSet; obj: RootRef) {....raises: [], tags: [], forbids: [].}
- Source Edit
proc skipConvCastAndClosure(n: PNode): PNode {....raises: [], tags: [], forbids: [].}
- Source Edit
proc sumTypeCase(n: PNode): PNode {....raises: [KeyError, OSError, Exception, ValueError], tags: [ReadEnvEffect, ReadIOEffect, ReadDirEffect, RootEffect], forbids: [].}
- The nkRecCase of the record n of a sum type (nil if there is none). Source Edit
proc sumTypeEnum(t: PType): PType {....raises: [KeyError, OSError, Exception, ValueError], tags: [ReadEnvEffect, ReadIOEffect, ReadDirEffect, RootEffect], forbids: [].}
- The generated enum of branch names if t is a sum type, a ref to one, or a generic sum type. nil otherwise. Source Edit
proc sumTypeOwner(e: PSym): PSym {....raises: [KeyError, OSError, Exception, ValueError], tags: [ReadEnvEffect, ReadIOEffect, ReadDirEffect, RootEffect], forbids: [].}
- For a branch name e of a sum type: the type symbol of the sum type (its type is a tyGenericBody for a generic sum type). nil otherwise. Source Edit
proc weakLeValue(a, b: PNode): TImplication {....raises: [ERecoverableError], tags: [], forbids: [].}
- Source Edit
Templates
template idTableGet[T](t: TIdTable[T]; key: PSym): T
- Source Edit
template idTableGet[T](t: TIdTable[T]; key: PType): T
- Type-keyed tables are BINDING tables: an exactReplica must find what its original bound, hence bindingId and not the type's own identity. Source Edit
template idTablePut[T](t: var TIdTable[T]; key: PSym; val: T)
- Source Edit
template idTablePut[T](t: var TIdTable[T]; key: PType; val: T)
- Source Edit