mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-19 15:52:53 +00:00
Extract commonly used Parser code to new Parser component
This commit is contained in:
parent
d96f813e73
commit
8d9080066f
@ -85,6 +85,7 @@ group ""
|
|||||||
include "src/Common.lua"
|
include "src/Common.lua"
|
||||||
include "src/Crypto.lua"
|
include "src/Crypto.lua"
|
||||||
include "src/Linker.lua"
|
include "src/Linker.lua"
|
||||||
|
include "src/Parser.lua"
|
||||||
include "src/Unlinker.lua"
|
include "src/Unlinker.lua"
|
||||||
include "src/Utils.lua"
|
include "src/Utils.lua"
|
||||||
include "src/ZoneCode.lua"
|
include "src/ZoneCode.lua"
|
||||||
@ -102,6 +103,7 @@ include "src/ObjWriting.lua"
|
|||||||
group "Components"
|
group "Components"
|
||||||
Common:project()
|
Common:project()
|
||||||
Crypto:project()
|
Crypto:project()
|
||||||
|
Parser:project()
|
||||||
Utils:project()
|
Utils:project()
|
||||||
ZoneCode:project()
|
ZoneCode:project()
|
||||||
ZoneCodeGeneratorLib:project()
|
ZoneCodeGeneratorLib:project()
|
||||||
|
47
src/Parser.lua
Normal file
47
src/Parser.lua
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
Parser = {}
|
||||||
|
|
||||||
|
function Parser:include(includes)
|
||||||
|
if includes:handle(self:name()) then
|
||||||
|
includedirs {
|
||||||
|
path.join(ProjectFolder(), "Parser")
|
||||||
|
}
|
||||||
|
Utils:include(includes)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function Parser:link(links)
|
||||||
|
links:add(self:name())
|
||||||
|
links:linkto(Utils)
|
||||||
|
end
|
||||||
|
|
||||||
|
function Parser:use()
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function Parser:name()
|
||||||
|
return "Parser"
|
||||||
|
end
|
||||||
|
|
||||||
|
function Parser:project()
|
||||||
|
local folder = ProjectFolder()
|
||||||
|
local includes = Includes:create()
|
||||||
|
|
||||||
|
project(self:name())
|
||||||
|
targetdir(TargetDirectoryLib)
|
||||||
|
location "%{wks.location}/src/%{prj.name}"
|
||||||
|
kind "StaticLib"
|
||||||
|
language "C++"
|
||||||
|
|
||||||
|
files {
|
||||||
|
path.join(folder, "Parser/**.h"),
|
||||||
|
path.join(folder, "Parser/**.cpp")
|
||||||
|
}
|
||||||
|
|
||||||
|
vpaths {
|
||||||
|
["*"] = {
|
||||||
|
path.join(folder, "Parser")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
self:include(includes)
|
||||||
|
end
|
@ -5,12 +5,14 @@ function ZoneCodeGeneratorLib:include(includes)
|
|||||||
includedirs {
|
includedirs {
|
||||||
path.join(ProjectFolder(), "ZoneCodeGeneratorLib")
|
path.join(ProjectFolder(), "ZoneCodeGeneratorLib")
|
||||||
}
|
}
|
||||||
|
Parser:include(includes)
|
||||||
Utils:include(includes)
|
Utils:include(includes)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function ZoneCodeGeneratorLib:link(links)
|
function ZoneCodeGeneratorLib:link(links)
|
||||||
links:add(self:name())
|
links:add(self:name())
|
||||||
|
links:linkto(Parser)
|
||||||
links:linkto(Utils)
|
links:linkto(Utils)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "Domain/Evaluation/OperationType.h"
|
#include "Domain/Evaluation/OperationType.h"
|
||||||
#include "Parsing/IParserValue.h"
|
#include "Parsing/IParserValue.h"
|
||||||
#include "Utils/ClassUtils.h"
|
#include "Utils/ClassUtils.h"
|
||||||
|
@ -13,9 +13,10 @@ end
|
|||||||
|
|
||||||
function ZoneCommon:link(links)
|
function ZoneCommon:link(links)
|
||||||
links:add(self:name())
|
links:add(self:name())
|
||||||
links:linkto(Utils)
|
|
||||||
links:linkto(Common)
|
links:linkto(Common)
|
||||||
links:linkto(ObjCommon)
|
links:linkto(ObjCommon)
|
||||||
|
links:linkto(Parser)
|
||||||
|
links:linkto(Utils)
|
||||||
end
|
end
|
||||||
|
|
||||||
function ZoneCommon:use()
|
function ZoneCommon:use()
|
||||||
@ -42,4 +43,5 @@ function ZoneCommon:project()
|
|||||||
}
|
}
|
||||||
|
|
||||||
self:include(includes)
|
self:include(includes)
|
||||||
|
Parser:include(includes)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user