astalgo

Imports

ast, options, lineinfos, ropes, idents, rodutils, msgs

Types

TIIPair {...}{.final.} = object
  key*, val*: int
Source Edit
TIIPairSeq = seq[TIIPair]
Source Edit
TIITable {...}{.final.} = object
  counter*: int
  data*: TIIPairSeq
Source Edit
TIdentIter = object
  h*: Hash
  name*: PIdent
Source Edit
TTabIter = object
  h: Hash
Source Edit

Consts

InvalidKey = -9223372036854775808
Source Edit

Procs

proc typekinds(t: PType) {...}{.deprecated, raises: [], tags: [].}
Deprecated
Source Edit
proc skipConvCastAndClosure(n: PNode): PNode {...}{.raises: [], tags: [].}
Source Edit
proc sameValue(a, b: PNode): bool {...}{.raises: [ERecoverableError], tags: [].}
Source Edit
proc leValue(a, b: PNode): bool {...}{.raises: [ERecoverableError], tags: [].}
Source Edit
proc weakLeValue(a, b: PNode): TImplication {...}{.raises: [ERecoverableError],
    tags: [].}
Source Edit
proc lookupInRecord(n: PNode; field: PIdent): PSym {...}{.raises: [], tags: [].}
Source Edit
proc getModule(s: PSym): PSym {...}{.raises: [], tags: [].}
Source Edit
proc fromSystem(op: PSym): bool {...}{.inline, raises: [], tags: [].}
Source Edit
proc getSymFromList(list: PNode; ident: PIdent; start: int = 0): PSym {...}{.
    raises: [], tags: [].}
Source Edit
proc getNamedParamFromList(list: PNode; ident: PIdent): PSym {...}{.raises: [],
    tags: [].}
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 hashNode(p: RootRef): Hash {...}{.raises: [], tags: [].}
Source Edit
proc mustRehash(length, counter: int): bool {...}{.raises: [], tags: [].}
Source Edit
proc makeYamlString(s: string): Rope {...}{.raises: [], tags: [].}
Source Edit
proc lineInfoToStr(conf: ConfigRef; info: TLineInfo): Rope {...}{.raises: [],
    tags: [].}
Source Edit
proc treeToYaml(conf: ConfigRef; n: PNode; indent: int = 0;
                maxRecDepth: int = -1): Rope {...}{.raises: [Exception],
    tags: [RootEffect].}
Source Edit
proc typeToYaml(conf: ConfigRef; n: PType; indent: int = 0;
                maxRecDepth: int = -1): Rope {...}{.raises: [Exception],
    tags: [RootEffect].}
Source Edit
proc symToYaml(conf: ConfigRef; n: PSym; indent: int = 0; maxRecDepth: int = -1): Rope {...}{.
    raises: [Exception], tags: [RootEffect].}
Source Edit
proc debug(n: PSym; conf: ConfigRef = nil) {...}{.exportc: "debugSym", deprecated,
    raises: [Exception], tags: [RootEffect].}
Deprecated
Source Edit
proc debug(n: PType; conf: ConfigRef = nil) {...}{.exportc: "debugType", deprecated,
    raises: [Exception], tags: [RootEffect].}
Deprecated
Source Edit
proc debug(n: PNode; conf: ConfigRef = nil) {...}{.exportc: "debugNode", deprecated,
    raises: [Exception], tags: [RootEffect].}
Deprecated
Source Edit
proc nextTry(h, maxHash: Hash): Hash {...}{.inline, raises: [], tags: [].}
Source Edit
proc objectSetContains(t: TObjectSet; obj: RootRef): bool {...}{.raises: [], tags: [].}
Source Edit
proc objectSetIncl(t: var TObjectSet; obj: RootRef) {...}{.raises: [], tags: [].}
Source Edit
proc objectSetContainsOrIncl(t: var TObjectSet; obj: RootRef): bool {...}{.
    raises: [], tags: [].}
Source Edit
proc strTableContains(t: TStrTable; n: PSym): bool {...}{.raises: [], tags: [].}
Source Edit
proc symTabReplace(t: var TStrTable; prevSym: PSym; newSym: PSym) {...}{.raises: [],
    tags: [].}
Source Edit
proc strTableAdd(t: var TStrTable; n: PSym) {...}{.raises: [], tags: [].}
Source Edit
proc strTableInclReportConflict(t: var TStrTable; n: PSym;
                                onConflictKeepOld = false): PSym {...}{.raises: [],
    tags: [].}
Source Edit
proc strTableIncl(t: var TStrTable; n: PSym; onConflictKeepOld = false): bool {...}{.
    discardable, raises: [], tags: [].}
Source Edit
proc strTableGet(t: TStrTable; name: PIdent): PSym {...}{.raises: [], tags: [].}
Source Edit
proc nextIdentIter(ti: var TIdentIter; tab: TStrTable): PSym {...}{.raises: [],
    tags: [].}
Source Edit
proc initIdentIter(ti: var TIdentIter; tab: TStrTable; s: PIdent): PSym {...}{.
    raises: [], tags: [].}
Source Edit
proc nextIdentExcluding(ti: var TIdentIter; tab: TStrTable; excluding: IntSet): PSym {...}{.
    raises: [], tags: [].}
Source Edit
proc firstIdentExcluding(ti: var TIdentIter; tab: TStrTable; s: PIdent;
                         excluding: IntSet): PSym {...}{.raises: [], tags: [].}
Source Edit
proc nextIter(ti: var TTabIter; tab: TStrTable): PSym {...}{.raises: [], tags: [].}
Source Edit
proc initTabIter(ti: var TTabIter; tab: TStrTable): PSym {...}{.raises: [], tags: [].}
Source Edit
proc idTableHasObjectAsKey(t: TIdTable; key: PIdObj): bool {...}{.raises: [],
    tags: [].}
Source Edit
proc idTableGet(t: TIdTable; key: PIdObj): RootRef {...}{.raises: [], tags: [].}
Source Edit
proc idTableGet(t: TIdTable; key: int): RootRef {...}{.raises: [], tags: [].}
Source Edit
proc idTablePut(t: var TIdTable; key: PIdObj; val: RootRef) {...}{.raises: [],
    tags: [].}
Source Edit
proc idNodeTableGet(t: TIdNodeTable; key: PIdObj): PNode {...}{.raises: [], tags: [].}
Source Edit
proc idNodeTablePut(t: var TIdNodeTable; key: PIdObj; val: PNode) {...}{.raises: [],
    tags: [].}
Source Edit
proc initIiTable(x: var TIITable) {...}{.raises: [], tags: [].}
Source Edit
proc iiTableGet(t: TIITable; key: int): int {...}{.raises: [], tags: [].}
Source Edit
proc iiTablePut(t: var TIITable; key, val: int) {...}{.raises: [], tags: [].}
Source Edit
proc isAddrNode(n: PNode): bool {...}{.raises: [], tags: [].}
Source Edit
proc listSymbolNames(symbols: openArray[PSym]): string {...}{.raises: [], tags: [].}
Source Edit
proc isDiscriminantField(n: PNode): bool {...}{.raises: [], tags: [].}
Source Edit

Iterators

iterator items(tab: TStrTable): PSym {...}{.raises: [], tags: [].}
Source Edit
iterator pairs(t: TIdTable): tuple[key: int, value: RootRef] {...}{.raises: [],
    tags: [].}
Source Edit
iterator idTablePairs(t: TIdTable): tuple[key: PIdObj, val: RootRef] {...}{.
    raises: [], tags: [].}
Source Edit
iterator pairs(t: TIdNodeTable): tuple[key: PIdObj, val: PNode] {...}{.raises: [],
    tags: [].}
Source Edit

Templates

template debug(x: PSym | PType | PNode) {...}{.deprecated.}
Deprecated
Source Edit
template debug(x: auto) {...}{.deprecated.}
Deprecated
Source Edit
template mdbg(): bool {...}{.deprecated.}
Deprecated
Source Edit

© 2006–2021 Andreas Rumpf
Licensed under the MIT License.
https://nim-lang.org/docs/compiler/astalgo.html