pub struct TermContext<C, S, D> {
    pub ctx: C,
    pub scope: S,
    /* private fields */
}
Expand description

A context within which termification can occur.

Fields

ctx: C

The underlying scoreboard context.

scope: S

The scope within which the terms will resolve their names.

Implementations

Perform term folding.

This is a post-processing step that should be applied to all terms once they are constructed. Folding applies transformations to the terms, e.g. changing Ident(Type|Subtype) to TypeMark, or gobbling up subtype constraints where appropriate.

Map an AST literal to a term.

Make sure the term is not an unresolved name.

This function emits a diagnostic if the term is Term::Unresolved(..). It is non-recursive.

Map an AST compound name to a term.

Map a resolvable name to a term.

This function is the bottom of the pit. Names are resolved here and mapped to the corresponding term. Calling functions may then proceed to handle the term as they see fit, usually inspecting what exact kind the term is of.

Map multiple parenthesis elements to a term.

Map an AST subtype indication to a term.

Map an AST expression to a term.

Create a new termification context.

Map a latent name to a term.

Map a term to an expression and schedule the necessary tasks.

Same as term_to_expr, but the result is spanned.

Map a term to an expression.

Map a term to a type mark.

Perform term folding expecting to yield a type.

This is a pre-processing step on terms. It is applied as soon as it is clear that a certain term should yield a type, e.g. when mapping to a subtype indication. This function performs certain precedence swaps and combines terms into higher level ones, e.g. Term::SubtypeInd.

Map a term to a subtype indication.

Map a term to a resolution indication.

Map a term to a constraint.

Map a term to an array constraint.

Map a term to a record constraint.

Map a term to an element constraint.

Map a term to a discrete range.

Map a term to a range.

Map a term to a definition.

This works for terms that are actually identifiers.

Map a term to a label.

Returns the statement the label refers to.

Map a term to a signal.

Map a term to a choice.

See IEEE 1076-2008 section 9.3.3.1. A choice can be a simple expression, a discrete range, an identifier, or the keyword others.

Map a term to an aggregate.

See IEEE 1076-2008 section 9.3.3.1.

Map a term to an association list.

See IEEE 1076-2008 section 6.5.7.

Map a term to an association actual.

Create a new termification context.

Trait Implementations

Termify the result of a name resolution. Read more

Termify the result of a name resolution. Read more

Emit a diagnostic message.

Map a resolvable name to a term, resolving it within a scope.

Map a resolvable name to a term, resolving it within a scope.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.