# astalgo

Theme:

- Index

Search:
Group by:
Source Edit

# Imports

ast, astyaml, options, lineinfos, idents, rodutils, msgs

# Types

    TIdentIter = object
      h*: Hash
      name*: PIdent

  Source Edit

    TIIPair {.final.} = object
      key*, val*: int

  Source Edit

    TIIPairSeq = seq[TIIPair]

  Source Edit

    TIITable {.final.} = object
      counter*: int
      data*: TIIPairSeq

  Source Edit

    TTabIter = object

  Source Edit

# Consts

    InvalidKey = -9223372036854775808

  Source Edit

# Procs

    proc `[]=`[T](t: var TIdTable[T]; key: ItemId; val: T)

  Source Edit

    proc debug(n: PNode; conf: ConfigRef = nil) {.exportc: "debugNode", ...deprecated,
        raises: [KeyError, ValueError, Exception], tags: [RootEffect], forbids: [].}

  Deprecated
  Source Edit

    proc debug(n: PSym; conf: ConfigRef = nil) {.exportc: "debugSym", ...deprecated,
        raises: [Exception], tags: [RootEffect], forbids: [].}

  Deprecated
  Source Edit

    proc debug(n: PType; conf: ConfigRef = nil) {.exportc: "debugType", ...deprecated,
        raises: [Exception], tags: [RootEffect], forbids: [].}

  Deprecated
  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: [], tags: [], forbids: [].}

  Source Edit

    proc getModule(s: PSym): PSym {....raises: [], tags: [], 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 getSymFromList(list: PNode; ident: PIdent; start: int = 0): PSym {.
        ...raises: [], tags: [], forbids: [].}

  Source Edit

    proc hashNode(p: RootRef): Hash {....raises: [], tags: [], forbids: [].}

  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 initTabIter(ti: var TTabIter; tab: TStrTable): PSym {....raises: [], tags: [],
        forbids: [].}

  Source Edit

    proc isDiscriminantField(n: PNode): bool {....raises: [], tags: [], forbids: [].}

  Source Edit

    proc leValue(a, b: PNode): bool {....raises: [ERecoverableError], tags: [],
                                      forbids: [].}

  Source Edit

    proc listSymbolNames(symbols: openArray[PSym]): string {....raises: [], tags: [],
        forbids: [].}

  Source Edit

    proc lookupInRecord(n: PNode; field: PIdent): PSym {....raises: [], tags: [],
        forbids: [].}

  Source Edit

    proc mustRehash(length, counter: int): bool {....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 nextIter(ti: var TTabIter; tab: TStrTable): PSym {....raises: [], tags: [],
        forbids: [].}

  Source Edit

    proc nextTry(h, maxHash: Hash): Hash {.inline, ...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 sameValue(a, b: PNode): bool {....raises: [ERecoverableError], tags: [],
                                        forbids: [].}

  Source Edit

    proc skipConvCastAndClosure(n: PNode): PNode {....raises: [], tags: [], forbids: [].}

  Source Edit

    proc strTableAdd(t: var TStrTable; n: PSym) {....raises: [], tags: [], forbids: [].}

  Source Edit

    proc strTableContains(t: TStrTable; n: PSym): bool {....raises: [], tags: [],
        forbids: [].}

  Source Edit

    proc strTableGet(t: TStrTable; name: PIdent): PSym {....raises: [], tags: [],
        forbids: [].}

  Source Edit

    proc strTableIncl(t: var TStrTable; n: PSym; onConflictKeepOld = false): bool {.
        discardable, ...raises: [], tags: [], forbids: [].}

  Source Edit

    proc strTableInclReportConflict(t: var TStrTable; n: PSym;
                                    onConflictKeepOld = false): PSym {....raises: [],
        tags: [], forbids: [].}

  Source Edit

    proc symTabReplace(t: var TStrTable; prevSym: PSym; newSym: PSym) {....raises: [],
        tags: [], forbids: [].}

  Source Edit

    proc weakLeValue(a, b: PNode): TImplication {....raises: [ERecoverableError],
        tags: [], forbids: [].}

  Source Edit

# Iterators

    iterator idTablePairs[T](t: TIdTable[T]): tuple[key: ItemId, val: T]

  Source Edit

    iterator items(tab: TStrTable): PSym {....raises: [], tags: [], forbids: [].}

  Source Edit

# Templates

    template debug(x: auto) {....deprecated.}

  Deprecated
  Source Edit

    template debug(x: PSym | PType | PNode) {....deprecated.}

  Deprecated
  Source Edit

    template idTableGet[T](t: TIdTable[T]; key: PType | PSym): T

  Source Edit

    template idTablePut[T](t: var TIdTable[T]; key: PType | PSym; val: T)

  Source Edit

    template mdbg(): bool {....deprecated.}

  Deprecated
  Source Edit

# Exports

treeToYaml, typeToYaml, symToYaml, lineInfoToStr