pub trait MapPrimitiveType<Val> {
    type Prim: PrimitiveType;

    // Required method
    fn type_of_literal(&self, lit: &Val) -> Self::Prim;
}
Expand description

Maps a literal value from a certain Grammar to its type. This assumes that all literals are primitive.

Required Associated Types§

source

type Prim: PrimitiveType

Types of literals output by this mapper.

Required Methods§

source

fn type_of_literal(&self, lit: &Val) -> Self::Prim

Gets the type of the provided literal value.

Implementors§

source§

impl<Val> MapPrimitiveType<Val> for NumArithmeticwhere Val: Clone + NumOps + PartialEq,

§

type Prim = Num