toon_codec/decode/validation

Validation functions for strict mode decoding.

This module provides functions to validate counts, indentation, and other structural requirements in strict mode. Validate that actual count matches expected count.

Used in strict mode to ensure array lengths match declarations. Validate row width in tabular arrays. Validate that indentation is a multiple of indent_size.

Values

pub fn validate_count(
  expected: Int,
  actual: Int,
  context: String,
) -> Result(Nil, error.ToonError)
pub fn validate_indentation(
  indent: Int,
  indent_size: Int,
  line: Int,
) -> Result(Nil, error.ToonError)
pub fn validate_row_width(
  expected: Int,
  actual: Int,
  row_number: Int,
) -> Result(Nil, error.ToonError)
Search Document