lookups

Imports

ast, astalgo, idents, semdata, types, msgs, options, renderer, nimfix/prettybase, lineinfos

Types

TOverloadIterMode = enum
  oimDone, oimNoQualifier, oimSelfModule, oimOtherModule, oimSymChoice,
  oimSymChoiceLocalLookup
Source Edit
TOverloadIter = object
  it*: TIdentIter
  m*: PSym
  mode*: TOverloadIterMode
  symChoiceIndex*: int
  scope*: PScope
  inSymChoice: IntSet
Source Edit
TLookupFlag = enum
  checkAmbiguity, checkUndeclared, checkModule, checkPureEnumFields
Source Edit

Procs

proc considerQuotedIdent(c: PContext; n: PNode; origin: PNode = nil): PIdent {...}{.
    raises: [Exception, ValueError, IOError, ERecoverableError],
    tags: [RootEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect].}
Retrieve a PIdent from a PNode, taking into account accent nodes. origin can be nil. If it is not nil, it is used for a better error message. Source Edit
proc addUniqueSym(scope: PScope; s: PSym): PSym {...}{.raises: [], tags: [].}
Source Edit
proc openScope(c: PContext): PScope {...}{.discardable, raises: [], tags: [].}
Source Edit
proc rawCloseScope(c: PContext) {...}{.raises: [], tags: [].}
Source Edit
proc closeScope(c: PContext) {...}{.raises: [Exception], tags: [RootEffect].}
Source Edit
proc skipAlias(s: PSym; n: PNode; conf: ConfigRef): PSym {...}{.
    raises: [Exception, ValueError, IOError, ERecoverableError],
    tags: [ReadIOEffect, RootEffect, WriteIOEffect, ReadEnvEffect].}
Source Edit
proc isShadowScope(s: PScope): bool {...}{.inline, raises: [], tags: [].}
Source Edit
proc localSearchInScope(c: PContext; s: PIdent): PSym {...}{.raises: [], tags: [].}
Source Edit
proc searchInScopes(c: PContext; s: PIdent): PSym {...}{.raises: [], tags: [].}
Source Edit
proc debugScopes(c: PContext; limit = 0) {...}{.deprecated, raises: [], tags: [].}
Deprecated
Source Edit
proc searchInScopes(c: PContext; s: PIdent; filter: TSymKinds): PSym {...}{.
    raises: [], tags: [].}
Source Edit
proc errorSym(c: PContext; n: PNode): PSym {...}{.
    raises: [Exception, ValueError, IOError, ERecoverableError],
    tags: [RootEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect].}
creates an error symbol to avoid cascading errors (for IDE support) Source Edit
proc getSymRepr(conf: ConfigRef; s: PSym): string {...}{.raises: [Exception],
    tags: [RootEffect].}
Source Edit
proc wrongRedefinition(c: PContext; info: TLineInfo; s: string;
                       conflictsWith: TLineInfo) {...}{.
    raises: [Exception, ValueError, IOError, ERecoverableError],
    tags: [RootEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect].}
Source Edit
proc addDecl(c: PContext; sym: PSym; info: TLineInfo) {...}{.
    raises: [Exception, ValueError, IOError, ERecoverableError],
    tags: [RootEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect].}
Source Edit
proc addDecl(c: PContext; sym: PSym) {...}{.raises: [Exception, ValueError, IOError,
    ERecoverableError], tags: [RootEffect, WriteIOEffect, ReadIOEffect,
                               ReadEnvEffect].}
Source Edit
proc addPrelimDecl(c: PContext; sym: PSym) {...}{.raises: [], tags: [].}
Source Edit
proc addDeclAt(c: PContext; scope: PScope; sym: PSym) {...}{.
    raises: [Exception, ValueError, IOError, ERecoverableError],
    tags: [RootEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect].}
Source Edit
proc addInterfaceDeclAt(c: PContext; scope: PScope; sym: PSym) {...}{.
    raises: [Exception, ValueError, IOError, ERecoverableError],
    tags: [RootEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect].}
Source Edit
proc addOverloadableSymAt(c: PContext; scope: PScope; fn: PSym) {...}{.
    raises: [Exception, ValueError, IOError, ERecoverableError],
    tags: [RootEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect].}
Source Edit
proc addInterfaceDecl(c: PContext; sym: PSym) {...}{.
    raises: [Exception, ValueError, IOError, ERecoverableError],
    tags: [RootEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect].}
Source Edit
proc addInterfaceOverloadableSymAt(c: PContext; scope: PScope; sym: PSym) {...}{.
    raises: [Exception, ValueError, IOError, ERecoverableError],
    tags: [RootEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect].}
Source Edit
proc openShadowScope(c: PContext) {...}{.raises: [], tags: [].}
Source Edit
proc closeShadowScope(c: PContext) {...}{.raises: [Exception], tags: [RootEffect].}
Source Edit
proc mergeShadowScope(c: PContext) {...}{.raises: [Exception, ValueError, IOError,
    ERecoverableError], tags: [RootEffect, WriteIOEffect, ReadIOEffect,
                               ReadEnvEffect].}
Source Edit
proc errorUseQualifier(c: PContext; info: TLineInfo; s: PSym) {...}{.
    raises: [Exception, ValueError, IOError, ERecoverableError],
    tags: [RootEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect].}
Source Edit
proc errorUndeclaredIdentifier(c: PContext; info: TLineInfo; name: string) {...}{.
    raises: [Exception, ValueError, IOError, ERecoverableError],
    tags: [RootEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect].}
Source Edit
proc lookUp(c: PContext; n: PNode): PSym {...}{.
    raises: [Exception, ValueError, IOError, ERecoverableError],
    tags: [ReadIOEffect, RootEffect, WriteIOEffect, ReadEnvEffect].}
Source Edit
proc qualifiedLookUp(c: PContext; n: PNode; flags: set[TLookupFlag]): PSym {...}{.
    raises: [Exception, ValueError, IOError, ERecoverableError],
    tags: [RootEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect].}
Source Edit
proc initOverloadIter(o: var TOverloadIter; c: PContext; n: PNode): PSym {...}{.
    raises: [Exception, ValueError, IOError, ERecoverableError],
    tags: [RootEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect].}
Source Edit
proc lastOverloadScope(o: TOverloadIter): int {...}{.raises: [], tags: [].}
Source Edit
proc nextOverloadIter(o: var TOverloadIter; c: PContext; n: PNode): PSym {...}{.
    raises: [Exception, ValueError, IOError, ERecoverableError],
    tags: [ReadIOEffect, RootEffect, WriteIOEffect, ReadEnvEffect].}
Source Edit
proc pickSym(c: PContext; n: PNode; kinds: set[TSymKind]; flags: TSymFlags = {}): PSym {...}{.
    raises: [Exception, ValueError, IOError, ERecoverableError],
    tags: [RootEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect].}
Source Edit

Iterators

iterator walkScopes(scope: PScope): PScope {...}{.raises: [], tags: [].}
Source Edit

Templates

template addSym(scope: PScope; s: PSym)
Source Edit

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