Backup
This commit is contained in:
13
src/Arctyx.cpp
Normal file
13
src/Arctyx.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#include "arctyx/Arctyx.h"
|
||||
|
||||
#include <ehs/Vector.h>
|
||||
|
||||
#include "arctyx/compiler/Token.h"
|
||||
|
||||
void Arctyx::Initialize()
|
||||
{
|
||||
}
|
||||
|
||||
void Arctyx::Uninitialize()
|
||||
{
|
||||
}
|
@@ -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 {};
|
||||
}
|
13
src/main.cpp
13
src/main.cpp
@@ -5,6 +5,19 @@
|
||||
#include <ehs/io/Console.h>
|
||||
#include <ehs/io/File.h>
|
||||
|
||||
struct Foo
|
||||
{
|
||||
bool a;
|
||||
ehs::UInt_64 b;
|
||||
ehs::UInt_16 c;
|
||||
};
|
||||
|
||||
struct Bar
|
||||
{
|
||||
Foo a;
|
||||
ehs::Char_8 b[128];
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
ehs::Initialize("Arctyx", "Alpha", {1, 0, 0});
|
||||
|
Reference in New Issue
Block a user