pub enum FunctionRegisterBehavior<'a, A: ASTImplementation> {
ArrowFunction {
expecting: TypeId,
is_async: bool,
},
ExpressionFunction {
expecting: TypeId,
is_async: bool,
is_generator: bool,
location: ContextLocation,
},
StatementFunction {
hoisted: VariableId,
is_async: bool,
is_generator: bool,
location: ContextLocation,
internal_marker: Option<InternalFunctionEffect>,
},
ObjectMethod {
expecting: TypeId,
is_async: bool,
is_generator: bool,
},
ClassMethod {
expecting: TypeId,
is_async: bool,
is_generator: bool,
super_type: Option<TypeId>,
internal_marker: Option<InternalFunctionEffect>,
this_shape: TypeId,
},
Constructor {
prototype: TypeId,
super_type: Option<TypeId>,
properties: ClassPropertiesToRegister<'a, A>,
internal_marker: Option<InternalFunctionEffect>,
},
}
Expand description
TODO might be generic if FunctionBehavior
becomes generic
Variants§
ArrowFunction
ExpressionFunction
StatementFunction
Fields
§
hoisted: VariableId
§
location: ContextLocation
§
internal_marker: Option<InternalFunctionEffect>
ObjectMethod
ClassMethod
Fields
§
internal_marker: Option<InternalFunctionEffect>
Constructor
Fields
§
super_type: Option<TypeId>
Is this Option::is_some
then can use super()
§
properties: ClassPropertiesToRegister<'a, A>
§
internal_marker: Option<InternalFunctionEffect>
Implementations§
source§impl<'a, A: ASTImplementation> FunctionRegisterBehavior<'a, A>
impl<'a, A: ASTImplementation> FunctionRegisterBehavior<'a, A>
Auto Trait Implementations§
impl<'a, A> Freeze for FunctionRegisterBehavior<'a, A>
impl<'a, A> RefUnwindSafe for FunctionRegisterBehavior<'a, A>
impl<'a, A> Send for FunctionRegisterBehavior<'a, A>
impl<'a, A> Sync for FunctionRegisterBehavior<'a, A>
impl<'a, A> Unpin for FunctionRegisterBehavior<'a, A>
impl<'a, A> UnwindSafe for FunctionRegisterBehavior<'a, A>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more