use oxc_allocator::Allocator;
use oxc_semantic::Scoping;
use super::TraverseCtx;
#[repr(transparent)]
pub struct ReusableTraverseCtx<'a, State>(TraverseCtx<'a, State>);
impl<'a, State> ReusableTraverseCtx<'a, State> {
pub fn new(state: State, scoping: Scoping, allocator: &'a Allocator) -> Self {
Self(TraverseCtx::new(state, scoping, allocator))
}
pub fn state(&self) -> &State {
&self.0.state
}
}
impl<'a, State> ReusableTraverseCtx<'a, State> {
#[inline] pub(crate) fn get_mut(&mut self) -> &mut TraverseCtx<'a, State> {
&mut self.0
}
}