Skip to main content

enumerator

Function enumerator 

Source
pub fn enumerator<V: Source>(
    ast: &Ast,
    type_: Id<TypeNode>,
    value: &V,
    path: &str,
) -> Result<(String, i128), ProbeError>
Expand description

The enumerator a value names, and its effective value.

The name is checked against the declared set by all three backends. Two of them used to paste the name into an identifier without looking: a typo compiled into a different enumerator, or did not compile at all in a place the matrix reads as a vendor difference.

ยงErrors

ProbeError::Mismatch for a value that is not a string, ProbeError::Unknown for a name the enumeration does not declare.