pub struct Scope<'a> {
pub identifiers: FxHashMap<Name<'a>, usize>,
}
Fields§
§identifiers: FxHashMap<Name<'a>, usize>
Implementations§
Source§impl<'a> Scope<'a>
Check if an IR contains expressions that reference current context scope ids
e.g. identifiers referenced in the scope can skip prefixing
impl<'a> Scope<'a>
Check if an IR contains expressions that reference current context scope ids e.g. identifiers referenced in the scope can skip prefixing
pub fn has_identifier(&self, id: Name<'a>) -> bool
pub fn add_identifier(&mut self, id: Name<'a>)
pub fn remove_identifier(&mut self, id: Name<'a>)
pub fn has_ref_in_vnode(&self, node: &mut BaseVNode<'a>) -> bool
Trait Implementations§
Source§impl<'a, 'b> CorePassExt<BaseConvertInfo<'a>, Scope<'a>> for ExpressionProcessor<'a, 'b>
impl<'a, 'b> CorePassExt<BaseConvertInfo<'a>, Scope<'a>> for ExpressionProcessor<'a, 'b>
fn enter_fn_param(&mut self, p: &mut Js<'a>, shared: &mut Scope<'a>)
fn exit_fn_param(&mut self, p: &mut Js<'a>, shared: &mut Scope<'a>)
fn exit_js_expr(&mut self, e: &mut Js<'a>, shared: &mut Scope<'a>)
fn enter_js_expr(&mut self, _: &mut T::JsExpression, _: &mut Shared)
fn enter_vnode(&mut self, _: &mut VNodeIR<T>, _: &mut Shared)
fn exit_vnode(&mut self, _: &mut VNodeIR<T>, _: &mut Shared)
Source§impl<'a> CorePassExt<BaseConvertInfo<'a>, Scope<'a>> for SlotFlagMarker
impl<'a> CorePassExt<BaseConvertInfo<'a>, Scope<'a>> for SlotFlagMarker
fn exit_vnode(&mut self, v: &mut BaseVNode<'a>, scope: &mut Scope<'a>)
fn enter_js_expr(&mut self, _: &mut T::JsExpression, _: &mut Shared)
fn exit_js_expr(&mut self, _: &mut T::JsExpression, _: &mut Shared)
fn enter_fn_param(&mut self, _: &mut T::JsExpression, _: &mut Shared)
fn exit_fn_param(&mut self, _: &mut T::JsExpression, _: &mut Shared)
fn enter_vnode(&mut self, _: &mut VNodeIR<T>, _: &mut Shared)
Auto Trait Implementations§
impl<'a> Freeze for Scope<'a>
impl<'a> RefUnwindSafe for Scope<'a>
impl<'a> Send for Scope<'a>
impl<'a> Sync for Scope<'a>
impl<'a> Unpin for Scope<'a>
impl<'a> UnwindSafe for Scope<'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