PorygonLang/src/Diagnostics/ErrorMessages-EN-US.cpp

34 lines
2.2 KiB
C++

#include <unordered_map>
#include "DiagnosticCode.hpp"
namespace Porygon::Diagnostics {
const std::unordered_map<DiagnosticCode, const char*> ErrorMessages{ // NOLINT(cert-err58-cpp)
{DiagnosticCode ::UnexpectedCharacter, "Encountered an unexpected character: '{0}'."},
{DiagnosticCode ::InvalidStringControlCharacter, "'{0}' is not a valid control character."},
{DiagnosticCode ::UnexpectedToken, "Encountered unexpected token kind."},
{DiagnosticCode ::NoBinaryOperationFound, "No binary operation found for these operands and operator."},
{DiagnosticCode ::NoUnaryOperationFound, "No unary operation found for this operand and operator."},
{DiagnosticCode ::CantAssignVariable, "Something went wrong while assigning variable."},
{DiagnosticCode ::VariableNotFound, "Variable '{0}' not found."},
{DiagnosticCode ::ExpressionIsNotAFunction, "Called expression is not a function."},
{DiagnosticCode ::CantIndex, "Unable to index type {0} with {1}."},
{DiagnosticCode ::InvalidReturnType, "Invalid return type."},
{DiagnosticCode ::ConditionNotABool, "A condition should return a bool."},
{DiagnosticCode ::InvalidTableValueType, "This is an invalid table value type."},
{DiagnosticCode ::InvalidTypeName, "This type name is not valid."},
{DiagnosticCode ::UserDataFieldNoGetter, "This userdata field does not have a getter."},
{DiagnosticCode ::UserDataFieldNoSetter, "This userdata field does not have a setter."},
{DiagnosticCode ::NumericalForArgumentNotANumber, "A numerical for argument should be a number."},
{DiagnosticCode ::CantIterateExpression, "Can't iterate over given expression."},
{DiagnosticCode ::InvalidFunctionParameters, "No function option found for given parameters."},
{DiagnosticCode ::ModuleDoesntExist, "The requested module was not found."},
{DiagnosticCode ::InvalidCast, "No cast found between these two types."},
{DiagnosticCode ::DataLossOnCast, "After this cast data will be lost!"},
{DiagnosticCode ::UnvalidatedCast, "The cast between these two types could not be validated."},
};
}