Struct moore_vhdl::add_ctx::AddContext [−][src]
pub struct AddContext<'sbc, 'lazy: 'sbc, 'sb: 'lazy, 'ast: 'sb, 'ctx: 'sb> {
pub ctx: &'sbc ScoreContext<'lazy, 'sb, 'ast, 'ctx>,
pub scope: ScopeRef,
}
Expand description
A context within which nodes can be added.
See the module documentation for details.
Fields
ctx: &'sbc ScoreContext<'lazy, 'sb, 'ast, 'ctx>
The outer context.
scope: ScopeRef
The scope to which items will be added.
Implementations
pub fn new(
ctx: &'sbc ScoreContext<'lazy, 'sb, 'ast, 'ctx>,
scope: ScopeRef
) -> AddContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
pub fn new(
ctx: &'sbc ScoreContext<'lazy, 'sb, 'ast, 'ctx>,
scope: ScopeRef
) -> AddContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
Create a new context.
Create a new context with different scope.
Create a new context for describing a node.
Emit a diagnostic that a node is not implemented.
Add an optional node.
This convenience function performs a few things at a time. First it
applies a closure f
to the value of an option, returning an error if
the closure returns one. Otherwise it wraps the result in an option and
returns it.
Add an expression already lowered to HIR.
Schedule expression tasks.
pub fn add_choices<I>(&self, ast: Spanned<I>) -> Result<Spanned<Choices>> where
I: IntoIterator<Item = &'ast Expr>,
pub fn add_choices<I>(&self, ast: Spanned<I>) -> Result<Spanned<Choices>> where
I: IntoIterator<Item = &'ast Expr>,
Add a list of choices.
Add a discrete range.
Add an aggregate already lowered to HIR.
Schedule aggregate tasks.
Add a subtype indication.
Add a subtype indication already lowered to HIR.
Schedule subtype indication tasks.
pub fn add_const_decl<I>(&self, decl: &'ast ObjDecl) -> Result<Vec<I>> where
I: From<ConstDeclRef>,
pub fn add_const_decl<I>(&self, decl: &'ast ObjDecl) -> Result<Vec<I>> where
I: From<ConstDeclRef>,
Add a constant declaration.
pub fn add_signal_decl<I>(&self, decl: &'ast ObjDecl) -> Result<Vec<I>> where
I: From<SignalDeclRef>,
pub fn add_signal_decl<I>(&self, decl: &'ast ObjDecl) -> Result<Vec<I>> where
I: From<SignalDeclRef>,
Add a signal declaration.
pub fn add_var_decl<I>(&self, decl: &'ast ObjDecl) -> Result<Vec<I>> where
I: From<VarDeclRef>,
pub fn add_var_decl<I>(&self, decl: &'ast ObjDecl) -> Result<Vec<I>> where
I: From<VarDeclRef>,
Add a variable declaration.
pub fn add_file_decl<I>(&self, decl: &'ast ObjDecl) -> Result<Vec<I>> where
I: From<FileDeclRef>,
pub fn add_file_decl<I>(&self, decl: &'ast ObjDecl) -> Result<Vec<I>> where
I: From<FileDeclRef>,
Add a file declaration.
pub fn add_seq_stmts<I, B>(&self, stmts: I, container_name: &str) -> Result<B> where
I: IntoIterator<Item = &'ast Stmt>,
B: FromIterator<SeqStmtRef>,
pub fn add_seq_stmts<I, B>(&self, stmts: I, container_name: &str) -> Result<B> where
I: IntoIterator<Item = &'ast Stmt>,
B: FromIterator<SeqStmtRef>,
Add multiple sequential statements.
Add a sequential statement.
Add a wait statement.
Add an assert statement.
Add a report statement.
Add a sig_assign statement.
Add a var_assign statement.
Add a call statement.
Add an if statement.
Add a case statement.
Add a while loop statement.
Add a next statement.
Add a return statement.
Add a null statement.
pub fn add_sensitivity_list<I>(
&self,
ast: Spanned<I>
) -> Result<Spanned<SensitivityList>> where
I: IntoIterator<Item = &'ast CompoundName>,
pub fn add_sensitivity_list<I>(
&self,
ast: Spanned<I>
) -> Result<Spanned<SensitivityList>> where
I: IntoIterator<Item = &'ast CompoundName>,
Add a sensitivity list.
Add a label.
Immediately resolves the label name and returns the corresponding statement.
Add a target variable.
This is an target for a variable assignment.
Add a type declaration.
pub fn add_type_data(
&self,
id: TypeDeclRef,
name: Spanned<Name>,
data: &'ast Spanned<TypeData>
) -> Result<Spanned<TypeData>>
pub fn add_type_data(
&self,
id: TypeDeclRef,
name: Spanned<Name>,
data: &'ast Spanned<TypeData>
) -> Result<Spanned<TypeData>>
Add a type definition.
Trait Implementations
impl<'sbc, 'lazy: 'sbc, 'sb: 'lazy, 'ast: 'sb, 'ctx: 'sb> Clone for AddContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
impl<'sbc, 'lazy: 'sbc, 'sb: 'lazy, 'ast: 'sb, 'ctx: 'sb> Clone for AddContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
Emit a diagnostic message.
impl<'sbc, 'lazy: 'sbc, 'sb: 'lazy, 'ast: 'sb, 'ctx: 'sb> Copy for AddContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
Auto Trait Implementations
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> !RefUnwindSafe for AddContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> !Send for AddContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> !Sync for AddContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Unpin for AddContext<'sbc, 'lazy, 'sb, 'ast, 'ctx> where
'ast: 'sbc,
'ctx: 'sbc,
'lazy: 'sbc,
'sb: 'sbc,
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> !UnwindSafe for AddContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
Blanket Implementations
Mutably borrows from an owned value. Read more