src/pylib/pysugar/stmt/frame

Source   Edit  

Stack Frame

Types

Decorator = ref object
  name*: NimNode
  case called*: bool
  of true:
    args*: seq[NimNode]
  of false:
    nil
Source   Edit  
PyAsgnFrame = ref object
Source   Edit  
PyAsgnRewriter = object
  dedentDoc*: bool
  supportGenerics*: bool
  classes*: seq[NimNode]     ## class type, 
                             ## empty if outside a `class` definition
  globals*: seq[string]
Source   Edit  

Procs

proc add(mparser; ident: string) {....raises: [], tags: [], forbids: [].}
add ident to current stack frame. Source   Edit  
proc contains(mparser; ident: string): bool {....raises: [], tags: [], forbids: [].}
check if ident is in current stack frame. Source   Edit  
proc decorators(mparser): var seq[Decorator] {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc newPyAsgnFrame(): PyAsgnFrame {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc newPyAsgnRewriter(supportGenerics = false; dedentDoc = false): PyAsgnRewriter {.
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc nonlocalAdd(mparser; ident: string) {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc nonlocalContains(mparser; ident: string): bool {....raises: [], tags: [],
    forbids: [].}
Source   Edit  
proc onceDeclInFrames(ident: string; mparser): bool {....raises: [], tags: [],
    forbids: [].}
lookup ident throughout all frames but globals. Source   Edit  
proc pop(mparser) {....raises: [], tags: [], forbids: [].}
pop stack frame Source   Edit  
proc push(mparser) {....raises: [], tags: [], forbids: [].}
push stack frame Source   Edit