Expand description
Source-binding attribution, set by the compiler before each
build_node call and read by factories that want to record
which DSL binding caused the node to exist. The
control_set factory is the canonical consumer:
rate_adj := control_set("rate", target) calls the factory
with current_binding() returning "rate_adj", which the
node stores for runtime attribution in
ControlOrigin::Polydat { binding }.
Structs§
- Binding
Scope - RAII guard that clears the binding slot on drop.
Functions§
- current_
binding - Read the current binding attribution. Returns
Nonewhen called outside ascoped_bindingscope (e.g. ad-hoc tests that callsuper::build_nodedirectly). - scoped_
binding - Install the current binding name for the duration of a
single
build_nodecall. Returns a guard that clears the thread-local on drop so nested compilation can’t leak attribution across callers.