Starts new dynamic scope in which given val
will be bound to this variable. In most cases, calls to bind()
should always be eventually followed by calls to DynVar.unbind to restore this var's previously scoped value.
Returns new DynVar
with this var's current value as its root binding.
Returns current bound value, i.e. that of the currently active dynamic scope.
Replaces current scope's value with new val
.
Attempts to end the current scope by restoring this var's bound value to that of parent scope. An error is thrown if attempting to remove the root binding.
Same as DynVar.deref, but also for DynVar
to satisfy Object.valueOf()
contract.
Executes given body
function in a new scope which has given val
bound to this variable. The new scope is automatically removed when the function returns or an error occurred.
Generated using TypeDoc
Simple dynamic scope container & implementation.
References: