Struct moore_vhdl::make_ctx::MakeContext
source · [−]pub struct MakeContext<'sbc, 'lazy: 'sbc, 'sb: 'lazy, 'ast: 'sb, 'ctx: 'sb, I: Copy> {
pub ctx: &'sbc ScoreContext<'lazy, 'sb, 'ast, 'ctx>,
pub span: Span,
pub id: I,
}
Expand description
A context within which compiler passes can be described.
See the module documentation for details.
Fields
ctx: &'sbc ScoreContext<'lazy, 'sb, 'ast, 'ctx>
The outer context.
span: Span
The span of the node in the source code.
id: I
The ID of the node being constructed.
Implementations
sourceimpl<'sbc, 'lazy, 'sb, 'ast, 'ctx, I> MakeContext<'sbc, 'lazy, 'sb, 'ast, 'ctx, I> where
I: Copy + Into<NodeId> + Debug,
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx, I> MakeContext<'sbc, 'lazy, 'sb, 'ast, 'ctx, I> where
I: Copy + Into<NodeId> + Debug,
sourcepub fn new(
ctx: &'sbc ScoreContext<'lazy, 'sb, 'ast, 'ctx>,
span: Span,
id: I
) -> MakeContext<'sbc, 'lazy, 'sb, 'ast, 'ctx, I>
pub fn new(
ctx: &'sbc ScoreContext<'lazy, 'sb, 'ast, 'ctx>,
span: Span,
id: I
) -> MakeContext<'sbc, 'lazy, 'sb, 'ast, 'ctx, I>
Create a new context.
sourcepub fn finish(self) -> I
pub fn finish(self) -> I
Finalize the description and return the node Id.
This should be the very last step.
sourcepub fn lower_to_hir<R>(&self, f: LazyHir<'sb, 'ast, 'ctx, R>) where
LazyHirTable<'sb, 'ast, 'ctx>: NodeStorage<I, Node = LazyNode<LazyHir<'sb, 'ast, 'ctx, R>>>,
pub fn lower_to_hir<R>(&self, f: LazyHir<'sb, 'ast, 'ctx, R>) where
LazyHirTable<'sb, 'ast, 'ctx>: NodeStorage<I, Node = LazyNode<LazyHir<'sb, 'ast, 'ctx, R>>>,
Schedule a callback that lowers the node to HIR.
sourcepub fn set_hir<T>(&self, hir: T) where
T: 'ctx,
HirTable<'ctx>: NodeStorage<I, Node = &'ctx T>,
Arenas: Alloc<'ctx, 'ctx, T>,
pub fn set_hir<T>(&self, hir: T) where
T: 'ctx,
HirTable<'ctx>: NodeStorage<I, Node = &'ctx T>,
Arenas: Alloc<'ctx, 'ctx, T>,
Store a preconstructed HIR for the node.
sourcepub fn typeck(&self, f: LazyTypeck<'sb, 'ast, 'ctx>)
pub fn typeck(&self, f: LazyTypeck<'sb, 'ast, 'ctx>)
Schedule a callback that type checks the node.
sourcepub fn typeval(&self, f: LazyTypeval<'sb, 'ast, 'ctx>)
pub fn typeval(&self, f: LazyTypeval<'sb, 'ast, 'ctx>)
Schedule a callback that evaluates the type of the node.
Auto Trait Implementations
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx, I> !RefUnwindSafe for MakeContext<'sbc, 'lazy, 'sb, 'ast, 'ctx, I>
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx, I> !Send for MakeContext<'sbc, 'lazy, 'sb, 'ast, 'ctx, I>
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx, I> !Sync for MakeContext<'sbc, 'lazy, 'sb, 'ast, 'ctx, I>
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx, I> Unpin for MakeContext<'sbc, 'lazy, 'sb, 'ast, 'ctx, I> where
I: Unpin,
'ast: 'sbc,
'ctx: 'sbc,
'lazy: 'sbc,
'sb: 'sbc,
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx, I> !UnwindSafe for MakeContext<'sbc, 'lazy, 'sb, 'ast, 'ctx, I>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more