Struct moore_vhdl::term::TermContext [] [src]

pub struct TermContext<'sbc, 'lazy: 'sbc, 'sb: 'lazy, 'ast: 'sb, 'ctx: 'sb> {
    pub ctx: &'sbc ScoreContext<'lazy, 'sb, 'ast, 'ctx>,
    pub scope: ScopeRef,
}

A context within which termification can occur.

Fields

The underlying scoreboard context.

The scope within which the terms will resolve their names.

Methods

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

[src]

Create a new termification context.

[src]

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.

[src]

Map an AST subtype indication to a term.

[src]

Map an AST expression to a term.

[src]

Map an AST literal to a term.

[src]

Map an AST compound name to a term.

[src]

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.

[src]

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

[src]

Map multiple parenthesis elements to a term.

[src]

Map a latent name to a term.

[src]

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

[src]

Same as term_to_expr, but the result is spanned.

[src]

Map a term to an expression.

[src]

Map a term to a type mark.

[src]

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.

[src]

Map a term to a subtype indication.

[src]

Map a term to a resolution indication.

[src]

Map a term to a constraint.

[src]

Map a term to an array constraint.

[src]

Map a term to a record constraint.

[src]

Map a term to an element constraint.

[src]

Map a term to a discrete range.

[src]

Map a term to a range.

[src]

Map a term to a definition.

This works for terms that are actually identifiers.

[src]

Map a term to a label.

Returns the statement the label refers to.

[src]

Map a term to a signal.

[src]

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.

[src]

Map a term to an aggregate.

See IEEE 1076-2008 section 9.3.3.1.

[src]

Map a term to an association list.

See IEEE 1076-2008 section 6.5.7.

[src]

Map a term to an association actual.

Trait Implementations

impl<'sbc, 'lazy, 'sb, 'ast, 'ctx> DiagEmitter for TermContext<'sbc, 'lazy, 'sb, 'ast, 'ctx>
[src]

[src]

Emit a diagnostic message.