This commit is contained in:
ala89 2024-01-03 18:26:33 +01:00
parent a2da815832
commit 0ffb2b4884

View File

@ -32,7 +32,7 @@ string UserError::get_message(void) const {
case ErrorType::ControlReachesEndOfNonVoidFn: return "Control reaches end of non-void function"; case ErrorType::ControlReachesEndOfNonVoidFn: return "Control reaches end of non-void function";
case ErrorType::UnexpectedReturn: return "Return not within a function"; case ErrorType::UnexpectedReturn: return "Return not within a function";
// Analysus // Analysis
case ErrorType::UnknownType: return "Unknown type '"+get<string>(this->data)+"'"; case ErrorType::UnknownType: return "Unknown type '"+get<string>(this->data)+"'";
case ErrorType::TypeNotCastable: return "Can't find an explicit cast to "+get<string>(this->data)+"'"; case ErrorType::TypeNotCastable: return "Can't find an explicit cast to "+get<string>(this->data)+"'";
case ErrorType::TypesNotComparable: return "Types not comparable"; case ErrorType::TypesNotComparable: return "Types not comparable";
@ -51,6 +51,7 @@ string UserError::get_message(void) const {
case ErrorType::UninitializedIdentifier: return "Accessing uninitialized identifier '"+get<string>(this->data)+"'"; case ErrorType::UninitializedIdentifier: return "Accessing uninitialized identifier '"+get<string>(this->data)+"'";
case ErrorType::DivisionByZero: return "Division by 0"; case ErrorType::DivisionByZero: return "Division by 0";
case ErrorType::ModuloByZero: return "Modulo by 0"; case ErrorType::ModuloByZero: return "Modulo by 0";
default: return "Unknown error type"; default: return "Unknown error type";
} }
} }