[−][src]Struct moore_vhdl::add_ctx::AddContext
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.
Methods
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> AddContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
[src]
pub fn new(
ctx: &'sbc ScoreContext<'lazy, 'sb, 'ast, 'ctx>,
scope: ScopeRef
) -> AddContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
[src]
ctx: &'sbc ScoreContext<'lazy, 'sb, 'ast, 'ctx>,
scope: ScopeRef
) -> AddContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
Create a new context.
pub fn with_scope(
&self,
scope: ScopeRef
) -> AddContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
[src]
&self,
scope: ScopeRef
) -> AddContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
Create a new context with different scope.
pub fn make<I>(
&self,
span: Span
) -> (MakeContext<'sbc, 'lazy, 'sb, 'ast, 'ctx, I>, I, ScopeRef) where
I: NodeRef,
[src]
&self,
span: Span
) -> (MakeContext<'sbc, 'lazy, 'sb, 'ast, 'ctx, I>, I, ScopeRef) where
I: NodeRef,
Create a new context for describing a node.
pub fn unimp<T, R>(&self, node: &T) -> Result<R> where
T: HasSpan + HasDesc,
[src]
T: HasSpan + HasDesc,
Emit a diagnostic that a node is not implemented.
pub fn add_optional<T, F, R>(
&self,
node: &'ast Option<T>,
f: F
) -> Result<Option<R>> where
F: FnOnce(&Self, &'ast T) -> Result<R>,
[src]
&self,
node: &'ast Option<T>,
f: F
) -> Result<Option<R>> where
F: FnOnce(&Self, &'ast T) -> Result<R>,
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.
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> AddContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
[src]
pub fn add_expr(&self, expr: &'ast Expr) -> Result<ExprRef>
[src]
Add an expression.
pub fn add_expr_hir(&self, hir: Expr) -> Result<ExprRef>
[src]
Add an expression already lowered to HIR.
pub fn schedule_expr(&self, mk: &MakeContext<ExprRef>)
[src]
Schedule expression tasks.
pub fn add_choices<I>(&self, ast: Spanned<I>) -> Result<Spanned<Choices>> where
I: IntoIterator<Item = &'ast Expr>,
[src]
I: IntoIterator<Item = &'ast Expr>,
Add a list of choices.
pub fn add_discrete_range(
&self,
ast: &'ast Expr
) -> Result<Spanned<DiscreteRange>>
[src]
&self,
ast: &'ast Expr
) -> Result<Spanned<DiscreteRange>>
Add a discrete range.
pub fn add_aggregate_hir(&self, hir: Aggregate) -> Result<AggregateRef>
[src]
Add an aggregate already lowered to HIR.
pub fn schedule_aggregate(&self, mk: &MakeContext<AggregateRef>)
[src]
Schedule aggregate tasks.
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> AddContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
[src]
pub fn add_subtype_ind(&self, ind: &'ast SubtypeInd) -> Result<SubtypeIndRef>
[src]
Add a subtype indication.
pub fn add_subtype_ind_hir(&self, hir: SubtypeInd) -> Result<SubtypeIndRef>
[src]
Add a subtype indication already lowered to HIR.
pub fn schedule_subtype_ind(&self, mk: &MakeContext<SubtypeIndRef>)
[src]
Schedule subtype indication tasks.
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> AddContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
[src]
pub fn add_const_decl<I>(&self, decl: &'ast ObjDecl) -> Result<Vec<I>> where
I: From<ConstDeclRef>,
[src]
I: From<ConstDeclRef>,
Add a constant declaration.
pub fn add_signal_decl<I>(&self, decl: &'ast ObjDecl) -> Result<Vec<I>> where
I: From<SignalDeclRef>,
[src]
I: From<SignalDeclRef>,
Add a signal declaration.
pub fn add_var_decl<I>(&self, decl: &'ast ObjDecl) -> Result<Vec<I>> where
I: From<VarDeclRef>,
[src]
I: From<VarDeclRef>,
Add a variable declaration.
pub fn add_file_decl<I>(&self, decl: &'ast ObjDecl) -> Result<Vec<I>> where
I: From<FileDeclRef>,
[src]
I: From<FileDeclRef>,
Add a file declaration.
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> AddContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
[src]
pub fn add_seq_stmts<I, B>(&self, stmts: I, container_name: &str) -> Result<B> where
I: IntoIterator<Item = &'ast Stmt>,
B: FromIterator<SeqStmtRef>,
[src]
I: IntoIterator<Item = &'ast Stmt>,
B: FromIterator<SeqStmtRef>,
Add multiple sequential statements.
pub fn add_seq_stmt(
&self,
stmt: &'ast Stmt,
container_name: &str
) -> Result<SeqStmtRef>
[src]
&self,
stmt: &'ast Stmt,
container_name: &str
) -> Result<SeqStmtRef>
Add a sequential statement.
pub fn add_wait_stmt(&self, stmt: &'ast Stmt) -> Result<WaitStmtRef>
[src]
Add a wait statement.
pub fn add_assert_stmt(&self, stmt: &'ast Stmt) -> Result<AssertStmtRef>
[src]
Add an assert statement.
pub fn add_report_stmt(&self, stmt: &'ast Stmt) -> Result<ReportStmtRef>
[src]
Add a report statement.
pub fn add_sig_assign_stmt(&self, stmt: &'ast Stmt) -> Result<SigAssignStmtRef>
[src]
Add a sig_assign statement.
pub fn add_var_assign_stmt(&self, stmt: &'ast Stmt) -> Result<VarAssignStmtRef>
[src]
Add a var_assign statement.
pub fn add_call_stmt(&self, stmt: &'ast Stmt) -> Result<CallStmtRef>
[src]
Add a call statement.
pub fn add_if_stmt(&self, stmt: &'ast Stmt) -> Result<IfStmtRef>
[src]
Add an if statement.
pub fn add_case_stmt(&self, stmt: &'ast Stmt) -> Result<CaseStmtRef>
[src]
Add a case statement.
pub fn add_loop_stmt(&self, stmt: &'ast Stmt) -> Result<LoopStmtRef>
[src]
Add a while loop statement.
pub fn add_nexit_stmt(&self, stmt: &'ast Stmt) -> Result<NexitStmtRef>
[src]
Add a next statement.
pub fn add_return_stmt(&self, stmt: &'ast Stmt) -> Result<ReturnStmtRef>
[src]
Add a return statement.
pub fn add_null_stmt(&self, stmt: &'ast Stmt) -> Result<NullStmtRef>
[src]
Add a null statement.
pub fn add_sensitivity_list<I>(
&self,
ast: Spanned<I>
) -> Result<Spanned<SensitivityList>> where
I: IntoIterator<Item = &'ast CompoundName>,
[src]
&self,
ast: Spanned<I>
) -> Result<Spanned<SensitivityList>> where
I: IntoIterator<Item = &'ast CompoundName>,
Add a sensitivity list.
pub fn add_label(&self, ast: &'ast Spanned<Name>) -> Result<Spanned<StmtRef>>
[src]
Add a label.
Immediately resolves the label name and returns the corresponding statement.
pub fn add_target(
&self,
ast: &'ast Spanned<AssignTarget>
) -> Result<Spanned<Target>>
[src]
&self,
ast: &'ast Spanned<AssignTarget>
) -> Result<Spanned<Target>>
Add a target variable.
This is an target for a variable assignment.
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> AddContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
[src]
pub fn add_type_decl(&self, decl: &'ast TypeDecl) -> Result<TypeDeclRef>
[src]
Add a type declaration.
pub fn add_type_data(
&self,
id: TypeDeclRef,
name: Spanned<Name>,
data: &'ast Spanned<TypeData>
) -> Result<Spanned<TypeData>>
[src]
&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>
[src]
fn clone(&self) -> AddContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'sbc, 'lazy: 'sbc, 'sb: 'lazy, 'ast: 'sb, 'ctx: 'sb> Copy for AddContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> DiagEmitter for AddContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
[src]
fn emit(&self, diag: DiagBuilder2)
[src]
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,
'ast: 'sbc,
'ctx: 'sbc,
'lazy: 'sbc,
'sb: 'sbc,
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> !UnwindSafe for AddContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,