[][src]Struct moore_vhdl::defs::DefsContext

pub struct DefsContext<'sbc, 'lazy: 'sbc, 'sb: 'lazy, 'ast: 'sb, 'ctx: 'sb> { /* fields omitted */ }

A context to declare things in.

This context helps gather the definitions in a scope. It accepts definitions and keeps track of errors that occurred. Once done the context can be converted into the actual definitions, which fails in case of errors.

Implementations

impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> DefsContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]

pub fn new(
    ctx: &'sbc ScoreContext<'lazy, 'sb, 'ast, 'ctx>
) -> DefsContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
[src]

Create a new definition context.

pub fn finish(self) -> Result<Defs>[src]

Consume the context and return the definitions that were made.

Returns an error if an error occurred during the earlier gathering of definitions.

pub fn emit(&mut self, diag: DiagBuilder2)[src]

Emit a diagnostic message.

pub fn declare(&mut self, name: Spanned<ResolvableName>, def: Def)[src]

Declare a name in the scope.

pub fn declare_primary_name(&mut self, name: &PrimaryName, def: Def)[src]

Declare a primary name in the scope.

This converts the name to a ResolvableName and calls declare().

pub fn declare_pkg(&mut self, id: PkgDeclRef)[src]

Handle package declarations.

pub fn declare_pkg_inst(&mut self, id: PkgInstRef)[src]

Handle package instantiations.

pub fn declare_type(&mut self, id: TypeDeclRef)[src]

Handle type declarations.

pub fn declare_subtype(&mut self, id: SubtypeDeclRef)[src]

Handle subtype declarations.

pub fn declare_any_in_block(&mut self, id: DeclInBlockRef)[src]

Handle any of the declarations that can appear in a block.

pub fn declare_any_in_pkg(&mut self, id: DeclInPkgRef)[src]

Handle any of the declarations that can appear in a package.

pub fn declare_any_in_pkg_body(&mut self, id: DeclInPkgBodyRef)[src]

Handle any of the declarations that can appear in a package.

pub fn declare_any_in_subprog(&mut self, id: DeclInSubprogRef)[src]

Handle any of the declarations that can appear in a subprogram.

pub fn declare_any_in_process(&mut self, id: DeclInProcRef)[src]

Handle any of the declarations that can appear in a process.

pub fn declare_const(&mut self, id: ConstDeclRef)[src]

Handle a constant declaration.

pub fn declare_signal(&mut self, id: SignalDeclRef)[src]

Handle a signal declaration.

pub fn declare_var(&mut self, id: VarDeclRef)[src]

Handle a variable declaration.

pub fn declare_file(&mut self, id: FileDeclRef)[src]

Handle a file declaration.

pub fn declare_alias(&mut self, id: AliasDeclRef)[src]

Handle an alias declaration.

pub fn declare_comp(&mut self, id: CompDeclRef)[src]

Handle a component declaration.

pub fn declare_attr(&mut self, id: AttrDeclRef)[src]

Handle an attribute declaration.

pub fn declare_group_temp(&mut self, id: GroupTempRef)[src]

Handle a group template declaration.

pub fn declare_group(&mut self, id: GroupDeclRef)[src]

Handle a group declaration.

pub fn declare_subprog(&mut self, id: SubprogDeclRef)[src]

Handle subprogram declarations.

pub fn declare_subprog_inst(&mut self, id: SubprogInstRef)[src]

Handle subprogram instantiations.

pub fn declare_subprog_spec(&mut self, hir: &SubprogSpec)[src]

Handle subprogram specifications.

Note that this does not declare the subprogram itself, but rather its parameters and generics.

pub fn declare_intf_objs(&mut self, ids: &[IntfObjRef])[src]

Handle interface objects.

These are mainly subprogram parameters and entity ports.

pub fn declare_generics(&mut self, ids: &[GenericRef])[src]

Handle generics.

Auto Trait Implementations

impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> !RefUnwindSafe for DefsContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>

impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> !Send for DefsContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>

impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> !Sync for DefsContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>

impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Unpin for DefsContext<'sbc, 'lazy, 'sb, 'ast, 'ctx> where
    'ast: 'sbc,
    'ctx: 'sbc,
    'lazy: 'sbc,
    'sb: 'sbc, 

impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> !UnwindSafe for DefsContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.