Module: reefmarker.context
Source: ./reefmarker/context.reef
Overview
reefmarker/context — scope-stack variable context for template render.
Frames are a Vec of HashMaps (not a parent pointer). get walks from the last frame down to 0; set writes the current (last) frame.
Usage: import reefmarker.context as context let ctx = context.context_new(root)
Types
Context
Fields:
| Name | Type |
|---|---|
frames |
vec.Vec[hashmap.HashMap[string, value.Value]] |
macros |
hashmap.HashMap[string, ast.Node] |
Functions
fn context_new(root: hashmap.HashMap[string, value.Value]): Context
fn get(c: Context, name: string): option.Option[value.Value]
fn get_macro(c: Context, name: string): option.Option[ast.Node]
Procedures
proc push(c: Context)
proc pop(c: Context)
proc set(c: Context, name: string, v: value.Value)
proc set_macro(c: Context, name: string, n: ast.Node)
Generated by reefc doc