Skip to main content

member_value

Function member_value 

Source
pub fn member_value(
    ast: &Ast,
    node: &MemberNode,
    type_: Id<TypeNode>,
) -> Result<Expr, EncodeError>
Expand description

One member’s default: its @default, or its type’s Table 9 value. §7.2.2.4.4.4.9 puts the explicit one first.

§Errors

EncodeError::NoWriter where a @default names a value this column cannot spell — refused rather than silently replaced by Table 9’s zero, which is a different sample from the one the designer declared.