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

@@ -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) :