Format with clang
This commit is contained in:
@@ -7,47 +7,58 @@
|
||||
|
||||
namespace Token
|
||||
{
|
||||
enum class TokenValueType
|
||||
{
|
||||
None = 0,
|
||||
Integer,
|
||||
Operand,
|
||||
Register,
|
||||
String
|
||||
};
|
||||
enum class TokenValueType
|
||||
{
|
||||
None = 0,
|
||||
Integer,
|
||||
Operand,
|
||||
Register,
|
||||
String
|
||||
};
|
||||
|
||||
struct Token
|
||||
{
|
||||
private:
|
||||
Token(TokenType type, bool validness, int const lineNumber, int const lineColumn);
|
||||
Token(TokenType type, std::string const & string, bool validness, int const lineNumber, int const lineColumn);
|
||||
Token(TokenType type, int value, bool validness, int const lineNumber, int const lineColumn);
|
||||
Token(TokenType type, RegisterType const registerType, bool validness, int const lineNumber, int const lineColumn);
|
||||
Token(TokenType type, OperandType const OperandType, bool validness, int const lineNumber, int const lineColumn);
|
||||
struct Token
|
||||
{
|
||||
private:
|
||||
Token(TokenType type, bool validness, int const lineNumber, int const lineColumn);
|
||||
Token(TokenType type, std::string const & string, bool validness, int const lineNumber, int const lineColumn);
|
||||
Token(TokenType type, int value, bool validness, int const lineNumber, int const lineColumn);
|
||||
Token(
|
||||
TokenType type,
|
||||
RegisterType const registerType,
|
||||
bool validness,
|
||||
int const lineNumber,
|
||||
int const lineColumn);
|
||||
Token(
|
||||
TokenType type,
|
||||
OperandType const OperandType,
|
||||
bool validness,
|
||||
int const lineNumber,
|
||||
int const lineColumn);
|
||||
|
||||
public:
|
||||
int const lineNumber;
|
||||
int const lineColumn;
|
||||
TokenType type;
|
||||
TokenValueType const valueType;
|
||||
bool isValid;
|
||||
std::variant<OperandType, RegisterType, int, std::string> data;
|
||||
std::string errorMessage;
|
||||
public:
|
||||
int const lineNumber;
|
||||
int const lineColumn;
|
||||
TokenType type;
|
||||
TokenValueType const valueType;
|
||||
bool isValid;
|
||||
std::variant<OperandType, RegisterType, int, std::string> data;
|
||||
std::string errorMessage;
|
||||
|
||||
Token(Token const & other);
|
||||
Token(Token const & other);
|
||||
|
||||
static Token CreateEmptyToken(int const lineNumber, int const lineColumn);
|
||||
static Token CreateErrorToken(std::string const & message, TokenType const type, int const lineNumber, int const lineColumn);
|
||||
static Token CreateStatementEndToken(int const lineNumber, int const lineColumn);
|
||||
static Token CreateLabelDefinitionToken(std::string const & string, int const lineNumber, int const lineColumn);
|
||||
static Token CreateLabelArgumentToken(std::string const & string, int const lineNumber, int const lineColumn);
|
||||
static Token CreateImmediateValueToken(int const value, int const lineNumber, int const lineColumn);
|
||||
static Token CreateRegisterToken(RegisterType const registerType, int const lineNumber, int const lineColumn);
|
||||
static Token CreateOperandToken(OperandType const operandType, int const lineNumber, int const lineColumn);
|
||||
static Token CreateMemoryToken(RegisterType const registerType, int const lineNumber, int const lineColumn);
|
||||
static Token CreateMemoryToken(int const value, int const lineNumber, int const lineColumn);
|
||||
static Token CreateEmptyToken(int const lineNumber, int const lineColumn);
|
||||
static Token
|
||||
CreateErrorToken(std::string const & message, TokenType const type, int const lineNumber, int const lineColumn);
|
||||
static Token CreateStatementEndToken(int const lineNumber, int const lineColumn);
|
||||
static Token CreateLabelDefinitionToken(std::string const & string, int const lineNumber, int const lineColumn);
|
||||
static Token CreateLabelArgumentToken(std::string const & string, int const lineNumber, int const lineColumn);
|
||||
static Token CreateImmediateValueToken(int const value, int const lineNumber, int const lineColumn);
|
||||
static Token CreateRegisterToken(RegisterType const registerType, int const lineNumber, int const lineColumn);
|
||||
static Token CreateOperandToken(OperandType const operandType, int const lineNumber, int const lineColumn);
|
||||
static Token CreateMemoryToken(RegisterType const registerType, int const lineNumber, int const lineColumn);
|
||||
static Token CreateMemoryToken(int const value, int const lineNumber, int const lineColumn);
|
||||
|
||||
std::string GetName() const;
|
||||
void Print() const;
|
||||
};
|
||||
std::string GetName() const;
|
||||
void Print() const;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user