Moved Common to external git repo

Also changed namespace from LXC to PashaBibko::LXC
This commit is contained in:
Pasha Bibko
2025-08-09 21:31:36 +01:00
parent 3c638fa92b
commit a54c0ccbab
26 changed files with 135 additions and 632 deletions

View File

@@ -10,6 +10,9 @@ target_include_directories (
${CMAKE_CURRENT_SOURCE_DIR}/inc
)
# Links to the all needed internal libraries #
target_link_libraries(Lexer PRIVATE PashaBibko-UTIL)
# Creates the precompiled header for the binary #
target_include_directories(Lexer PRIVATE ${CMAKE_SOURCE_DIR}/common)
target_precompile_headers(Lexer PRIVATE ${CMAKE_SOURCE_DIR}/common/LXC.h)
target_include_directories(Lexer PRIVATE ${CMAKE_SOURCE_DIR}/external/util)
target_precompile_headers(Lexer PRIVATE ${CMAKE_SOURCE_DIR}/external/util/Util.h)

View File

@@ -2,7 +2,7 @@
#include <Token.h>
namespace LXC::Lexer
namespace PashaBibko::LXC::Lexer
{
struct LexerContext final
{

View File

@@ -1,8 +1,8 @@
#pragma once
#include <LXC.h>
#include <Util.h>
namespace LXC::Lexer
namespace PashaBibko::LXC::Lexer
{
namespace TokenClass
{

View File

@@ -1,9 +1,9 @@
#include <LXC.h>
#include <Util.h>
#include <Lexer.h>
#include <Token.h>
namespace LXC::Internal
namespace PashaBibko::LXC::Internal
{
static constexpr bool IsNumeric(const char c)
{
@@ -81,7 +81,7 @@ namespace LXC::Internal
};
}
namespace LXC::Lexer
namespace PashaBibko::LXC::Lexer
{
LexerContext::LexerContext(const std::string& _source) :
source(_source), index(0), out{}, len((uint32_t)_source.length()), column(0), line(0)
@@ -210,6 +210,6 @@ namespace LXC::Lexer
if (trackers.inStrLiteral)
return Util::FunctionFail<LexerError>(LexerError::UnterminatedStringLiteral, trackers.sectionStart);
return ctx.out;
return std::move(ctx.out);
}
}

View File

@@ -1,11 +1,11 @@
#include <LXC.h>
#include <Util.h>
#include <Lexer.h>
#include <Token.h>
#include <iomanip>
namespace LXC::Lexer
namespace PashaBibko::LXC::Lexer
{
// Constructor to assign the members of the token class //
Token::Token(const LexerContext& ctx, const uint32_t start, unsigned short len, TokenType _type) :