Moved Common to external git repo
Also changed namespace from LXC to PashaBibko::LXC
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <Token.h>
|
||||
|
||||
namespace LXC::Lexer
|
||||
namespace PashaBibko::LXC::Lexer
|
||||
{
|
||||
struct LexerContext final
|
||||
{
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <LXC.h>
|
||||
#include <Util.h>
|
||||
|
||||
namespace LXC::Lexer
|
||||
namespace PashaBibko::LXC::Lexer
|
||||
{
|
||||
namespace TokenClass
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) :
|
||||
|
||||
Reference in New Issue
Block a user