PorygonLang/src/Diagnostics/DiagnosticCode.hpp

42 lines
996 B
C++
Raw Normal View History

2019-05-21 11:56:08 +00:00
#ifndef PORYGONLANG_DIAGNOSTICCODE_HPP
#define PORYGONLANG_DIAGNOSTICCODE_HPP
2019-06-18 14:39:36 +00:00
namespace Porygon::Diagnostics {
2019-08-11 14:05:14 +00:00
enum class DiagnosticCode : uint8_t {
2019-06-18 14:39:36 +00:00
// Lex diagnostics
2019-06-18 17:56:47 +00:00
UnexpectedCharacter,
2019-06-18 14:39:36 +00:00
InvalidStringControlCharacter,
2019-05-22 11:24:28 +00:00
2019-06-18 14:39:36 +00:00
// Parse diagnostics
2019-06-18 17:56:47 +00:00
UnexpectedToken,
2019-05-21 11:56:08 +00:00
// Bind errors
2019-06-18 17:56:47 +00:00
NoBinaryOperationFound,
2019-06-18 14:39:36 +00:00
NoUnaryOperationFound,
CantAssignVariable,
VariableNotFound,
ExpressionIsNotAFunction,
CantIndex,
2019-09-15 11:08:11 +00:00
CantIndexAssign,
2019-06-18 14:39:36 +00:00
InvalidReturnType,
ConditionNotABool,
InvalidTableValueType,
InvalidTypeName,
UserDataFieldNoGetter,
2019-06-22 15:35:33 +00:00
UserDataFieldNoSetter,
2019-06-26 14:19:34 +00:00
NumericalForArgumentNotANumber,
CantIterateExpression,
2019-08-10 14:45:15 +00:00
InvalidFunctionParameters,
ModuleDoesntExist,
2019-08-18 12:32:14 +00:00
InvalidCast,
// Bind warnings
2019-08-18 12:32:14 +00:00
DataLossOnCast,
// Bind info
UnvalidatedCast,
2019-06-18 14:39:36 +00:00
};
}
2019-05-21 11:56:08 +00:00
#endif //PORYGONLANG_DIAGNOSTICCODE_HPP