Add control flow operands
This commit is contained in:
@@ -25,18 +25,18 @@ namespace Interpret
|
||||
void Execute(Execute::Flags & flags, Execute::State & state, Execute::Registers & registers) override;
|
||||
};
|
||||
|
||||
struct TwoArgumentStatement : Statement
|
||||
struct ControlFlowStatement : Statement
|
||||
{
|
||||
void (* function)(Execute::Flags & flags, int argument1, int argument2);
|
||||
void (* function)(Execute::State & state, int argument1, int argument2);
|
||||
Value firstArgument;
|
||||
Value secondArgument;
|
||||
|
||||
void Execute(Execute::Flags & flags, Execute::State & state, Execute::Registers & registers) override;
|
||||
};
|
||||
|
||||
struct ThreeArgumentStatement : Statement
|
||||
struct ArithmeticStatement : Statement
|
||||
{
|
||||
void (* function)(Execute::Flags & flags, int argument1, int argument2, int & argument3);
|
||||
void (* function)(int argument1, int argument2, int & argument3);
|
||||
Value firstArgument;
|
||||
Value secondArgument;
|
||||
Value thirdArgument;
|
||||
|
||||
@@ -12,7 +12,10 @@ namespace Token
|
||||
MultiplyInteger,
|
||||
ShiftIntegerLeft,
|
||||
ShiftIntegerRight,
|
||||
Jump
|
||||
Jump,
|
||||
LessThanInteger,
|
||||
GreaterThanInteger,
|
||||
EqualInteger
|
||||
};
|
||||
|
||||
OperandType GetOperandType(std::string const & op);
|
||||
|
||||
Reference in New Issue
Block a user