This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.
pubconstError = union(enum) {
/// The number has leading zeroes.leading_zero,
/// Expected a digit after base prefix.digit_after_base,
/// The base prefix is in uppercase.upper_case_base: usize,
/// Float literal has an invalid base prefix.invalid_float_base: usize,
/// Repeated '_' digit separator.repeated_underscore: usize,
/// '_' digit separator after special character (+-.)invalid_underscore_after_special: usize,
/// Invalid digit for the specified base.invalid_digit: struct { i: usize, base: Base },
/// Invalid digit for an exponent.invalid_digit_exponent: usize,
/// Float literal has multiple periods.duplicate_period,
/// Float literal has multiple exponents.duplicate_exponent: usize,
/// Exponent comes directly after '_' digit separator.exponent_after_underscore: usize,
/// Special character (+-.) comes directly after underscore.special_after_underscore: usize,
/// Number ends in special character (+-.)trailing_special: usize,
/// Number ends in '_' digit separator.trailing_underscore: usize,
/// Character not in [0-9a-zA-Z.+-_]invalid_character: usize,
/// [+-] not immediately after [pPeE]invalid_exponent_sign: usize,
/// Period comes after exponent.period_after_exponent: usize,
}