use crate::CompilerState;
use leo_ast::{Function, NodeID};
use leo_span::Symbol;
pub struct ProcessingAsyncVisitor<'a> {
pub state: &'a mut CompilerState,
pub max_inputs: usize,
pub current_program: Symbol,
pub current_function: Symbol,
pub new_async_functions: Vec<(Symbol, Function)>,
pub modified: bool,
}
impl ProcessingAsyncVisitor<'_> {
pub fn in_scope<T>(&mut self, id: NodeID, func: impl FnOnce(&mut Self) -> T) -> T {
self.state.symbol_table.enter_existing_scope(Some(id));
let result = func(self);
self.state.symbol_table.enter_parent();
result
}
}