Basic arithmetic and jump labels
This commit is contained in:
27
include/token/token.hpp
Normal file
27
include/token/token.hpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
#include <token/operandtype.hpp>
|
||||
#include <token/registertype.hpp>
|
||||
#include <token/tokentype.hpp>
|
||||
#include <variant>
|
||||
|
||||
namespace Token
|
||||
{
|
||||
struct Token
|
||||
{
|
||||
int const lineNumber;
|
||||
int const lineColumn;
|
||||
TokenType type;
|
||||
bool isValid;
|
||||
std::variant<OperandType, RegisterType, int, std::string> data;
|
||||
|
||||
Token(int const lineNumber, int const lineColumn);
|
||||
Token(int const lineNumber, int const lineColumn, OperandType operatorType, bool validness);
|
||||
Token(int const lineNumber, int const lineColumn, RegisterType registerType, bool validness);
|
||||
Token(int const lineNumber, int const lineColumn, int value, bool validness);
|
||||
Token(int const lineNumber, int const lineColumn, std::string const & value, bool validness);
|
||||
|
||||
Token(Token const & other);
|
||||
|
||||
void DebugPrint() const;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user