pub struct PropertyLambda<A: IVm>(/* private fields */);Expand description
A receiver is live and no region is open: the state after a . node,
a.b. Its steps are |() (end_call) and |?.() (option_call);
end is the bare node, the read with its receiver dropped — the one
property read nanvm-lib has, dot(a, key).end().
No region, so no skipped state: the interior is the step’s own
Result, its nullish-receiver throw waiting for a terminal to surface
it — a.b(...c) on a nullish a throws at the access with c
untouched, which is why end_call takes its arguments as a thunk.
Implementations§
Source§impl<A: IVm> PropertyLambda<A>
impl<A: IVm> PropertyLambda<A>
Sourcepub fn end_call(
self,
runtime: &Any<A>,
args: impl FnOnce() -> Result<Any<A>, Any<A>>,
) -> Result<Any<A>, Any<A>>
pub fn end_call( self, runtime: &Any<A>, args: impl FnOnce() -> Result<Any<A>, Any<A>>, ) -> Result<Any<A>, Any<A>>
|(), terminal: a.b(...args), the property called on its
receiver — an own property, or a built-in member function. No
region is open, so this is also what a |!() would be — “there is
no bit to clear”.
Sourcepub fn end_call_native(
self,
args: impl FnOnce() -> Result<Any<A>, Any<A>>,
) -> Result<Any<A>, Any<A>>
pub fn end_call_native( self, args: impl FnOnce() -> Result<Any<A>, Any<A>>, ) -> Result<Any<A>, Any<A>>
|() of an intrinsic’s helper, slice(s, a, b): the member call
that asks no runtime, the own property else the native else the
TypeError, since no body defines the name
([Member::call_native]).
Sourcepub fn option_call(
self,
runtime: &Any<A>,
args: impl FnOnce() -> Result<Any<A>, Any<A>>,
) -> OptionLambda<A>
pub fn option_call( self, runtime: &Any<A>, args: impl FnOnce() -> Result<Any<A>, Any<A>>, ) -> OptionLambda<A>
|?.(): a.b?.(...args), opening a region.