Trait moore_vhdl::hir::FromAst [−][src]
pub trait FromAst<'t>: Sized {
type AllocInput: 't;
type LatentInput: 't;
type Context: 't;
type Latent;
fn alloc_slot(
input: Self::AllocInput,
context: Self::Context
) -> Result<Self::Latent>;
fn from_ast(
input: Self::LatentInput,
context: Self::Context
) -> Result<Self>;
}
Expand description
Construct something from an AST node.
Associated Types
Required methods
fn alloc_slot(
input: Self::AllocInput,
context: Self::Context
) -> Result<Self::Latent>
fn alloc_slot(
input: Self::AllocInput,
context: Self::Context
) -> Result<Self::Latent>
Schedule construction of an HIR node from an AST node.
This function performs initial setup, e.g. name declaration in the
context, and then creates a Slot
that constructs a ndoe of type Self
on demand.
fn from_ast(input: Self::LatentInput, context: Self::Context) -> Result<Self>
fn from_ast(input: Self::LatentInput, context: Self::Context) -> Result<Self>
Construct an HIR node from an AST node.