Move Diagnostics to separate namespace

This commit is contained in:
2019-06-18 16:39:36 +02:00
parent 88df299e14
commit e07d5cb7cb
11 changed files with 127 additions and 118 deletions

View File

@@ -2,29 +2,30 @@
#ifndef PORYGONLANG_DIAGNOSTICCODE_HPP
#define PORYGONLANG_DIAGNOSTICCODE_HPP
enum class DiagnosticCode{
// Lex diagnostics
UnexpectedCharacter,
InvalidStringControlCharacter,
namespace Porygon::Diagnostics {
enum class DiagnosticCode {
// Lex diagnostics
UnexpectedCharacter,
InvalidStringControlCharacter,
// Parse diagnostics
UnexpectedToken,
// Bind diagnostics
NoBinaryOperationFound,
NoUnaryOperationFound,
CantAssignVariable,
VariableNotFound,
ExpressionIsNotAFunction,
ParameterCountMismatch,
ParameterTypeMismatch,
CantIndex,
InvalidReturnType,
ConditionNotABool,
InvalidTableValueType,
InvalidTypeName,
UserDataFieldNoGetter,
UserDataFieldNoSetter
};
// Parse diagnostics
UnexpectedToken,
// Bind diagnostics
NoBinaryOperationFound,
NoUnaryOperationFound,
CantAssignVariable,
VariableNotFound,
ExpressionIsNotAFunction,
ParameterCountMismatch,
ParameterTypeMismatch,
CantIndex,
InvalidReturnType,
ConditionNotABool,
InvalidTableValueType,
InvalidTypeName,
UserDataFieldNoGetter,
UserDataFieldNoSetter
};
}
#endif //PORYGONLANG_DIAGNOSTICCODE_HPP