#[derive(thiserror::Error, Debug, Clone, PartialEq, Eq)]
pub enum ModuleError {
#[error("The 'Attribute' keyword is missing from the module file header.")]
AttributeKeywordMissing,
#[error(
"The 'Attribute' keyword and the 'VB_Name' attribute must be separated by at least one ASCII whitespace character."
)]
MissingWhitespaceInHeader,
#[error("The 'VB_Name' attribute is missing from the module file header.")]
VBNameAttributeMissing,
#[error("The 'VB_Name' attribute is missing the equal symbol from the module file header.")]
EqualMissing,
#[error("The 'VB_Name' attribute is unquoted.")]
VBNameAttributeValueUnquoted,
#[error("Control flow nesting depth ({depth}) exceeds maximum allowed depth ({max_depth})")]
NestingTooDeep {
depth: usize,
max_depth: usize,
},
#[error(
"Invalid ';' separator in procedure call arguments. Semicolon separators are only valid for print-like calls (e.g., Debug.Print, Printer.Print)."
)]
InvalidSemicolonSeparatorInProcedureCall,
}