[+] Added support for filtering by options

[+] Added more documentation in the form of objects.lua pseudo code
This commit is contained in:
Reece Wilson 2021-11-16 12:12:13 +00:00
parent 6d01a2f143
commit 2c4dc9522d
2 changed files with 102 additions and 9 deletions

View File

@ -99,6 +99,7 @@ end
local function auFilterOf(configFilter, ...) local function auFilterOf(configFilter, ...)
local ret = {} local ret = {}
local andOptions = {}
local test = function(val, orArray, notArray) local test = function(val, orArray, notArray)
if (orArray) then if (orArray) then
@ -154,7 +155,15 @@ local function auFilterOf(configFilter, ...)
end) end)
end) end)
return auConcatVararg({table.concat(ret, " or ")}, ...) auForEach(configFilter.options, function(option)
table.insert(andOptions, "options:" .. option)
end)
auForEach(configFilter.notOptions, function(option)
table.insert(andOptions, "not options:" .. option)
end)
return auConcatVararg({table.concat(ret, " or ")}, andOptions, ...)
end end
return { return {

View File

@ -2,15 +2,34 @@ function auEnum(...)
return nil return nil
end end
function auProjectO() function auProjectInfoO() -- extends auHeaderProject
return {}
end
function auBaseProjectO()
return {
info = auProjectInfoO()
}
end
function auAbstractProjectO() -- extends auBaseProject
return {
process = function(info, visit) end,
resolveDependencies = function(this, resolveFunction) end,
handleLink = function(this) end,
handleReference = function(this) end
}
end
function auProjectO() -- extends auAbstractProjectO
-- auAbstractProjectO is implemented by either your projects lua script or the json processor
end
function auSolutionO() -- extends auHeaderPartO
end end
function auSolutionO() function auVisitO() -- extends auProjectInfoO
end
function auVisitO()
end end
@ -28,7 +47,9 @@ function auFilterInO()
archs = nil, archs = nil,
notConfigs = nil, notConfigs = nil,
notPlatforms = nil, notPlatforms = nil,
notArchs = nil notArchs = nil,
notOptions = nil,
options = nil
} }
end end
@ -43,3 +64,66 @@ function auStartProjectO()
root = nil root = nil
} }
end end
-- Root JSON element
function auHeaderProjectO()
return {
projectType = "ConsoleApp",
name = "AuroraProject",
namespace = ""
}
end
--
function auBlockProjectKeyDefines()
end
function auBlockProjectKeyIncludes()
end
function auBlockProjectKeyFeatures()
end
function auBlockProjectKeyExcludes()
end
function auBlockProjectKeySources()
end
function auBlockProjectKeyLinks()
end
function auBlockProjectKeyIncludeDepends()
end
function auBlockProjectKeyIncludeSoftDepends()
end
function auBlockProjectKeyLinkDepends()
end
function auBlockProjectKeyLinkSoftDepends()
end
-- Root JSON element and sub-documents
function auBlockProjectO()
end
-- Root JSON element
function auHeaderPartO()
return {
type = "part"
}
end