Skip to main content

Module symbol_table

Module symbol_table 

Source
Expand description

Hierarchical symbol table for expression evaluation.

Mirrors Python openjd.expr._symbol_table.SymbolTable. Supports dotted key paths and nested tables.

§Construction

use openjd_expr::{symtab, SymbolTable, ExprValue, ExprType};

// Macro (most concise):
let st = symtab! {
    "Param.Frame" => 42,
    "Param.Name" => "test",
    "Session.Dir" => ExprType::PATH,  // auto-wraps as unresolved
};

// Builder-style:
let mut st = SymbolTable::new();
st.set("Param.Frame", 42).unwrap();
st.set("Param.Name", "test").unwrap();

// From iterator:
let st: SymbolTable = [
    ("Param.Frame", ExprValue::from(42)),
    ("Param.Name", "test".into()),
].into_iter().collect();

Structs§

SerializedSymbolTable
A symbol table in JSON transport format.
SymbolTable
Hierarchical symbol table mapping names to values or nested tables.
SymbolTableError
Error returned when a SymbolTable::set call conflicts with an existing entry.

Enums§

SymbolTableEntry
Entry in a symbol table: either a nested table or a value.

Constants§

MAX_SYMBOL_TABLE_ENTRIES
Maximum number of entries permitted in a SymbolTable deserialized from the JSON transport format (SerializedSymbolTable or the serde Deserialize impl on SymbolTable itself).