use crate::{Assigner, AssignmentRenamer, CallGraph};
use leo_ast::{Function, NodeBuilder};
use leo_span::Symbol;
pub struct FunctionInliner<'a> {
pub(crate) node_builder: &'a NodeBuilder,
pub(crate) call_graph: &'a CallGraph,
pub(crate) assignment_renamer: AssignmentRenamer<'a>,
pub(crate) reconstructed_functions: Vec<(Symbol, Function)>,
}
impl<'a> FunctionInliner<'a> {
pub fn new(node_builder: &'a NodeBuilder, call_graph: &'a CallGraph, assigner: &'a Assigner) -> Self {
Self {
node_builder,
call_graph,
assignment_renamer: AssignmentRenamer::new(assigner),
reconstructed_functions: Default::default(),
}
}
}