use crate::{
AsgContextInner,
AsgConvertError,
Circuit,
Expression,
Function,
PartialType,
Scope,
Span,
Statement,
Variable,
};
pub trait Node {
fn span(&self) -> Option<&Span>;
}
pub(super) trait FromAst<'a, T: leo_ast::Node + 'static>: Sized {
fn from_ast(
scope: &'a Scope<'a>,
value: &T,
expected_type: Option<PartialType<'a>>,
) -> Result<Self, AsgConvertError>;
}
pub enum ArenaNode<'a> {
Expression(Expression<'a>),
Scope(Scope<'a>),
Statement(Statement<'a>),
Variable(Variable<'a>),
Circuit(Circuit<'a>),
Function(Function<'a>),
Inner(AsgContextInner<'a>),
}