npeg/stack

Source   Edit  

Types

Stack[T] = object
  top*: int
Source   Edit  

Procs

proc `$`[T](s: Stack[T]): string
Source   Edit  
proc grow[T](s: var Stack[T])
Source   Edit  
proc initStack[T](name: string; len: int; max: int = int.high): Stack[T]
Source   Edit  

Templates

template `[]`[T](s: Stack[T]; idx: int): T
Source   Edit  
template peek[T](s: Stack[T]): T
Source   Edit  
template pop[T](s: var Stack[T]): T
Source   Edit  
template push[T](s: var Stack[T]; frame: T)
Source   Edit  
template update[T](s: Stack[T]; field: untyped; val: untyped)
Source   Edit