Moved Domain enum to separate header

For clarity, this moves the Domain enum class to a separate header,
because it’s not just variable-specific but also applicable to
functions, for example.
This commit is contained in:
2018-04-20 16:37:48 +02:00
parent f48802842e
commit ae918a0846
3 changed files with 98 additions and 77 deletions
+1 -7
View File
@@ -2,6 +2,7 @@
#define __ANTHEM__AST_H
#include <anthem/ASTForward.h>
#include <anthem/Domain.h>
#include <anthem/Tristate.h>
namespace anthem
@@ -353,13 +354,6 @@ struct VariableDeclaration
Body
};
enum class Domain
{
Unknown,
General,
Integer
};
explicit VariableDeclaration(Type type)
: type{type},
domain{Domain::Unknown}
+27
View File
@@ -0,0 +1,27 @@
#ifndef __ANTHEM__DOMAIN_H
#define __ANTHEM__DOMAIN_H
namespace anthem
{
namespace ast
{
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Domain
//
////////////////////////////////////////////////////////////////////////////////////////////////////
enum class Domain
{
General,
Integer,
Unknown,
};
////////////////////////////////////////////////////////////////////////////////////////////////////
}
}
#endif