Skip to main content

validate

Function validate 

Source
pub fn validate(def: &DecoderDef) -> Result<ValidatedDef, Vec<Error>>
Expand description

Validate a decoder definition and convert to a validated IR.

This performs multiple checks and transformations:

  • Converts bit ranges from DSL notation to hardware notation
  • Checks for duplicate names
  • Resolves field types
  • Validates bit coverage and patterns

The result is language-agnostic. Language-specific configuration (type mappings, dispatch strategies) is supplied separately to backends.