Backup
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#include "arctyx/compiler/Architecture.h"
|
||||
|
||||
ehs::Array<Architecture> Architecture::architectures;
|
||||
|
||||
Architecture::Architecture()
|
||||
: id(0)
|
||||
{
|
||||
@@ -44,7 +46,7 @@ Architecture & Architecture::operator=(const Architecture &arc)
|
||||
return *this;
|
||||
}
|
||||
|
||||
ehs::UInt_64 Architecture::Id() const
|
||||
ehs::UInt_64 Architecture::GetId() const
|
||||
{
|
||||
return id;
|
||||
}
|
||||
@@ -91,3 +93,41 @@ bool Architecture::AddInstruction(Instruction ins)
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Architecture::Has(const ehs::UInt_64 &id)
|
||||
{
|
||||
for (ehs::UInt_64 i = 0; i < architectures.Size(); ++i)
|
||||
if (architectures[i].GetId() == id)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Architecture::Has(const ehs::Str_8 &name)
|
||||
{
|
||||
return Has(name.Hash_64());
|
||||
}
|
||||
|
||||
const Architecture *Architecture::Get(const ehs::UInt_64 &id)
|
||||
{
|
||||
for (ehs::UInt_64 i = 0; i < architectures.Size(); ++i)
|
||||
if (architectures[i].GetId() == id)
|
||||
return &architectures[i];
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const Architecture *Architecture::Get(const ehs::Str_8 &name)
|
||||
{
|
||||
return Get(name.Hash_64());
|
||||
}
|
||||
|
||||
bool Architecture::Add(Architecture arc)
|
||||
{
|
||||
if (Has(arc.GetId()))
|
||||
return false;
|
||||
|
||||
architectures.Push((Architecture &&)arc);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
1
src/compiler/Combination.cpp
Normal file
1
src/compiler/Combination.cpp
Normal file
@@ -0,0 +1 @@
|
||||
#include "arctyx/compiler/Combination.h"
|
1
src/compiler/Keyword.cpp
Normal file
1
src/compiler/Keyword.cpp
Normal file
@@ -0,0 +1 @@
|
||||
#include "arctyx/compiler/Keyword.h"
|
1
src/compiler/Language.cpp
Normal file
1
src/compiler/Language.cpp
Normal file
@@ -0,0 +1 @@
|
||||
#include "arctyx/compiler/Language.h"
|
37
src/compiler/Token.cpp
Normal file
37
src/compiler/Token.cpp
Normal file
@@ -0,0 +1,37 @@
|
||||
#include "arctyx/compiler/Token.h"
|
||||
|
||||
Token::Token()
|
||||
{
|
||||
}
|
||||
|
||||
Token::Token(TokenType type, ehs::Str_8 value)
|
||||
{
|
||||
}
|
||||
|
||||
Token::Token(Token &&token) noexcept
|
||||
{
|
||||
}
|
||||
|
||||
Token::Token(const Token &token)
|
||||
{
|
||||
}
|
||||
|
||||
Token & Token::operator=(Token &&token) noexcept
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
Token & Token::operator=(const Token &token)
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
TokenType Token::GetType() const
|
||||
{
|
||||
return type;
|
||||
}
|
||||
|
||||
ehs::Str_8 Token::GetValue() const
|
||||
{
|
||||
return {};
|
||||
}
|
Reference in New Issue
Block a user