Struct moore_vhdl::defs::DefsContext
[−]
[src]
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.
Methods
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> DefsContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
[src]
fn new(
ctx: &'sbc ScoreContext<'lazy, 'sb, 'ast, 'ctx>
) -> DefsContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
[src]
ctx: &'sbc ScoreContext<'lazy, 'sb, 'ast, 'ctx>
) -> DefsContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
Create a new definition context.
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.
fn emit(&mut self, diag: DiagBuilder2)
[src]
Emit a diagnostic message.
fn declare(&mut self, name: Spanned<ResolvableName>, def: Def)
[src]
Declare a name in the scope.
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()
.
fn declare_pkg(&mut self, id: PkgDeclRef)
[src]
Handle package declarations.
fn declare_pkg_inst(&mut self, id: PkgInstRef)
[src]
Handle package instantiations.
fn declare_type(&mut self, id: TypeDeclRef)
[src]
Handle type declarations.
fn declare_subtype(&mut self, id: SubtypeDeclRef)
[src]
Handle subtype declarations.
fn declare_any_in_block(&mut self, id: DeclInBlockRef)
[src]
Handle any of the declarations that can appear in a block.
fn declare_any_in_pkg(&mut self, id: DeclInPkgRef)
[src]
Handle any of the declarations that can appear in a package.
fn declare_any_in_pkg_body(&mut self, id: DeclInPkgBodyRef)
[src]
Handle any of the declarations that can appear in a package.
fn declare_any_in_subprog(&mut self, id: DeclInSubprogRef)
[src]
Handle any of the declarations that can appear in a subprogram.
fn declare_any_in_process(&mut self, id: DeclInProcRef)
[src]
Handle any of the declarations that can appear in a process.
fn declare_const(&mut self, id: ConstDeclRef)
[src]
Handle a constant declaration.
fn declare_signal(&mut self, id: SignalDeclRef)
[src]
Handle a signal declaration.
fn declare_var(&mut self, id: VarDeclRef)
[src]
Handle a variable declaration.
fn declare_file(&mut self, id: FileDeclRef)
[src]
Handle a file declaration.
fn declare_alias(&mut self, id: AliasDeclRef)
[src]
Handle an alias declaration.
fn declare_comp(&mut self, id: CompDeclRef)
[src]
Handle a component declaration.
fn declare_attr(&mut self, id: AttrDeclRef)
[src]
Handle an attribute declaration.
fn declare_group_temp(&mut self, id: GroupTempRef)
[src]
Handle a group template declaration.
fn declare_group(&mut self, id: GroupDeclRef)
[src]
Handle a group declaration.
fn declare_subprog(&mut self, id: SubprogDeclRef)
[src]
Handle subprogram declarations.
fn declare_subprog_inst(&mut self, id: SubprogInstRef)
[src]
Handle subprogram instantiations.
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.
fn declare_intf_objs(&mut self, ids: &[IntfObjRef])
[src]
Handle interface objects.
These are mainly subprogram parameters and entity ports.
fn declare_generics(&mut self, ids: &[GenericRef])
[src]
Handle generics.