use crate::{CallGraph, TypeTable};
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) type_table: &'a TypeTable,
pub(crate) reconstructed_functions: Vec<(Symbol, Function)>,
pub(crate) program: Option<Symbol>,
pub(crate) is_async: bool,
}
impl<'a> FunctionInliner<'a> {
pub fn new(node_builder: &'a NodeBuilder, call_graph: &'a CallGraph, type_table: &'a TypeTable) -> Self {
Self {
node_builder,
call_graph,
reconstructed_functions: Default::default(),
type_table,
program: None,
is_async: false,
}
}
}