diff --git a/src/errors.cpp b/src/errors.cpp index b1ffbc1..ba55fd2 100644 --- a/src/errors.cpp +++ b/src/errors.cpp @@ -24,6 +24,7 @@ string UserError::get_message(void) const { case ErrorType::TypeNotCastable: return "Can't find an explicit cast to "+get(this->data)+"'"; case ErrorType::TypesNotComparable: return "Types not comparable"; case ErrorType::ExpectedIntegralType: return "Expression must have integral type"; + case ErrorType::NestedFunction: return "Function definition is not allowed here"; case ErrorType::ExpectedArithmeticType: return "Expression must have arithmetic type"; case ErrorType::UnknownIdentifier: return "Unknown identifier '"+get(this->data)+"'"; case ErrorType::AlreadyDeclaredIdentifier: return "Already declared identifier '"+get(this->data)+"'"; diff --git a/src/include/errors.h b/src/include/errors.h index df1dd26..4f0f54e 100644 --- a/src/include/errors.h +++ b/src/include/errors.h @@ -33,6 +33,7 @@ enum class ErrorType { TypesNotComparable, ExpectedIntegralType, ExpectedArithmeticType, + NestedFunction, // Runtime UnknownIdentifier,