Enum moore_vhdl::term::Term[][src]

pub enum Term<'t> {
Show 28 variants Null, Open, Others, Default, IntLit(BigInt), FloatLit(BigRational), PhysLit(BigIntSpanned<EitherUnit<'t>>), StrLit(Name), Unresolved(ResolvableName), Ident(Spanned<Def>), Ident2(Spanned<Def2<'t>>), TypeMark(Spanned<TypeMarkRef>), Enum(Vec<Spanned<EnumRef>>), Enum2(Vec<Spanned<Def2<'t>>>), Select(Subterm<'t>, Spanned<ResolvableName>), SelectAll(Subterm<'t>), Range(Spanned<Dir>, Subterm<'t>, Subterm<'t>), RangeSuffix(Subterm<'t>, Subterm<'t>), UnboundedRange(Subterm<'t>), SubtypeInd(Spanned<TypeMarkRef>, Option<Subterm<'t>>, Option<Subterm<'t>>), PrefixParen(Subterm<'t>, Subterm<'t>), SuffixParen(Subterm<'t>, Subterm<'t>), Paren(Vec<Spanned<Term<'t>>>), Aggregate(Vec<(Vec<Spanned<Term<'t>>>, Spanned<Term<'t>>)>), Unary(Spanned<UnaryOp>, Subterm<'t>), Binary(Spanned<BinaryOp>, Subterm<'t>, Subterm<'t>), Qual(Subterm<'t>, Subterm<'t>), New(Subterm<'t>),
}
Expand description

A term.

This is a generalization of expressions and names in VHDL. It allows various parts of the AST to be mapped to a common data structure, and then remapped to the desired output structure. This is useful for example if the parser processes a subtype indication as an expression.

Variants

Null

A term of the form null.

Open

A term of the form open.

Others

A term of the form others.

Default

A term of the form default.

IntLit(BigInt)

An integer literal.

Tuple Fields of IntLit

0: BigInt
FloatLit(BigRational)

A floating point literal.

Tuple Fields of FloatLit

0: BigRational
PhysLit(BigIntSpanned<EitherUnit<'t>>)

A physical literal.

Tuple Fields of PhysLit

0: BigInt1: Spanned<EitherUnit<'t>>
StrLit(Name)

A bit string literal.

Tuple Fields of StrLit

0: Name
Unresolved(ResolvableName)

An unresolved name.

Tuple Fields of Unresolved

0: ResolvableName
Ident(Spanned<Def>)

A term that refers to a definition.

Tuple Fields of Ident

0: Spanned<Def>
Ident2(Spanned<Def2<'t>>)

A term that refers to a definition.

Tuple Fields of Ident2

0: Spanned<Def2<'t>>
TypeMark(Spanned<TypeMarkRef>)

A term that refers to a type or subtype definition.

Tuple Fields of TypeMark

0: Spanned<TypeMarkRef>

A term that refers to an enum variant.

Tuple Fields of Enum

0: Vec<Spanned<EnumRef>>
Enum2(Vec<Spanned<Def2<'t>>>)

A term that refers to an enum variant.

Tuple Fields of Enum2

0: Vec<Spanned<Def2<'t>>>

A term of the form T.<name>.

Tuple Fields of Select

0: Subterm<'t>1: Spanned<ResolvableName>
SelectAll(Subterm<'t>)

A term of the form T.all.

Tuple Fields of SelectAll

0: Subterm<'t>
Range(Spanned<Dir>, Subterm<'t>, Subterm<'t>)

A term of the form T (to|downto) T.

Tuple Fields of Range

0: Spanned<Dir>1: Subterm<'t>2: Subterm<'t>
RangeSuffix(Subterm<'t>, Subterm<'t>)

A term of the form T range T.

Tuple Fields of RangeSuffix

0: Subterm<'t>1: Subterm<'t>
UnboundedRange(Subterm<'t>)

A term of the form T range <>.

Tuple Fields of UnboundedRange

0: Subterm<'t>
SubtypeInd(Spanned<TypeMarkRef>, Option<Subterm<'t>>, Option<Subterm<'t>>)

A term of the form [T] <type_mark> [T]. The first optional subterm is the resolution indication, the second is the constraint.

Tuple Fields of SubtypeInd

0: Spanned<TypeMarkRef>1: Option<Subterm<'t>>2: Option<Subterm<'t>>
PrefixParen(Subterm<'t>, Subterm<'t>)

A term of the form (T) T.

Tuple Fields of PrefixParen

0: Subterm<'t>1: Subterm<'t>
SuffixParen(Subterm<'t>, Subterm<'t>)

A term of the form T (T).

Tuple Fields of SuffixParen

0: Subterm<'t>1: Subterm<'t>
Paren(Vec<Spanned<Term<'t>>>)

A term of the form (T,T,…).

Tuple Fields of Paren

0: Vec<Spanned<Term<'t>>>
Aggregate(Vec<(Vec<Spanned<Term<'t>>>, Spanned<Term<'t>>)>)

A term of the form (T|T|… => T, T|T|… => T, …).

Tuple Fields of Aggregate

0: Vec<(Vec<Spanned<Term<'t>>>, Spanned<Term<'t>>)>
Unary(Spanned<UnaryOp>, Subterm<'t>)

A term of the form op T.

Tuple Fields of Unary

0: Spanned<UnaryOp>1: Subterm<'t>
Binary(Spanned<BinaryOp>, Subterm<'t>, Subterm<'t>)

A term of the form T op T.

Tuple Fields of Binary

0: Spanned<BinaryOp>1: Subterm<'t>2: Subterm<'t>
Qual(Subterm<'t>, Subterm<'t>)

A term of the form T'T.

Tuple Fields of Qual

0: Subterm<'t>1: Subterm<'t>
New(Subterm<'t>)

A term of the form new T.

Tuple Fields of New

0: Subterm<'t>

Trait Implementations

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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.