Add control flow operands
This commit is contained in:
@@ -13,7 +13,10 @@ namespace Token
|
||||
{ "muli", OperandType::MultiplyInteger },
|
||||
{ "shri", OperandType::ShiftIntegerRight },
|
||||
{ "shli", OperandType::ShiftIntegerLeft },
|
||||
{ "jmp", OperandType::Jump }
|
||||
{ "jmp", OperandType::Jump },
|
||||
{ "lti", OperandType::LessThanInteger },
|
||||
{ "gti", OperandType::GreaterThanInteger },
|
||||
{ "eqi", OperandType::EqualInteger },
|
||||
};
|
||||
|
||||
auto const & result = operations.find(op);
|
||||
|
||||
@@ -48,6 +48,7 @@ namespace Token
|
||||
char const postfix = string[string.size() - 1];
|
||||
if (postfix == ':')
|
||||
{
|
||||
// TODO check if label is an Operand?
|
||||
return Token(lineNumber, lineColumn, string.substr(0, string.size() - 1), true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user