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:
@@ -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
include/anthem/Domain.h
Normal file
27
include/anthem/Domain.h
Normal 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
|
Reference in New Issue
Block a user