[−][src]Struct moore_vhdl::typeck::TypeckContext
A context to typecheck things in.
This context helps checking the types of things and keeping track of errors.
Fields
ctx: &'sbc ScoreContext<'lazy, 'sb, 'ast, 'ctx>The parent context.
Implementations
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
pub fn new(
ctx: &'sbc ScoreContext<'lazy, 'sb, 'ast, 'ctx>
) -> TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
ctx: &'sbc ScoreContext<'lazy, 'sb, 'ast, 'ctx>
) -> TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
Create a new type checking context.
pub fn finish(self) -> bool[src]
Consume the context and return the result of the typeck.
pub fn emit(&self, diag: DiagBuilder2)[src]
Emit a diagnostic message.
pub fn lazy_typeck<I>(&self, id: I) where
I: Into<NodeId>, [src]
I: Into<NodeId>,
Check the type of a node.
If the node already had its type checked, immediately returns the result of that operation. Otherwise runs the task scheduled in the lazy table.
pub fn lazy_typeval<I>(&self, id: I) -> Result<&'ctx Ty> where
I: Into<NodeId>, [src]
I: Into<NodeId>,
Determine the type of a node.
If the node already had its type determined, immediately returns the result of that operation. Otherwise runs the task scheduled in the lazy table.
pub fn must_match(&self, exp: &'ctx Ty, act: &'ctx Ty, span: Span) -> bool[src]
Ensure that two types are compatible.
pub fn must_cast(&self, into: &'ctx Ty, from: &'ctx Ty, span: Span) -> bool[src]
Ensure that one type can be cast into the other.
pub fn typeck_delay_mechanism(&self, _node: &'ctx DelayMechanism)[src]
Type check the time expression in a delay mechanism.
pub fn typeck_waveform(&self, node: &'ctx Waveform, exp: &'ctx Ty)[src]
Type check a waveform.
pub fn typeck_wave_elem(&self, node: &'ctx WaveElem, _exp: &'ctx Ty)[src]
Type check a waveform element.
pub fn typeck_subprog_spec(&self, node: &'ctx SubprogSpec)[src]
Type check a subprogram specification.
pub fn typeck_node<I>(&self, id: I, exp: &'ctx Ty) where
I: 'ctx + Copy + Debug + Into<NodeId>,
ScoreContext<'lazy, 'sb, 'ast, 'ctx>: NodeMaker<I, &'ctx Ty>, [src]
I: 'ctx + Copy + Debug + Into<NodeId>,
ScoreContext<'lazy, 'sb, 'ast, 'ctx>: NodeMaker<I, &'ctx Ty>,
Type check any node that can have its type calculated.
pub fn typeck_slice<T, I>(&self, ids: T) where
T: AsRef<[I]>,
I: Copy,
TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>: Typeck<I>, [src]
T: AsRef<[I]>,
I: Copy,
TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>: Typeck<I>,
Type check a slice of nodes.
pub fn apply_range_constraint(
&self,
ty: &Ty,
con: Spanned<&Range>
) -> Result<&'ctx Ty>[src]
&self,
ty: &Ty,
con: Spanned<&Range>
) -> Result<&'ctx Ty>
Apply a range constraint to a type.
pub fn apply_array_constraint(
&self,
ty: &'ctx Ty,
con: Spanned<&ArrayConstraint>
) -> Result<&'ctx Ty>[src]
&self,
ty: &'ctx Ty,
con: Spanned<&ArrayConstraint>
) -> Result<&'ctx Ty>
Apply an array constraint to a type.
pub fn apply_record_constraint(
&self,
ty: &'ctx Ty,
con: Spanned<&RecordConstraint>
) -> Result<&'ctx Ty>[src]
&self,
ty: &'ctx Ty,
con: Spanned<&RecordConstraint>
) -> Result<&'ctx Ty>
Apply a record constraint to a type.
pub fn apply_index_constraint(
&self,
index: &'ctx ArrayIndex,
con: Spanned<&DiscreteRange>
) -> Result<ArrayIndex>[src]
&self,
index: &'ctx ArrayIndex,
con: Spanned<&DiscreteRange>
) -> Result<ArrayIndex>
Apply an index constraint to an array index.
pub fn apply_subtype(
&self,
orig_ty: &'ctx Ty,
subty: Spanned<&Ty>
) -> Result<&'ctx Ty>[src]
&self,
orig_ty: &'ctx Ty,
subty: Spanned<&Ty>
) -> Result<&'ctx Ty>
Impose a subtype on a type.
pub fn type_from_discrete_range(
&self,
range: Spanned<&DiscreteRange>
) -> Result<&'ctx Ty>[src]
&self,
range: Spanned<&DiscreteRange>
) -> Result<&'ctx Ty>
Evaluate a discrete range as a type.
pub fn type_from_range(&self, range: Spanned<&Range>) -> Result<&'ctx Ty>[src]
Evaluate a range as a type.
Trait Implementations
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<AliasDeclRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: AliasDeclRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<ArchRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<AttrDeclRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: AttrDeclRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<AttrSpecRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: AttrSpecRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<BlockStmtRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: BlockStmtRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<CaseGenStmtRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: CaseGenStmtRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<CfgRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<CfgSpecRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: CfgSpecRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<CompDeclRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: CompDeclRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<CompInstStmtRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: CompInstStmtRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<ConcAssertStmtRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: ConcAssertStmtRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<ConcCallStmtRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: ConcCallStmtRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<ConcSigAssignStmtRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: ConcSigAssignStmtRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<ConcStmtRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: ConcStmtRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<ConstDeclRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: ConstDeclRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<CtxRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<DeclInBlockRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: DeclInBlockRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<DeclInPkgBodyRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: DeclInPkgBodyRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<DeclInPkgRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: DeclInPkgRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<DeclInProcRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: DeclInProcRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<DeclInSubprogRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: DeclInSubprogRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<DisconSpecRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: DisconSpecRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<EntityRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<FileDeclRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: FileDeclRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<ForGenStmtRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: ForGenStmtRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<GenericRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: GenericRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<GroupDeclRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: GroupDeclRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<GroupTempRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: GroupTempRef)[src]
impl<'sbc, 'lazy: 'sbc, 'sb: 'lazy, 'ast: 'sb, 'ctx: 'sb, I> Typeck<I> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx> where
ScoreContext<'lazy, 'sb, 'ast, 'ctx>: NodeMaker<I, &'ctx Ty>, [src]
ScoreContext<'lazy, 'sb, 'ast, 'ctx>: NodeMaker<I, &'ctx Ty>,
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<IfGenStmtRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: IfGenStmtRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<IntfPkgRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: IntfPkgRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<IntfSubprogRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: IntfSubprogRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<IntfTypeRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: IntfTypeRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<LibRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<PkgBodyRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: PkgBodyRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<PkgDeclRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: PkgDeclRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<PkgInstRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: PkgInstRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<ProcessStmtRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: ProcessStmtRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<SeqStmtRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: SeqStmtRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<SigAssignStmtRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: SigAssignStmtRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<SignalDeclRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: SignalDeclRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<SubprogBodyRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: SubprogBodyRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<SubprogDeclRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: SubprogDeclRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<SubprogInstRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: SubprogInstRef)[src]
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Typeck<VarDeclRef> for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>[src]
fn typeck(&self, id: VarDeclRef)[src]
Auto Trait Implementations
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> !RefUnwindSafe for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> !Send for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> !Sync for TypeckContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> Unpin for TypeckContext<'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 TypeckContext<'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, 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>,