Python/symtable

Source   Edit  

Types

Scope {.pure.} = enum
  Local, Cell, Free, Global
Source   Edit  
SteKind {.pure.} = enum
  Module, Function, Class
Source   Edit  
SymTable = ref object
Source   Edit  
SymTableEntry = ref object
  kind*: SteKind
  argVars*: Table[PyStrObject, int]
Source   Edit  

Procs

proc cellId(ste: SymTableEntry; nameStr: PyStrObject): int {.inline, cdecl,
    ...raises: [KeyError], tags: [RootEffect], forbids: [].}
Source   Edit  
proc cellVarsToSeq(ste: SymTableEntry): seq[PyStrObject] {.inline, cdecl,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc collectDeclaration(st: SymTable; astRoot: Asdlmodl) {.
    ...raises: [SyntaxError], tags: [RootEffect], forbids: [].}
Source   Edit  
proc freeId(ste: SymTableEntry; nameStr: PyStrObject): int {.inline, cdecl,
    ...raises: [KeyError], tags: [RootEffect], forbids: [].}
Source   Edit  
proc freeVarsToSeq(ste: SymTableEntry): seq[PyStrObject] {.inline, cdecl,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc getScope(ste: SymTableEntry; name: PyStrObject): Scope {.inline, cdecl,
    ...raises: [KeyError], tags: [RootEffect], forbids: [].}
Source   Edit  
proc getSte(st: SymTable; key: AstNodeBase): SymTableEntry {....raises: [], inline,
    cdecl, ...tags: [], forbids: [].}
Source   Edit  
proc hasCell(ste: SymTableEntry; nameStr: PyStrObject): bool {.inline, cdecl,
    ...raises: [], tags: [RootEffect], forbids: [].}
Source   Edit  
proc hasFree(ste: SymTableEntry; nameStr: PyStrObject): bool {.inline, cdecl,
    ...raises: [], tags: [RootEffect], forbids: [].}
Source   Edit  
proc localId(ste: SymTableEntry; localName: PyStrObject): int {.inline, cdecl,
    ...raises: [KeyError], tags: [RootEffect], forbids: [].}
Source   Edit  
proc localVarsToSeq(ste: SymTableEntry): seq[PyStrObject] {.inline, cdecl,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc nameId(ste: SymTableEntry; nameStr: PyStrObject): int {.inline, cdecl,
    ...raises: [], tags: [RootEffect], forbids: [].}
Source   Edit  
proc namesToSeq(ste: SymTableEntry): seq[PyStrObject] {.inline, cdecl,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc newSymTable(astRoot: Asdlmodl): SymTable {....raises: [SyntaxError],
    tags: [RootEffect], forbids: [].}
Source   Edit