30 lines
435 B
C++
30 lines
435 B
C++
#pragma once
|
|
#include <execute/state.hpp>
|
|
#include <token/token.hpp>
|
|
|
|
namespace Interpret
|
|
{
|
|
enum class ValueType
|
|
{
|
|
Register,
|
|
ImmediateInteger,
|
|
MemoryLocation
|
|
};
|
|
|
|
enum class ValueDataType
|
|
{
|
|
Register,
|
|
Immediate
|
|
};
|
|
|
|
struct Value
|
|
{
|
|
ValueType type;
|
|
ValueDataType dataType;
|
|
int data;
|
|
|
|
int & GetValue(Execute::State & state, Execute::Registers & registers);
|
|
|
|
void CreateFromToken(Token::Token const & token);
|
|
};
|
|
} |