Skip to main content

symtab

Macro symtab 

Source
macro_rules! symtab {
    ($($key:expr => $val:expr),* $(,)?) => { ... };
}
Expand description

Construct a SymbolTable from key-value pairs.

Values can be any type that implements Into<ExprValue>: integers, floats, bools, string literals, ExprValue, or ExprType (auto-wrapped as unresolved for type checking).

§Panics

Panics if a dotted path conflicts with an existing non-table entry.

use openjd_expr::{symtab, ExprType};

let st = symtab! {
    "Param.Frame" => 42,
    "Param.Name" => "test",
    "Session.Dir" => ExprType::PATH,
};